List of usage examples for java.lang Character.UnicodeBlock equals
public boolean equals(Object obj)
From source file:com.turo.pushy.apns.util.ApnsPayloadBuilderBenchmark.java
@Setup public void setUp() { this.apnsPayloadBuilder = new ApnsPayloadBuilder(); final char[] messageBodyCharacters; {//ww w . j av a 2 s.c o m 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); }