@Test public void testAbbreviate() { assertEquals("~/f", new TildeExpander().abbreviate(System.getProperty("user.home") + "/f")); }
public String abbreviate(final String name) { if(StringUtils.startsWith(name, preferences.getProperty("local.user.home"))) { return Local.HOME + StringUtils.removeStart(name, preferences.getProperty("local.user.home")); } return name; }
TildeExpander { public String abbreviate(final String name) { if(StringUtils.startsWith(name, preferences.getProperty("local.user.home"))) { return Local.HOME + StringUtils.removeStart(name, preferences.getProperty("local.user.home")); } return name; } }
TildeExpander { public String abbreviate(final String name) { if(StringUtils.startsWith(name, preferences.getProperty("local.user.home"))) { return Local.HOME + StringUtils.removeStart(name, preferences.getProperty("local.user.home")); } return name; }  }
TildeExpander { public String abbreviate(final String name) { if(StringUtils.startsWith(name, preferences.getProperty("local.user.home"))) { return Local.HOME + StringUtils.removeStart(name, preferences.getProperty("local.user.home")); } return name; }  String abbreviate(final String name); String expand(final String name); }
TildeExpander { public String abbreviate(final String name) { if(StringUtils.startsWith(name, preferences.getProperty("local.user.home"))) { return Local.HOME + StringUtils.removeStart(name, preferences.getProperty("local.user.home")); } return name; }  String abbreviate(final String name); String expand(final String name);  }