jfun.parsec
public final class Maps extends Object
Method Summary | |
---|---|
static <x,V> Map<x,V> | cnst(V v)
Creates a map that maps any object to the same object. |
static <x> Unary<x> | id()
Returns an identity map. map a = a. |
static <R> Unary<R> | id(Class<R> type)
Returns an identity map. map a = a. |
static <A,B> Map2<A,B,Pair<A,B>> | id2()
Create a Map2 object that stores the two objects into a Pair object. |
static <A,B,C> Map3<A,B,C,Tuple3<A,B,C>> | id3()
Create a Map3 object that stores the 3 objects into a Tuple3 object. |
static <A,B,C,D> Map4<A,B,C,D,Tuple4<A,B,C,D>> | id4()
Create a Map4 object that stores the 4 objects into a Tuple4 object. |
static <A,B,C,D,E> Map5<A,B,C,D,E,Tuple5<A,B,C,D,E>> | id5()
Create a Map5 object that stores the 5 objects into a Tuple5 object. |
static Mapn<Object[]> | idn()
Returns an identity map. map a = a. |
static <From,To> Map<From,To> | jmap(Map<From,To> m)
Adapts a java.util.Map to jfun.util.Map. |
static <T> Map<Tok,T> | toToken()
Transform a Tok object to the wrapped token object. |
Parameters: v the object that is gonna be returned from the Map.
Returns: the Map instance.
Returns: the Map instance.
Parameters: type the class literal for the type parameter.
Returns: the Map instance.
Returns: the Mapn instance.
Parameters: m the java.util.Map object.
Returns: the jfun.util.Map instance.
Returns: the Map instance.