DefUtils { public static boolean isVarValue( Object val) { return val == null || !val.getClass().equals( String.class) || varValueRegex_.matcher( val.toString()).matches(); } private  DefUtils(); static boolean isIdentifier( String id); static String[] toPath( String pathName); static void assertIdentifier( String id); static boolean isVarValue( Object val); static void assertVarValue( Object val); static void assertPath( String pathName); static void assertPropertyIdentifiers( Collection<String> properties); static String toIdentifier( String name); static String toIdentifier( Number number); static String toNumberIdentifiers( String text);  }
@Test public void isVarValue() { assertTrue(DefUtils.isVarValue(null)); assertFalse(DefUtils.isVarValue("\u0007")); assertTrue(DefUtils.isVarValue("\n")); assertTrue(DefUtils.isVarValue("\t")); assertTrue(DefUtils.isVarValue("x")); assertTrue(DefUtils.isVarValue("1_Bar-1")); assertTrue(DefUtils.isVarValue("")); assertTrue(DefUtils.isVarValue(" ")); assertTrue(DefUtils.isVarValue("+")); assertTrue(DefUtils.isVarValue("(")); assertTrue(DefUtils.isVarValue("あ")); }