|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jparsec.functors.Maps
public final class Maps
Provides common implementations of Map
interface and the variants.
Field Summary | |
---|---|
static Map<String,Integer> |
TO_INTEGER
The Map that maps a String to Integer by calling
Integer.valueOf(String) . |
static Unary<String> |
TO_LOWER_CASE
The Unary that maps a String to lower case using Locale.US . |
static Unary<String> |
TO_UPPER_CASE
The Unary that maps a String to upper case using Locale.US . |
Method Summary | ||
---|---|---|
static
|
constant(T v)
Returns a Map that always maps any object to v . |
|
static
|
identity()
Returns an identity map that maps parameter to itself. |
|
static
|
map(Map<K,V> m)
Adapts a Map to Map . |
|
static
|
mapToString()
A Map instance that maps its parameter to a String by calling
Object.toString() against it. |
|
static
|
toEnum(Class<E> enumType)
Returns a Map that maps the string representation of an enum
to the corresponding enum value by calling Enum.valueOf(Class, String) . |
|
static Unary<String> |
toLowerCase(Locale locale)
Returns a Unary that maps a String to lower case using locale . |
|
static
|
toPair()
A Map2 object that maps 2 values into a Pair object. |
|
static
|
toTuple3()
A Map3 object that maps 3 values to a Tuple3 object. |
|
static
|
toTuple4()
A Map4 object that maps 4 values to a Tuple4 object. |
|
static
|
toTuple5()
A Map5 object that maps 5 values to a Tuple5 object. |
|
static Unary<String> |
toUpperCase(Locale locale)
Returns a Unary that maps a String to upper case using locale . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Map<String,Integer> TO_INTEGER
Map
that maps a String
to Integer
by calling
Integer.valueOf(String)
.
public static Unary<String> TO_LOWER_CASE
Unary
that maps a String
to lower case using Locale.US
.
public static Unary<String> TO_UPPER_CASE
Unary
that maps a String
to upper case using Locale.US
.
Method Detail |
---|
public static Unary<String> toLowerCase(Locale locale)
Unary
that maps a String
to lower case using locale
.
public static Unary<String> toUpperCase(Locale locale)
Unary
that maps a String
to upper case using locale
.
public static <T> Map<T,String> mapToString()
Map
instance that maps its parameter to a String
by calling
Object.toString()
against it.
public static <E extends Enum<E>> Map<String,E> toEnum(Class<E> enumType)
Map
that maps the string representation of an enum
to the corresponding enum value by calling Enum.valueOf(Class, String)
.
public static <T> Unary<T> identity()
public static <F,T> Map<F,T> constant(T v)
Map
that always maps any object to v
.
public static <K,V> Map<K,V> map(Map<K,V> m)
Map
to Map
.
public static <A,B> Map2<A,B,Pair<A,B>> toPair()
Map2
object that maps 2 values into a Pair
object.
public static <A,B,C> Map3<A,B,C,Tuple3<A,B,C>> toTuple3()
Map3
object that maps 3 values to a Tuple3
object.
public static <A,B,C,D> Map4<A,B,C,D,Tuple4<A,B,C,D>> toTuple4()
Map4
object that maps 4 values to a Tuple4
object.
public static <A,B,C,D,E> Map5<A,B,C,D,E,Tuple5<A,B,C,D,E>> toTuple5()
Map5
object that maps 5 values to a Tuple5
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |