edu.isi.nlp.StringWithNonBmpFunctions Maven / Gradle / Ivy
The newest version!
package edu.isi.nlp;
import com.google.common.base.Function;
import javax.annotation.Generated;
import javax.annotation.ParametersAreNonnullByDefault;
/**
* Projection functions and predicates that corresponds to attributes of {@link StringWithNonBmp}.
*/
@SuppressWarnings({"all"})
@ParametersAreNonnullByDefault
@Generated({"Immutables.generator", "StringWithNonBmp"})
final class StringWithNonBmpFunctions {
private StringWithNonBmpFunctions() {}
/**
* Projection function from instance of StringWithNonBmp to attribute {@link StringWithNonBmp#utf16CodeUnits() utf16CodeUnits}.
* @return {@code utf16CodeUnits} function instance
*/
public static Function utf16CodeUnits() {
return Utf16CodeUnitsFunction.INSTANCE;
}
private enum Utf16CodeUnitsFunction implements Function {
INSTANCE;
@Override
public String apply(StringWithNonBmp input) {
return input.utf16CodeUnits();
}
@Override
public String toString() {
return "StringWithNonBmpFunctions.utf16CodeUnits()";
}
}
/**
* Projection function from instance of StringWithNonBmp to attribute {@link StringWithNonBmp#lengthInUtf16CodeUnits() lengthInUtf16CodeUnits}.
* @return {@code lengthInUtf16CodeUnits} function instance
*/
public static Function lengthInUtf16CodeUnits() {
return LengthInUtf16CodeUnitsFunction.INSTANCE;
}
private enum LengthInUtf16CodeUnitsFunction implements Function {
INSTANCE;
@Override
public Integer apply(StringWithNonBmp input) {
return input.lengthInUtf16CodeUnits();
}
@Override
public String toString() {
return "StringWithNonBmpFunctions.lengthInUtf16CodeUnits()";
}
}
/**
* Projection function from instance of StringWithNonBmp to attribute {@link StringWithNonBmp#lengthInCodePoints() lengthInCodePoints}.
* @return {@code lengthInCodePoints} function instance
*/
public static Function lengthInCodePoints() {
return LengthInCodePointsFunction.INSTANCE;
}
private enum LengthInCodePointsFunction implements Function {
INSTANCE;
@Override
public Integer apply(StringWithNonBmp input) {
return input.lengthInCodePoints();
}
@Override
public String toString() {
return "StringWithNonBmpFunctions.lengthInCodePoints()";
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy