Package org.midheaven.collections
Class SequenceBuilder
java.lang.Object
org.midheaven.collections.SequenceBuilder
Builder for Sequence instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioneditable()Performs editable.<U> Sequence<U> empty()Returns an empty instance.<T> Sequence<T> Create aSequencewith elements from the given iterable<T> Sequence<T> immutable(EditableSequence<T> origin) Returns aSequencethat does not inherit fromEditableSequence<U> Sequence<U> of(U value) Creates an instance from the provided value.<U> Sequence<U> of(U[] values) Creates an instance from the provided value.<U> Sequence<U> of(U a, U b, U... others) Creates an instance from the provided value.<U> Sequence<U> repeat(U value) Performs repeat.Performs resizable.withSize(long size) Performs withSize.
-
Constructor Details
-
SequenceBuilder
public SequenceBuilder()
-
-
Method Details
-
withSize
Performs withSize.- Parameters:
size- the size value- Returns:
- the result of withSize
-
editable
Performs editable.- Returns:
- the result of editable
-
resizable
Performs resizable.- Returns:
- the result of resizable
-
empty
Returns an empty instance.- Returns:
- the result of empty
-
of
Creates an instance from the provided value.- Parameters:
value- the value value- Returns:
- the result of of
-
of
Creates an instance from the provided value.- Parameters:
a- the a valueb- the b valueothers- the others value- Returns:
- the result of of
-
of
Creates an instance from the provided value.- Parameters:
values- the values value- Returns:
- the result of of
-
repeat
Performs repeat.- Parameters:
value- the value value- Returns:
- the result of repeat
-
immutable
Returns aSequencethat does not inherit fromEditableSequence- Type Parameters:
T-- Parameters:
origin-- Returns:
-
from
Create aSequencewith elements from the given iterable- Type Parameters:
T-- Parameters:
origin-- Returns:
-