@Test public void testShouldAlias() { assertThat(shouldAlias("x_y"), is(true)); assertThat(shouldAlias("x_dash_y"), is(true)); }
public static boolean shouldAlias(final String name) { final int length = name.length(); return length > 2 && name.charAt(0) != UNDERSCORE_CHAR && name.charAt(length - 1) != UNDERSCORE_CHAR && name.contains(UNDERSCORE) && !name.contains(DOUBLE_UNDERSCORE); }
EnvironmentVariables { public static boolean shouldAlias(final String name) { final int length = name.length(); return length > 2 && name.charAt(0) != UNDERSCORE_CHAR && name.charAt(length - 1) != UNDERSCORE_CHAR && name.contains(UNDERSCORE) && !name.contains(DOUBLE_UNDERSCORE); } }
EnvironmentVariables { public static boolean shouldAlias(final String name) { final int length = name.length(); return length > 2 && name.charAt(0) != UNDERSCORE_CHAR && name.charAt(length - 1) != UNDERSCORE_CHAR && name.contains(UNDERSCORE) && !name.contains(DOUBLE_UNDERSCORE); } private  EnvironmentVariables(); }
EnvironmentVariables { public static boolean shouldAlias(final String name) { final int length = name.length(); return length > 2 && name.charAt(0) != UNDERSCORE_CHAR && name.charAt(length - 1) != UNDERSCORE_CHAR && name.contains(UNDERSCORE) && !name.contains(DOUBLE_UNDERSCORE); } private  EnvironmentVariables(); static boolean shouldAlias(final String name); static Map<String, String> expand(); static Map<String, String> expand(final Map<String, String> env); }
EnvironmentVariables { public static boolean shouldAlias(final String name) { final int length = name.length(); return length > 2 && name.charAt(0) != UNDERSCORE_CHAR && name.charAt(length - 1) != UNDERSCORE_CHAR && name.contains(UNDERSCORE) && !name.contains(DOUBLE_UNDERSCORE); } private  EnvironmentVariables(); static boolean shouldAlias(final String name); static Map<String, String> expand(); static Map<String, String> expand(final Map<String, String> env);  }