public final class Fun extends Object
Modifier and Type | Class and Description |
---|---|
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> |
Modifier and Type | Field and Description |
---|---|
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 |
Modifier and Type | Method and Description |
---|---|
static boolean |
eq(Object a,
Object b)
returns true if all elements are equal, works with nulls
|
static <K,V> Fun.Function1<K,Fun.Tuple2<K,V>> |
extractKey() |
static <K> Fun.Function1<K,K> |
extractNoTransform() |
static <K,V> Fun.Function1<V,Fun.Tuple2<K,V>> |
extractValue() |
static <K2,K1> Iterable<K1> |
filter(NavigableSet<Fun.Tuple2<K2,K1>> secondaryKeys,
K2 secondaryKey)
Find all Primary Keys associated with Secondary Key.
|
static <K2,K1> Iterable<K1> |
filter(NavigableSet<Fun.Tuple2<K2,K1>> secondaryKeys,
K2 lo,
boolean loInc,
K2 hi,
boolean hiInc) |
static <A,B,C> Iterable<C> |
filter(NavigableSet<Fun.Tuple3<A,B,C>> secondaryKeys,
A a,
B b) |
static <A,B,C,D> Iterable<D> |
filter(NavigableSet<Fun.Tuple4<A,B,C,D>> secondaryKeys,
A a,
B b,
C c) |
static <A> A |
HI()
autocast version of `HI`
|
static <A,B> Fun.Tuple2<A,B> |
t2(A a,
B b) |
static <A,B,C> Fun.Tuple3<A,B,C> |
t3(A a,
B b,
C c) |
static <A,B,C,D> Fun.Tuple4<A,B,C,D> |
t4(A a,
B b,
C c,
D d) |
static <A,B,C,D,E> |
t5(A a,
B b,
C c,
D d,
E e) |
static <A,B,C,D,E,F> |
t6(A a,
B b,
C c,
D d,
E e,
F f) |
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
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 frompublic 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)
Copyright © 2016. All rights reserved.