@Test public final void testGetFirstLast3__ALEXANDER_Returns_Aleder() { assertEquals("Aleder", this.getStringEncoder().getFirst3Last3("Alexzander")); }
String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } else { return name; } }
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } else { return name; } } }
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } else { return name; } }  }
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } else { return name; } }  @Override final Object encode(final Object pObject); @Override final String encode(String name); boolean isEncodeEquals(String name1, String name2); }
MatchRatingApproachEncoder implements StringEncoder { String getFirst3Last3(final String name) { final int nameLength = name.length(); if (nameLength > SIX) { final String firstThree = name.substring(0, THREE); final String lastThree = name.substring(nameLength - THREE, nameLength); return firstThree + lastThree; } else { return name; } }  @Override final Object encode(final Object pObject); @Override final String encode(String name); boolean isEncodeEquals(String name1, String name2);  }