- java.lang.Object
-
- org.ojalgo.netio.ASCII
-
public abstract class ASCII extends java.lang.Object
http://www.lammertbies.nl/comm/info/ascii-characters.htmlASCII codes 0 1 2 3 4 5 6 7 0 NUL SOH STX ETX EOT ENQ ACK BEL 8 BS HT LF VT FF CR SO SI 16 DLE DC1 DC2 DC3 DC4 NAK SYN ETB 24 CAN EM SUB ESC FS GS RS US 32 SP ! " # $ % & ' 40 ( ) * + , - . / 48 0 1 2 3 4 5 6 7 56 8 9 : ; < = > ? 64 @ A B C D E F G 72 H I J K L M N O 80 P Q R S T U V W 88 X Y Z [ \ ] ^ _ 96 ` a b c d e f g 104 h i j k l m n o 112 p q r s t u v w 120 x y z { | ~ DEL
-
-
Field Summary
Fields Modifier and Type Field Description static charCOMMAstatic charCRstatic charDECIMAL_NINEstatic charDECIMAL_ZEROstatic charDELstatic charEQUALSstatic charHTstatic charLCBstatic charLFstatic charLOWERCASE_Astatic charLOWERCASE_Zstatic charNBSPstatic charNULLstatic charRCBstatic charSEMICOLONstatic charSPstatic charUNDERSCOREstatic charUPPERCASE_Astatic charUPPERCASE_Z
-
Constructor Summary
Constructors Modifier Constructor Description privateASCII()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgenerateRandom(int length, java.util.function.IntPredicate predicate)static booleanisAlphabetic(int aChar)static booleanisAlphanumeric(int aChar)static booleanisAscii(int aChar)static booleanisControl(int aChar)static booleanisDigit(int aChar)static booleanisGraph(int aChar)static booleanisLowercase(int aChar)static booleanisPrintable(int aChar)static booleanisPunctuation(int aChar)Not sure this is correctstatic booleanisSpace(int aChar)static booleanisUppercase(int aChar)static inttoLowercase(int aChar)If aChar is an uppercase character it is converted to the corresponding lowercase character.static inttoPrintable(int aChar)static inttoUppercase(int aChar)If aChar is a lowercase character it is converted to the corresponding uppercase character.
-
-
-
Field Detail
-
COMMA
public static final char COMMA
- See Also:
- Constant Field Values
-
CR
public static final char CR
- See Also:
- Constant Field Values
-
DECIMAL_NINE
public static final char DECIMAL_NINE
- See Also:
- Constant Field Values
-
DECIMAL_ZERO
public static final char DECIMAL_ZERO
- See Also:
- Constant Field Values
-
DEL
public static final char DEL
- See Also:
- Constant Field Values
-
EQUALS
public static final char EQUALS
- See Also:
- Constant Field Values
-
HT
public static final char HT
- See Also:
- Constant Field Values
-
LCB
public static final char LCB
- See Also:
- Constant Field Values
-
LF
public static final char LF
- See Also:
- Constant Field Values
-
LOWERCASE_A
public static final char LOWERCASE_A
- See Also:
- Constant Field Values
-
LOWERCASE_Z
public static final char LOWERCASE_Z
- See Also:
- Constant Field Values
-
NBSP
public static final char NBSP
- See Also:
- Constant Field Values
-
NULL
public static final char NULL
- See Also:
- Constant Field Values
-
RCB
public static final char RCB
- See Also:
- Constant Field Values
-
SEMICOLON
public static final char SEMICOLON
- See Also:
- Constant Field Values
-
SP
public static final char SP
- See Also:
- Constant Field Values
-
UNDERSCORE
public static final char UNDERSCORE
- See Also:
- Constant Field Values
-
UPPERCASE_A
public static final char UPPERCASE_A
- See Also:
- Constant Field Values
-
UPPERCASE_Z
public static final char UPPERCASE_Z
- See Also:
- Constant Field Values
-
-
Method Detail
-
generateRandom
public static java.lang.String generateRandom(int length, java.util.function.IntPredicate predicate)- Parameters:
length- The length of the random stringpredicate- Need to pass this test- Returns:
- A String of the specified length containing ASCII characters that pass the predicate test.
-
isAlphabetic
public static boolean isAlphabetic(int aChar)
-
isAlphanumeric
public static boolean isAlphanumeric(int aChar)
-
isAscii
public static boolean isAscii(int aChar)
- Returns:
- True if aChar is an ASCII character.
-
isControl
public static boolean isControl(int aChar)
-
isDigit
public static boolean isDigit(int aChar)
-
isGraph
public static boolean isGraph(int aChar)
-
isLowercase
public static boolean isLowercase(int aChar)
- Returns:
- true if aChar is an lowercase character
-
isPrintable
public static boolean isPrintable(int aChar)
-
isPunctuation
public static boolean isPunctuation(int aChar)
Not sure this is correct
-
isSpace
public static boolean isSpace(int aChar)
-
isUppercase
public static boolean isUppercase(int aChar)
- Returns:
- true if aChar is an uppercase character
-
toLowercase
public static int toLowercase(int aChar)
If aChar is an uppercase character it is converted to the corresponding lowercase character. Otherwise it is returned unaltered.
-
toPrintable
public static int toPrintable(int aChar)
-
toUppercase
public static int toUppercase(int aChar)
If aChar is a lowercase character it is converted to the corresponding uppercase character. Otherwise it is returned unaltered.
-
-