| Package | Description |
|---|---|
| org.osgl | |
| org.osgl.util |
| Modifier and Type | Class and Description |
|---|---|
static class |
Lang.V1<P1> |
| Modifier and Type | Method and Description |
|---|---|
static <T> Lang.Visitor<T> |
Lang.guardedVisitor(Lang.Function<? super T,Boolean> predicate,
Lang.Visitor<? super T> visitor)
Return a composed visitor function that only applies when the guard predicate test returns
true |
static <T> Lang.Visitor<T> |
Lang.visitor(Lang.Function<? super T,?> f)
Convert a
Function<? super T, Void> function into a Lang.Visitor |
| Modifier and Type | Method and Description |
|---|---|
Lang.Var<T> |
Lang.Var.accept(Lang.Visitor<? super T> visitor) |
Lang.Var<T> |
Lang.Var.acceptLeft(Lang.Visitor<? super T> visitor) |
C.List<T> |
Lang.Var.acceptRight(Lang.Visitor<? super T> visitor) |
Lang.Var<T> |
Lang.Var.each(Lang.Visitor<? super T> visitor) |
Lang.Var<T> |
Lang.Var.forEach(Lang.Visitor<? super T> visitor) |
protected void |
Lang.Var.forEachLeft(Lang.Visitor<? super T> visitor) |
protected void |
Lang.Var.forEachRight(Lang.Visitor<? super T> visitor) |
static <T> Lang.Predicate<T> |
Lang.generalPredicate(Lang.Visitor<? super T> f)
Convert a general
Function<T, ?> typed function to Predicate<T> function. |
static <T> Lang.Visitor<T> |
Lang.guardedVisitor(Lang.Function<? super T,Boolean> predicate,
Lang.Visitor<? super T> visitor)
Return a composed visitor function that only applies when the guard predicate test returns
true |
static <K,T> Lang.IndexedVisitor<K,T> |
Lang.indexGuardedVisitor(Lang.Function<? super K,Boolean> guard,
Lang.Visitor<? super T> visitor) |
void |
Lang.Option.runWith(Lang.Visitor<? super T> consumer) |
Lang.F0<Void> |
Lang.Option.f.runWith(Lang.Visitor<? super T> consumer)
Returns a function that when applied, run
Option#runWith(Visitor) on this Option |
| Modifier and Type | Method and Description |
|---|---|
T |
StrBase.accept(Lang.Visitor<? super Character> visitor) |
LazyRange<ELEMENT> |
LazyRange.accept(Lang.Visitor<? super ELEMENT> visitor) |
C.Range<ELEMENT> |
C.Range.accept(Lang.Visitor<? super ELEMENT> visitor)
Iterate this
Traversable with a visitor function. |
SetBase<T> |
SetBase.accept(Lang.Visitor<? super T> visitor) |
C.Traversable<T> |
TraversableBase.accept(Lang.Visitor<? super T> visitor) |
SequenceBase<T> |
SequenceBase.accept(Lang.Visitor<? super T> visitor) |
C.List<T> |
ListBase.accept(Lang.Visitor<? super T> visitor) |
C.Traversable<T> |
C.Traversable.accept(Lang.Visitor<? super T> visitor)
Iterate this
Traversable with a visitor function. |
C.Sequence<T> |
C.Sequence.accept(Lang.Visitor<? super T> visitor) |
C.ReversibleSequence<T> |
C.ReversibleSequence.accept(Lang.Visitor<? super T> visitor) |
C.List<T> |
C.List.accept(Lang.Visitor<? super T> visitor) |
C.Set<T> |
C.Set.accept(Lang.Visitor<? super T> visitor) |
C.ListOrSet<T> |
C.ListOrSet.accept(Lang.Visitor<? super T> visitor) |
T |
StrBase.acceptLeft(Lang.Visitor<? super Character> visitor) |
LazyRange<ELEMENT> |
LazyRange.acceptLeft(Lang.Visitor<? super ELEMENT> visitor) |
C.Range<ELEMENT> |
C.Range.acceptLeft(Lang.Visitor<? super ELEMENT> visitor)
Iterate through this sequence from head to tail with the visitor function specified
|
C.Sequence<T> |
SequenceBase.acceptLeft(Lang.Visitor<? super T> visitor) |
C.List<T> |
ListBase.acceptLeft(Lang.Visitor<? super T> visitor) |
C.Sequence<T> |
C.Sequence.acceptLeft(Lang.Visitor<? super T> visitor)
Iterate through this sequence from head to tail with the visitor function specified
|
C.ReversibleSequence<T> |
C.ReversibleSequence.acceptLeft(Lang.Visitor<? super T> visitor) |
C.List<T> |
C.List.acceptLeft(Lang.Visitor<? super T> visitor) |
T |
StrBase.acceptRight(Lang.Visitor<? super Character> visitor) |
LazyRange<ELEMENT> |
LazyRange.acceptRight(Lang.Visitor<? super ELEMENT> visitor) |
C.Range<ELEMENT> |
C.Range.acceptRight(Lang.Visitor<? super ELEMENT> visitor)
iterate through the range from tail to head
|
C.List<T> |
ListBase.acceptRight(Lang.Visitor<? super T> visitor) |
C.ReversibleSequence<T> |
C.ReversibleSequence.acceptRight(Lang.Visitor<? super T> visitor)
Iterate through this sequence from tail to head with the visitor function specified
|
C.List<T> |
C.List.acceptRight(Lang.Visitor<? super T> visitor) |
LazyRange<ELEMENT> |
LazyRange.each(Lang.Visitor<? super ELEMENT> visitor) |
C.Range<ELEMENT> |
C.Range.each(Lang.Visitor<? super ELEMENT> visitor) |
SetBase<T> |
SetBase.each(Lang.Visitor<? super T> visitor) |
C.Traversable<T> |
TraversableBase.each(Lang.Visitor<? super T> visitor) |
C.Sequence<T> |
SequenceBase.each(Lang.Visitor<? super T> visitor) |
C.List<T> |
ListBase.each(Lang.Visitor<? super T> visitor) |
C.Traversable<T> |
C.Traversable.each(Lang.Visitor<? super T> visitor)
Alias of
C.Traversable.accept(Lang.Visitor) |
C.Sequence<T> |
C.Sequence.each(Lang.Visitor<? super T> visitor) |
C.ReversibleSequence<T> |
C.ReversibleSequence.each(Lang.Visitor<? super T> visitor) |
C.List<T> |
C.List.each(Lang.Visitor<? super T> visitor) |
C.Set<T> |
C.Set.each(Lang.Visitor<? super T> visitor) |
C.ListOrSet<T> |
C.ListOrSet.each(Lang.Visitor<? super T> visitor) |
static <T> void |
C.forEach(Iterable<? extends T> iterable,
Lang.Visitor<? super T> visitor)
Run visitor function on each element supplied by the iterable.
|
static <T> void |
C.forEach(Iterator<? extends T> iterator,
Lang.Visitor<? super T> visitor)
Run visitor function on each element supplied by the iterator.
|
LazyRange<ELEMENT> |
LazyRange.forEach(Lang.Visitor<? super ELEMENT> visitor) |
C.Range<ELEMENT> |
C.Range.forEach(Lang.Visitor<? super ELEMENT> visitor) |
SetBase<T> |
SetBase.forEach(Lang.Visitor<? super T> visitor)
Sub class could override this method to implement iterating in parallel.
|
TraversableBase<T> |
TraversableBase.forEach(Lang.Visitor<? super T> visitor)
Iterate through this traversal and apply the visitor function specified to each element iterated
|
SequenceBase<T> |
SequenceBase.forEach(Lang.Visitor<? super T> visitor) |
C.List<T> |
ListBase.forEach(Lang.Visitor<? super T> visitor) |
C.Traversable<T> |
C.Traversable.forEach(Lang.Visitor<? super T> visitor)
Alias of
C.Traversable.accept(Lang.Visitor) |
C.Sequence<T> |
C.Sequence.forEach(Lang.Visitor<? super T> visitor) |
C.ReversibleSequence<T> |
C.ReversibleSequence.forEach(Lang.Visitor<? super T> visitor) |
C.List<T> |
C.List.forEach(Lang.Visitor<? super T> visitor) |
C.Set<T> |
C.Set.forEach(Lang.Visitor<? super T> visitor) |
C.ListOrSet<T> |
C.ListOrSet.forEach(Lang.Visitor<? super T> visitor) |
static <T> Lang.F1<Iterable<? extends T>,Void> |
C.F.forEachIterable(Lang.Visitor<? super T> visitor)
Returns a function that apply the visitor function specified on the argument (iterable)
|
protected void |
SequenceBase.forEachLeft(Lang.Visitor<? super T> visitor) |
protected void |
ListBase.forEachLeft(Lang.Visitor<? super T> visitor) |
protected void |
ListBase.forEachRight(Lang.Visitor<? super T> visitor) |
Copyright © 2014–2019 OSGL (Open Source General Library). All rights reserved.