edu.isi.nlp.UnicodeFriendlyStrings Maven / Gradle / Ivy
The newest version!
package edu.isi.nlp;
import com.google.common.base.Function;
/** Utiltiy methods for {@link UnicodeFriendlyString} */
public class UnicodeFriendlyStrings {
private UnicodeFriendlyStrings() {
throw new UnsupportedOperationException();
}
public static Function lengthInCodePointsFunction() {
return LengthInCodePointsFunction.INSTANCE;
}
private enum LengthInCodePointsFunction implements Function {
INSTANCE;
@Override
public Integer apply(final UnicodeFriendlyString ufs) {
return ufs.lengthInCodePoints();
}
@Override
public String toString() {
return "lengthInCodepoints()";
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy