Java Code Examples for java.lang.Character#DASH_PUNCTUATION

The following examples show how to use java.lang.Character#DASH_PUNCTUATION . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ORBUtility.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public static boolean isPrintable(char c)
{
    if (Character.isJavaIdentifierStart(c)) {
        // Letters and $ _
        return true;
    }
    if (Character.isDigit(c)) {
        return true;
    }
    switch (Character.getType(c)) {
    case Character.MODIFIER_SYMBOL : return true; // ` ^
    case Character.DASH_PUNCTUATION : return true; // -
    case Character.MATH_SYMBOL : return true; // = ~ + | < >
    case Character.OTHER_PUNCTUATION : return true; // !@#%&*;':",./?
    case Character.START_PUNCTUATION : return true; // ( [ {
    case Character.END_PUNCTUATION : return true; // ) ] }
    }
    return false;
}
 
Example 2
Source File: ORBUtility.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public static boolean isPrintable(char c)
{
    if (Character.isJavaIdentifierStart(c)) {
        // Letters and $ _
        return true;
    }
    if (Character.isDigit(c)) {
        return true;
    }
    switch (Character.getType(c)) {
    case Character.MODIFIER_SYMBOL : return true; // ` ^
    case Character.DASH_PUNCTUATION : return true; // -
    case Character.MATH_SYMBOL : return true; // = ~ + | < >
    case Character.OTHER_PUNCTUATION : return true; // !@#%&*;':",./?
    case Character.START_PUNCTUATION : return true; // ( [ {
    case Character.END_PUNCTUATION : return true; // ) ] }
    }
    return false;
}
 
Example 3
Source File: ORBUtility.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public static boolean isPrintable(char c)
{
    if (Character.isJavaIdentifierStart(c)) {
        // Letters and $ _
        return true;
    }
    if (Character.isDigit(c)) {
        return true;
    }
    switch (Character.getType(c)) {
    case Character.MODIFIER_SYMBOL : return true; // ` ^
    case Character.DASH_PUNCTUATION : return true; // -
    case Character.MATH_SYMBOL : return true; // = ~ + | < >
    case Character.OTHER_PUNCTUATION : return true; // !@#%&*;':",./?
    case Character.START_PUNCTUATION : return true; // ( [ {
    case Character.END_PUNCTUATION : return true; // ) ] }
    }
    return false;
}
 
Example 4
Source File: ORBUtility.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public static boolean isPrintable(char c)
{
    if (Character.isJavaIdentifierStart(c)) {
        // Letters and $ _
        return true;
    }
    if (Character.isDigit(c)) {
        return true;
    }
    switch (Character.getType(c)) {
    case Character.MODIFIER_SYMBOL : return true; // ` ^
    case Character.DASH_PUNCTUATION : return true; // -
    case Character.MATH_SYMBOL : return true; // = ~ + | < >
    case Character.OTHER_PUNCTUATION : return true; // !@#%&*;':",./?
    case Character.START_PUNCTUATION : return true; // ( [ {
    case Character.END_PUNCTUATION : return true; // ) ] }
    }
    return false;
}
 
Example 5
Source File: ORBUtility.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public static boolean isPrintable(char c)
{
    if (Character.isJavaIdentifierStart(c)) {
        // Letters and $ _
        return true;
    }
    if (Character.isDigit(c)) {
        return true;
    }
    switch (Character.getType(c)) {
    case Character.MODIFIER_SYMBOL : return true; // ` ^
    case Character.DASH_PUNCTUATION : return true; // -
    case Character.MATH_SYMBOL : return true; // = ~ + | < >
    case Character.OTHER_PUNCTUATION : return true; // !@#%&*;':",./?
    case Character.START_PUNCTUATION : return true; // ( [ {
    case Character.END_PUNCTUATION : return true; // ) ] }
    }
    return false;
}
 
Example 6
Source File: ORBUtility.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public static boolean isPrintable(char c)
{
    if (Character.isJavaIdentifierStart(c)) {
        // Letters and $ _
        return true;
    }
    if (Character.isDigit(c)) {
        return true;
    }
    switch (Character.getType(c)) {
    case Character.MODIFIER_SYMBOL : return true; // ` ^
    case Character.DASH_PUNCTUATION : return true; // -
    case Character.MATH_SYMBOL : return true; // = ~ + | < >
    case Character.OTHER_PUNCTUATION : return true; // !@#%&*;':",./?
    case Character.START_PUNCTUATION : return true; // ( [ {
    case Character.END_PUNCTUATION : return true; // ) ] }
    }
    return false;
}
 
Example 7
Source File: ORBUtility.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public static boolean isPrintable(char c)
{
    if (Character.isJavaIdentifierStart(c)) {
        // Letters and $ _
        return true;
    }
    if (Character.isDigit(c)) {
        return true;
    }
    switch (Character.getType(c)) {
    case Character.MODIFIER_SYMBOL : return true; // ` ^
    case Character.DASH_PUNCTUATION : return true; // -
    case Character.MATH_SYMBOL : return true; // = ~ + | < >
    case Character.OTHER_PUNCTUATION : return true; // !@#%&*;':",./?
    case Character.START_PUNCTUATION : return true; // ( [ {
    case Character.END_PUNCTUATION : return true; // ) ] }
    }
    return false;
}
 
Example 8
Source File: ORBUtility.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public static boolean isPrintable(char c)
{
    if (Character.isJavaIdentifierStart(c)) {
        // Letters and $ _
        return true;
    }
    if (Character.isDigit(c)) {
        return true;
    }
    switch (Character.getType(c)) {
    case Character.MODIFIER_SYMBOL : return true; // ` ^
    case Character.DASH_PUNCTUATION : return true; // -
    case Character.MATH_SYMBOL : return true; // = ~ + | < >
    case Character.OTHER_PUNCTUATION : return true; // !@#%&*;':",./?
    case Character.START_PUNCTUATION : return true; // ( [ {
    case Character.END_PUNCTUATION : return true; // ) ] }
    }
    return false;
}
 
Example 9
Source File: ORBUtility.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public static boolean isPrintable(char c)
{
    if (Character.isJavaIdentifierStart(c)) {
        // Letters and $ _
        return true;
    }
    if (Character.isDigit(c)) {
        return true;
    }
    switch (Character.getType(c)) {
    case Character.MODIFIER_SYMBOL : return true; // ` ^
    case Character.DASH_PUNCTUATION : return true; // -
    case Character.MATH_SYMBOL : return true; // = ~ + | < >
    case Character.OTHER_PUNCTUATION : return true; // !@#%&*;':",./?
    case Character.START_PUNCTUATION : return true; // ( [ {
    case Character.END_PUNCTUATION : return true; // ) ] }
    }
    return false;
}
 
Example 10
Source File: ORBUtility.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public static boolean isPrintable(char c)
{
    if (Character.isJavaIdentifierStart(c)) {
        // Letters and $ _
        return true;
    }
    if (Character.isDigit(c)) {
        return true;
    }
    switch (Character.getType(c)) {
    case Character.MODIFIER_SYMBOL : return true; // ` ^
    case Character.DASH_PUNCTUATION : return true; // -
    case Character.MATH_SYMBOL : return true; // = ~ + | < >
    case Character.OTHER_PUNCTUATION : return true; // !@#%&*;':",./?
    case Character.START_PUNCTUATION : return true; // ( [ {
    case Character.END_PUNCTUATION : return true; // ) ] }
    }
    return false;
}