@Test public void apply() { RemoveExtension removeExtension = new RemoveExtension(); String result = removeExtension.apply("str.txt"); assertEquals("str", result); }
@Override public String apply(String value) { return value.contains(".") ? value.substring(0, value.lastIndexOf('.')) : value; }
RemoveExtension implements Function<String, String> { @Override public String apply(String value) { return value.contains(".") ? value.substring(0, value.lastIndexOf('.')) : value; } }
RemoveExtension implements Function<String, String> { @Override public String apply(String value) { return value.contains(".") ? value.substring(0, value.lastIndexOf('.')) : value; }  }
RemoveExtension implements Function<String, String> { @Override public String apply(String value) { return value.contains(".") ? value.substring(0, value.lastIndexOf('.')) : value; }  @Override String apply(String value); }
RemoveExtension implements Function<String, String> { @Override public String apply(String value) { return value.contains(".") ? value.substring(0, value.lastIndexOf('.')) : value; }  @Override String apply(String value);  }