List of usage examples for java.lang Character MIN_CODE_POINT
int MIN_CODE_POINT
To view the source code for java.lang Character MIN_CODE_POINT.
Click Source Link
From source file:Main.java
public static void main(String[] args) { System.out.println("Character.MIN_CODE_POINT:" + (int) Character.MIN_CODE_POINT); }
From source file:com.turo.pushy.apns.util.ApnsPayloadBuilderBenchmark.java
@Setup public void setUp() { this.apnsPayloadBuilder = new ApnsPayloadBuilder(); final char[] messageBodyCharacters; {//w ww . j ava2 s. c om final Character.UnicodeBlock unicodeBlock = Character.UnicodeBlock.forName(this.unicodeBlockName); final List<Character> charactersInBlock = new ArrayList<>(); for (int codePoint = Character.MIN_CODE_POINT; codePoint < Character.MAX_CODE_POINT; codePoint++) { if (unicodeBlock.equals(Character.UnicodeBlock.of(codePoint)) && !Character.isISOControl(codePoint)) { charactersInBlock.add((char) codePoint); } } messageBodyCharacters = new char[charactersInBlock.size()]; for (int i = 0; i < charactersInBlock.size(); i++) { messageBodyCharacters[i] = charactersInBlock.get(i); } } this.messageBody = RandomStringUtils.random(this.messageBodyLength, messageBodyCharacters); }
From source file:org.marketcetera.util.misc.RandomStrings.java
/** * Returns a randomly generated Unicode code point within the * full range of valid Unicode scalar values. * * @return The code point./*from ww w . j a va2s . c o m*/ */ public static int genUCP() { return sGenerator.nextInt(Character.MAX_CODE_POINT - Character.MIN_CODE_POINT + 1) + Character.MIN_CODE_POINT; }
From source file:net.ymate.platform.commons.lang.BlurObject.java
public char toCharValue() { if (attr == null) { return Character.MIN_CODE_POINT; }//w ww .j a v a 2s . com if (attr instanceof Character) { return (Character) attr; } if (attr instanceof BlurObject) { return ((BlurObject) this.attr).toCharValue(); } return Character.MIN_CODE_POINT; }
From source file:org.exoplatform.cms.common.CommonUtils.java
private static void getValueTokens() { if (tokens.size() <= 0) { String token;/*from w ww.j ava2s. c om*/ // Tokens by HTML(Decimal) code. for (int t = Character.MIN_CODE_POINT; t < Character.MAX_CODE_POINT; t++) { if (t < CHAR_CODES[0] && t > CHAR_CODES[1] || t < CHAR_CODES[2] && t > CHAR_CODES[3] || t < CHAR_CODES[4] && t > CHAR_CODES[5] || t < CHAR_CODES[6] && t > CHAR_CODES[7]) { token = new StringBuilder(AMP_NUMBER).append(t).append(SEMICOLON).toString(); tokens.add(token); charcodes.put(token, String.valueOf(Character.toChars(t)[0])); } } // Tokens by Entity code. tokens.add(LESS_THAN); charcodes.put(LESS_THAN, ">"); tokens.add(GREATER_THAN); charcodes.put(GREATER_THAN, "<"); tokens.add(QUOT); charcodes.put(QUOT, "\""); tokens.add(AMP_SPACE); charcodes.put(AMP_SPACE, SPACE); tokens.add(AMP_HEX); charcodes.put(AMP_HEX, "&"); tokens.add(AMP); charcodes.put(AMP, "&"); } }
From source file:net.ymate.platform.core.lang.TreeObject.java
public TreeObject add(Character c) { return add(c != null ? c : Character.MIN_CODE_POINT, TYPE_CHAR); }
From source file:net.ymate.platform.commons.lang.TreeObject.java
/** * - Char * * @param c */ public TreeObject add(Character c) { return add(c != null ? c.charValue() : Character.MIN_CODE_POINT, TYPE_CHAR); }
From source file:net.ymate.platform.commons.lang.TreeObject.java
/** * ?/*ww w.j av a2s .c o m*/ * * @return */ public char toCharValue() { if (isValue()) { if (_object == null) { return Character.MIN_CODE_POINT; } if (_type == TYPE_CHAR && (char.class.isAssignableFrom(_object.getClass()) || _object instanceof Character)) { return (Character) _object; } else { return new BlurObject(_object).toCharValue(); } } throw new IllegalStateException(); }
From source file:ca.oson.json.Oson.java
private Character long2Character(long longvalue, Long min, Long max) { Character valueToReturn;/*www . j a v a 2 s .c om*/ if (min == null && longvalue < Character.MIN_CODE_POINT) { valueToReturn = null; } else if (max == null && longvalue > Character.MAX_CODE_POINT) { valueToReturn = null; } else if (min != null && min > longvalue) { valueToReturn = (char) min.intValue(); } else if (max != null && max < longvalue) { valueToReturn = (char) max.intValue(); } else { valueToReturn = (char) longvalue; } return valueToReturn; }