|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mapdb.Fun
public final class Fun
Functional stuff. Tuples, function, callback methods etc..
| Nested Class Summary | |
|---|---|
static class |
Fun.ArrayComparator
compares two arrays using given comparators |
static interface |
Fun.Function0<R>
|
static interface |
Fun.Function1<R,A>
|
static interface |
Fun.Function2<R,A,B>
|
static class |
Fun.Tuple2<A,B>
|
static class |
Fun.Tuple2Comparator<A,B>
|
static class |
Fun.Tuple3<A,B,C>
|
static class |
Fun.Tuple3Comparator<A,B,C>
|
static class |
Fun.Tuple4<A,B,C,D>
|
static class |
Fun.Tuple4Comparator<A,B,C,D>
|
static class |
Fun.Tuple5<A,B,C,D,E>
|
static class |
Fun.Tuple5Comparator<A,B,C,D,E>
|
static class |
Fun.Tuple6<A,B,C,D,E,F>
|
static class |
Fun.Tuple6Comparator<A,B,C,D,E,F>
|
| Field Summary | |
|---|---|
static Comparator<byte[]> |
BYTE_ARRAY_COMPARATOR
|
static Comparator<char[]> |
CHAR_ARRAY_COMPARATOR
|
static Comparator<Object[]> |
COMPARABLE_ARRAY_COMPARATOR
Compares two arrays which contains comparable elements |
static Comparator |
COMPARATOR
|
static Comparator<double[]> |
DOUBLE_ARRAY_COMPARATOR
|
static Iterator |
EMPTY_ITERATOR
empty iterator (note: Collections.EMPTY_ITERATOR is Java 7 specific and should not be used) |
static Object |
HI
positive infinity object. |
static Comparator<int[]> |
INT_ARRAY_COMPARATOR
|
static Comparator<long[]> |
LONG_ARRAY_COMPARATOR
|
static Comparator<Comparable> |
REVERSE_COMPARATOR
|
static Comparator<Fun.Tuple2> |
TUPLE2_COMPARATOR
|
static Comparator<Fun.Tuple3> |
TUPLE3_COMPARATOR
|
static Comparator<Fun.Tuple4> |
TUPLE4_COMPARATOR
|
static Comparator<Fun.Tuple5> |
TUPLE5_COMPARATOR
|
static Comparator<Fun.Tuple6> |
TUPLE6_COMPARATOR
|
| Method Summary | ||
|---|---|---|
static boolean |
eq(Object a,
Object b)
returns true if all elements are equal, works with nulls |
|
static
|
extractKey()
|
|
static
|
extractNoTransform()
|
|
static
|
extractValue()
|
|
static
|
filter(NavigableSet<Fun.Tuple2<K2,K1>> secondaryKeys,
K2 secondaryKey)
Find all Primary Keys associated with Secondary Key. |
|
static
|
filter(NavigableSet<Fun.Tuple2<K2,K1>> secondaryKeys,
K2 lo,
boolean loInc,
K2 hi,
boolean hiInc)
|
|
static
|
filter(NavigableSet<Fun.Tuple3<A,B,C>> secondaryKeys,
A a,
B b)
|
|
static
|
filter(NavigableSet<Fun.Tuple4<A,B,C,D>> secondaryKeys,
A a,
B b,
C c)
|
|
static
|
HI()
autocast version of `HI` |
|
static
|
t2(A a,
B b)
|
|
static
|
t3(A a,
B b,
C c)
|
|
static
|
t4(A a,
B b,
C c,
D d)
|
|
static
|
t5(A a,
B b,
C c,
D d,
E e)
|
|
static
|
t6(A a,
B b,
C c,
D d,
E e,
F f)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Comparator COMPARATOR
public static final Comparator<Comparable> REVERSE_COMPARATOR
public static final Iterator EMPTY_ITERATOR
public static final Comparator<Fun.Tuple2> TUPLE2_COMPARATOR
public static final Comparator<Fun.Tuple3> TUPLE3_COMPARATOR
public static final Comparator<Fun.Tuple4> TUPLE4_COMPARATOR
public static final Comparator<Fun.Tuple5> TUPLE5_COMPARATOR
public static final Comparator<Fun.Tuple6> TUPLE6_COMPARATOR
public static final Object HI
public static final Comparator<byte[]> BYTE_ARRAY_COMPARATOR
public static final Comparator<char[]> CHAR_ARRAY_COMPARATOR
public static final Comparator<int[]> INT_ARRAY_COMPARATOR
public static final Comparator<long[]> LONG_ARRAY_COMPARATOR
public static final Comparator<double[]> DOUBLE_ARRAY_COMPARATOR
public static final Comparator<Object[]> COMPARABLE_ARRAY_COMPARATOR
| Method Detail |
|---|
public static <A> A HI()
public static <A,B> Fun.Tuple2<A,B> t2(A a,
B b)
public static <A,B,C> Fun.Tuple3<A,B,C> t3(A a,
B b,
C c)
public static <A,B,C,D> Fun.Tuple4<A,B,C,D> t4(A a,
B b,
C c,
D d)
public static <A,B,C,D,E> Fun.Tuple5<A,B,C,D,E> t5(A a,
B b,
C c,
D d,
E e)
public static <A,B,C,D,E,F> Fun.Tuple6<A,B,C,D,E,F> t6(A a,
B b,
C c,
D d,
E e,
F f)
public static boolean eq(Object a,
Object b)
public static <K,V> Fun.Function1<K,Fun.Tuple2<K,V>> extractKey()
public static <K,V> Fun.Function1<V,Fun.Tuple2<K,V>> extractValue()
public static <K> Fun.Function1<K,K> extractNoTransform()
public static <K2,K1> Iterable<K1> filter(NavigableSet<Fun.Tuple2<K2,K1>> secondaryKeys,
K2 secondaryKey)
Bind.mapInverse(org.mapdb.Bind.MapWithModificationListener, java.util.Set)
and Bind.secondaryKey(org.mapdb.Bind.MapWithModificationListener, java.util.Set, org.mapdb.Fun.Function2)
It can by also used to find values from 'MultiMap'.
secondaryKeys - Secondary Set or 'MultiMap' to find values insecondaryKey - key to look from
public static <K2,K1> Iterable<K1> filter(NavigableSet<Fun.Tuple2<K2,K1>> secondaryKeys,
K2 lo,
boolean loInc,
K2 hi,
boolean hiInc)
public static <A,B,C> Iterable<C> filter(NavigableSet<Fun.Tuple3<A,B,C>> secondaryKeys,
A a,
B b)
public static <A,B,C,D> Iterable<D> filter(NavigableSet<Fun.Tuple4<A,B,C,D>> secondaryKeys,
A a,
B b,
C c)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||