@Test public void testGetFirstLetterOfDoubleReturnsZ() { assertEquals('Z', Symbols.getFirstLetter(3.14159)); }
public static char getFirstLetter(Object attr) { if(attr == null) { return 'Z'; } String s = attr.toString(); if(s.length() == 0) { return 'Z'; } char c = s.charAt(0); if(!Character.isLetter(c)) { return 'Z'; } return Character.toUpperCase(c); }
Symbols { public static char getFirstLetter(Object attr) { if(attr == null) { return 'Z'; } String s = attr.toString(); if(s.length() == 0) { return 'Z'; } char c = s.charAt(0); if(!Character.isLetter(c)) { return 'Z'; } return Character.toUpperCase(c); } }
Symbols { public static char getFirstLetter(Object attr) { if(attr == null) { return 'Z'; } String s = attr.toString(); if(s.length() == 0) { return 'Z'; } char c = s.charAt(0); if(!Character.isLetter(c)) { return 'Z'; } return Character.toUpperCase(c); } private  Symbols(); }
Symbols { public static char getFirstLetter(Object attr) { if(attr == null) { return 'Z'; } String s = attr.toString(); if(s.length() == 0) { return 'Z'; } char c = s.charAt(0); if(!Character.isLetter(c)) { return 'Z'; } return Character.toUpperCase(c); } private  Symbols(); static int getSymbolType(Symbol sym); static Symbol create(SymbolFactory factory, Object value); static Object valueOf(Symbol sym); static List<Symbol> asList(SymbolFactory factory, Object... objects); static char getFirstLetter(Object attr); static Identifier parseIdentifier(SymbolFactory symbols, String idString); static Symbol readAttributeFromString(Agent agent, String s); static double asDouble(Symbol sym); static boolean equalByValue(Symbol s1, Symbol s2); }
Symbols { public static char getFirstLetter(Object attr) { if(attr == null) { return 'Z'; } String s = attr.toString(); if(s.length() == 0) { return 'Z'; } char c = s.charAt(0); if(!Character.isLetter(c)) { return 'Z'; } return Character.toUpperCase(c); } private  Symbols(); static int getSymbolType(Symbol sym); static Symbol create(SymbolFactory factory, Object value); static Object valueOf(Symbol sym); static List<Symbol> asList(SymbolFactory factory, Object... objects); static char getFirstLetter(Object attr); static Identifier parseIdentifier(SymbolFactory symbols, String idString); static Symbol readAttributeFromString(Agent agent, String s); static double asDouble(Symbol sym); static boolean equalByValue(Symbol s1, Symbol s2); static final int IDENTIFIER_SYMBOL_TYPE; static final int SYM_CONSTANT_SYMBOL_TYPE; static final int INT_CONSTANT_SYMBOL_TYPE; static final int FLOAT_CONSTANT_SYMBOL_TYPE; static final Object NEW_ID; }