Package org.jparsec.functors
Class Maps
- java.lang.Object
-
- org.jparsec.functors.Maps
-
public final class Maps extends java.lang.ObjectProvides common implementations ofMapinterface and the variants.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Function<java.lang.String,java.lang.Integer>TO_INTEGERDeprecated.UseInteger::valueOfdirectly.static java.util.function.UnaryOperator<java.lang.String>TO_LOWER_CASETheUnaryOperatorthat maps aStringto lower case usingLocale.US.static java.util.function.UnaryOperator<java.lang.String>TO_UPPER_CASETheUnaryOperatorthat maps aStringto upper case usingLocale.US.
-
Constructor Summary
Constructors Modifier Constructor Description privateMaps()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <F,T>
java.util.function.Function<F,T>constant(T v)Deprecated.Usefrom -> todirectly.static <T> java.util.function.UnaryOperator<T>identity()Deprecated.UseFunction.identity()instead.static <K,V>
java.util.function.Function<K,V>map(java.util.Map<K,V> m)Deprecated.UseMap::getinstead.static <T> Map<T,java.lang.String>mapToString()Deprecated.UseString::valueOfdirectly.static <E extends java.lang.Enum<E>>
java.util.function.Function<java.lang.String,E>toEnum(java.lang.Class<E> enumType)Returns aMapthat maps the string representation of an enum to the corresponding enum value by callingEnum.valueOf(Class, String).static java.util.function.UnaryOperator<java.lang.String>toLowerCase(java.util.Locale locale)Returns aUnaryOperatorthat maps aStringto lower case usinglocale.static <A,B>
Map2<A,B,Pair<A,B>>toPair()static <A,B,C>
Map3<A,B,C,Tuple3<A,B,C>>toTuple3()Deprecated.static <A,B,C,D>
Map4<A,B,C,D,Tuple4<A,B,C,D>>toTuple4()Deprecated.static <A,B,C,D,E>
Map5<A,B,C,D,E,Tuple5<A,B,C,D,E>>toTuple5()Deprecated.static java.util.function.UnaryOperator<java.lang.String>toUpperCase(java.util.Locale locale)Returns aUnaryOperatorthat maps aStringto upper case usinglocale.
-
-
-
Field Detail
-
TO_INTEGER
@Deprecated public static final java.util.function.Function<java.lang.String,java.lang.Integer> TO_INTEGER
Deprecated.UseInteger::valueOfdirectly.
-
TO_LOWER_CASE
public static java.util.function.UnaryOperator<java.lang.String> TO_LOWER_CASE
TheUnaryOperatorthat maps aStringto lower case usingLocale.US.
-
TO_UPPER_CASE
public static java.util.function.UnaryOperator<java.lang.String> TO_UPPER_CASE
TheUnaryOperatorthat maps aStringto upper case usingLocale.US.
-
-
Method Detail
-
toLowerCase
public static java.util.function.UnaryOperator<java.lang.String> toLowerCase(java.util.Locale locale)
Returns aUnaryOperatorthat maps aStringto lower case usinglocale.
-
toUpperCase
public static java.util.function.UnaryOperator<java.lang.String> toUpperCase(java.util.Locale locale)
Returns aUnaryOperatorthat maps aStringto upper case usinglocale.
-
mapToString
@Deprecated public static <T> Map<T,java.lang.String> mapToString()
Deprecated.UseString::valueOfdirectly.
-
toEnum
public static <E extends java.lang.Enum<E>> java.util.function.Function<java.lang.String,E> toEnum(java.lang.Class<E> enumType)
Returns aMapthat maps the string representation of an enum to the corresponding enum value by callingEnum.valueOf(Class, String).
-
identity
@Deprecated public static <T> java.util.function.UnaryOperator<T> identity()
Deprecated.UseFunction.identity()instead.Returns an identity map that maps parameter to itself.
-
constant
@Deprecated public static <F,T> java.util.function.Function<F,T> constant(T v)
Deprecated.Usefrom -> todirectly.Returns aMapthat always maps any object tov.
-
map
@Deprecated public static <K,V> java.util.function.Function<K,V> map(java.util.Map<K,V> m)
Deprecated.UseMap::getinstead.Adapts aMaptoMap.
-
toTuple4
@Deprecated public static <A,B,C,D> Map4<A,B,C,D,Tuple4<A,B,C,D>> toTuple4()
Deprecated.
-
-