Package org.jparsec.functors
Class Maps
- java.lang.Object
-
- org.jparsec.functors.Maps
-
public final class Maps extends java.lang.Object
Provides common implementations ofMap
interface and the variants.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Function<java.lang.String,java.lang.Integer>
TO_INTEGER
Deprecated.UseInteger::valueOf
directly.static java.util.function.UnaryOperator<java.lang.String>
TO_LOWER_CASE
TheUnaryOperator
that maps aString
to lower case usingLocale.US
.static java.util.function.UnaryOperator<java.lang.String>
TO_UPPER_CASE
TheUnaryOperator
that maps aString
to upper case usingLocale.US
.
-
Constructor Summary
Constructors Modifier Constructor Description private
Maps()
-
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 -> to
directly.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::get
instead.static <T> Map<T,java.lang.String>
mapToString()
Deprecated.UseString::valueOf
directly.static <E extends java.lang.Enum<E>>
java.util.function.Function<java.lang.String,E>toEnum(java.lang.Class<E> enumType)
Returns aMap
that 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 aUnaryOperator
that maps aString
to 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 aUnaryOperator
that maps aString
to 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::valueOf
directly.
-
TO_LOWER_CASE
public static java.util.function.UnaryOperator<java.lang.String> TO_LOWER_CASE
TheUnaryOperator
that maps aString
to lower case usingLocale.US
.
-
TO_UPPER_CASE
public static java.util.function.UnaryOperator<java.lang.String> TO_UPPER_CASE
TheUnaryOperator
that maps aString
to upper case usingLocale.US
.
-
-
Method Detail
-
toLowerCase
public static java.util.function.UnaryOperator<java.lang.String> toLowerCase(java.util.Locale locale)
Returns aUnaryOperator
that maps aString
to lower case usinglocale
.
-
toUpperCase
public static java.util.function.UnaryOperator<java.lang.String> toUpperCase(java.util.Locale locale)
Returns aUnaryOperator
that maps aString
to upper case usinglocale
.
-
mapToString
@Deprecated public static <T> Map<T,java.lang.String> mapToString()
Deprecated.UseString::valueOf
directly.
-
toEnum
public static <E extends java.lang.Enum<E>> java.util.function.Function<java.lang.String,E> toEnum(java.lang.Class<E> enumType)
Returns aMap
that 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 -> to
directly.Returns aMap
that 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::get
instead.Adapts aMap
toMap
.
-
toTuple4
@Deprecated public static <A,B,C,D> Map4<A,B,C,D,Tuple4<A,B,C,D>> toTuple4()
Deprecated.
-
-