Modifier and Type | Class and Description |
---|---|
static class |
La.ComparableComparator<B extends Comparable<B>> |
class |
La.FilterIterator<D extends T> |
static class |
La.LaComparator<A,B> |
class |
La.TransformIterator<D extends T> |
Modifier | Constructor and Description |
---|---|
protected |
La() |
protected |
La(Class<R> rClass)
Use this constructor to have class-aware instance, which is needed only for
few methods like
array(java.util.Collection<? extends T>) . |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(T value) |
static <T,R> La<T,R> |
adapt(Function<T,R> f) |
<C extends Collection<R>> |
addTo(Collection<? extends T> from,
C to,
boolean acceptFalsy) |
<C extends Collection<R>> |
addTo(Iterator<? extends T> from,
C to,
boolean acceptFalsy) |
La<T,Boolean> |
and(La<? super T,?> second) |
boolean |
any(Iterable<? extends T> sequence) |
<A> La<A,R> |
apply(La<A,? extends T> f) |
R |
apply(T from) |
R[] |
array(Collection<? extends T> from) |
R[] |
array(Collection<? extends T> from,
boolean acceptFalsy) |
List<R> |
arrayList(Collection<? extends T> from) |
List<R> |
arrayList(Collection<? extends T> from,
boolean acceptFalsy) |
List<R> |
arrayList(Iterator<? extends T> from) |
List<R> |
arrayList(Iterator<? extends T> from,
boolean acceptFalsy) |
List<R> |
arrayList(T... from) |
static <T> La<Object,T> |
cast(Class<T> clazz) |
Comparator<T> |
comparator(Comparator<? super R> comparator) |
static <A,B extends Comparable<B>> |
comparator(La<A,B> function) |
static <A,B,C> La<A,C> |
compose(La<B,C> g,
La<A,? extends B> f) |
static <T,R> La<T,R> |
constant(R result) |
static <T> La<T,Boolean> |
constantFalse() |
static <T> La<T,Boolean> |
constantTrue() |
<D extends T> |
filter(Iterable<D> collection) |
<D extends T> |
filter(Iterator<D> iterator) |
<D extends T> |
filterIterable(Iterable<D> iterable) |
<X extends T> |
find(Collection<X> collection,
R sample) |
static <T,R> La<T,R> |
fromMap(Map<? super T,? extends R> map,
Class<R> rClass) |
<C extends T> |
hashMap(Collection<C> collection) |
<V,C extends T> |
hashMap(Collection<C> collection,
La<? super C,V> valueFunction) |
HashSet<R> |
hashSet(Collection<? extends T> from) |
Collection<R> |
image(Collection<T> set) |
static <T> La<T,Boolean> |
inCollection(Collection<T> collection) |
int |
indexOf(List<? extends T> list,
R sample) |
static <T> La<T,Boolean> |
instanceOf(Class<? extends T> instanceClass) |
static <T> IntList |
intList(Collection<T> collection,
La<? super T,Integer> la) |
static <T> La<T,Boolean> |
isEqual(T value) |
Iterable<R> |
iterable(Iterable<? extends T> from) |
Iterator<R> |
iterator(Iterable<? extends T> from) |
abstract R |
la(T argument) |
int |
lastIndexOf(List<? extends T> list,
R sample) |
<C extends Iterable<? extends T>> |
liftToList() |
<V,C extends T> |
linkedHashMap(Collection<C> collection,
La<? super C,V> valueFunction) |
LinkedHashSet<R> |
linkedHashSet(Collection<? extends T> from) |
static <T> LongList |
longList(Collection<T> collection,
La<? super T,Long> la) |
Map<R,T> |
mapInto(Collection<? extends T> fromCollection,
Map<R,T> toMap) |
<V,C extends T> |
mapInto(Collection<C> fromCollection,
Map<R,V> toMap,
La<? super C,? extends V> valueFunction) |
La<T,R> |
memoize() |
La<T,R> |
memoizeConcurrent() |
La<T,Boolean> |
not() |
static <T> La<T,Boolean> |
notNull() |
static <A,B> La<A,B> |
notNull(La<A,B> la,
B onNull) |
static <T> La<T,T> |
self() |
static <T> La<T,String> |
stringValue() |
<A> La<T,A> |
supply(La<? super R,A> g) |
boolean |
test(T input) |
<D extends T> |
transform(Iterator<D> iterator) |
<D extends T> |
transformIterable(Iterable<D> iterable) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, compose, identity
and, negate, or
protected La()
protected La(Class<R> rClass)
array(java.util.Collection<? extends T>)
.rClass
- the class of the result@NotNull public static <T,R> La<T,R> constant(R result)
@NotNull public static <T> La<T,Boolean> inCollection(@Nullable Collection<T> collection)
@NotNull public static <T> La<T,Boolean> instanceOf(@Nullable Class<? extends T> instanceClass)
@NotNull public static <T> La<T,T> self()
@NotNull public static <T,R> La<T,R> fromMap(Map<? super T,? extends R> map, Class<R> rClass)
@NotNull public <D extends T> Iterable<D> filterIterable(@Nullable Iterable<D> iterable)
public boolean accepts(T value)
@NotNull public HashSet<R> hashSet(@Nullable Collection<? extends T> from)
@NotNull public LinkedHashSet<R> linkedHashSet(@Nullable Collection<? extends T> from)
public List<R> arrayList(@Nullable Collection<? extends T> from)
@NotNull public List<R> arrayList(@Nullable Collection<? extends T> from, boolean acceptFalsy)
@NotNull public static <T> LongList longList(@Nullable Collection<T> collection, @NotNull La<? super T,Long> la)
@NotNull public static <T> IntList intList(@Nullable Collection<T> collection, @NotNull La<? super T,Integer> la)
@NotNull public <C extends Collection<R>> C addTo(@Nullable Collection<? extends T> from, @NotNull C to, boolean acceptFalsy)
@NotNull public <C extends Collection<R>> C addTo(@Nullable Iterator<? extends T> from, @NotNull C to, boolean acceptFalsy)
@NotNull public R[] array(@Nullable Collection<? extends T> from)
@NotNull public R[] array(@Nullable Collection<? extends T> from, boolean acceptFalsy)
@NotNull public Map<R,T> mapInto(@Nullable Collection<? extends T> fromCollection, @NotNull Map<R,T> toMap)
@NotNull public <V,C extends T> Map<R,V> mapInto(@Nullable Collection<C> fromCollection, @NotNull Map<R,V> toMap, @NotNull La<? super C,? extends V> valueFunction)
@NotNull public <C extends T> Map<R,C> hashMap(@Nullable Collection<C> collection)
@NotNull public <V,C extends T> Map<R,V> hashMap(@Nullable Collection<C> collection, @NotNull La<? super C,V> valueFunction)
@NotNull public <V,C extends T> Map<R,V> linkedHashMap(@Nullable Collection<C> collection, @NotNull La<? super C,V> valueFunction)
@Nullable public <X extends T> X find(@Nullable Collection<X> collection, R sample)
public Comparator<T> comparator(Comparator<? super R> comparator)
public static <A,B extends Comparable<B>> Comparator<A> comparator(La<A,B> function)
public Collection<R> image(Collection<T> set)
Copyright © 2024 Tempo Software. All Rights Reserved.