@Override public String getNormalisedString(@Nonnull String s) { return REPLACE.getNormalisedString(s).replaceAll("\\s+", " ").trim(); } };
@Override public String getNormalisedString(String s) { return REPLACE.getNormalisedString(s).replaceAll("\\s+", " ").trim(); } };
/** * Gets the normalised version of a string * @param s The string to normalise * @return The normalised string */ public String getNormalisedString(String s) { switch (this) { case REPLACE: return s.replaceAll("\\t|\\n|\\r", " "); case COLLAPSE: return REPLACE.getNormalisedString(s).replaceAll("\\s+", " ").trim(); default: return s; } } }
/** * Gets the normalised version of a string * @param s The string to normalise * @return The normalised string */ public String getNormalisedString(String s) { switch (this) { case REPLACE: return s.replaceAll("\\t|\\n|\\r", " "); case COLLAPSE: return REPLACE.getNormalisedString(s).replaceAll("\\s+", " ").trim(); case PRESERVE: default: return s; } } }
@Override public String getNormalisedString(String s) { return REPLACE.getNormalisedString(s).replaceAll("\\s+", " ").trim(); } };
@Override public String getNormalisedString(String s) { return REPLACE.getNormalisedString(s).replaceAll("\\s+", " ").trim(); } };