|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjfun.parsec.Maps
public final class Maps
This class provides some standard Map implementations.
Constructor Summary | |
---|---|
Maps()
|
Method Summary | ||
---|---|---|
static
|
cnst(V v)
Creates a map that maps any object to the same object. |
|
static
|
id()
Returns an identity map. |
|
static
|
id(java.lang.Class<R> type)
Returns an identity map. |
|
static
|
id2()
Create a Map2 object that stores the two objects into a Pair object. |
|
static
|
id3()
Create a Map3 object that stores the 3 objects into a Tuple3 object. |
|
static
|
id4()
Create a Map4 object that stores the 4 objects into a Tuple4 object. |
|
static
|
id5()
Create a Map5 object that stores the 5 objects into a Tuple5 object. |
|
static Mapn<java.lang.Object[]> |
idn()
Returns an identity map. |
|
static
|
jmap(java.util.Map<From,To> m)
Adapts a java.util.Map to jfun.util.Map. |
|
static
|
toToken()
Transform a Tok object to the wrapped token object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Maps()
Method Detail |
---|
public static <x> Unary<x> id()
public static <R> Unary<R> id(java.lang.Class<R> type)
type
- the class literal for the type parameter.
public static Mapn<java.lang.Object[]> idn()
public static <x,V> Map<x,V> cnst(V v)
v
- the object that is gonna be returned from the Map.
public static <From,To> Map<From,To> jmap(java.util.Map<From,To> m)
m
- the java.util.Map object.
public static <T> Map<Tok,T> toToken()
public static <A,B> Map2<A,B,Pair<A,B>> id2()
public static <A,B,C> Map3<A,B,C,Tuple3<A,B,C>> id3()
public static <A,B,C,D> Map4<A,B,C,D,Tuple4<A,B,C,D>> id4()
public static <A,B,C,D,E> Map5<A,B,C,D,E,Tuple5<A,B,C,D,E>> id5()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |