|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.andrewoma.dexx.collection.internal.base.AbstractTraversable<E>
public abstract class AbstractTraversable<E>
| Constructor Summary | |
|---|---|
AbstractTraversable()
|
|
| Method Summary | ||
|---|---|---|
boolean |
isEmpty()
Returns true if this collection is empty. |
|
String |
makeString(String separator)
Returns this collection converted to a string by joining elements together with the specified separator. |
|
String |
makeString(String separator,
String prefix,
String postfix,
int limit,
String truncated)
Returns this collection converted to a string. |
|
int |
size()
Returns the size of the collection. |
|
|
to(Builder<E,R> builder)
Converts this collection to another collection using a builder. |
|
Object[] |
toArray()
Converts this collection to an array of objects. |
|
E[] |
toArray(E[] array)
Converts this collection to an array of objects of the correct type. |
|
IndexedList<E> |
toIndexedList()
Converts this collection to an indexed list. |
|
Set<E> |
toSet()
Converts this collection to a set. |
|
SortedSet<E> |
toSortedSet(Comparator<? super E> comparator)
Converts this collection to a sorted set. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.github.andrewoma.dexx.collection.Traversable |
|---|
forEach |
| Constructor Detail |
|---|
public AbstractTraversable()
| Method Detail |
|---|
public int size()
TraversableWarning: infinite collections are possible, as are collections that require traversal to calculate the size.
size in interface Traversable<E>
@NotNull
public String makeString(@NotNull
String separator)
Traversableseparator.
makeString in interface Traversable<E>
@NotNull
public String makeString(@NotNull
String separator,
@NotNull
String prefix,
@NotNull
String postfix,
int limit,
@NotNull
String truncated)
Traversable
makeString in interface Traversable<E>separator - Specifies the joining characterprefix - Specifies a prefix to the stringpostfix - Species a postfix to the stringlimit - Specifies the maximum number of elements to join. If the limit is exceeded, additional elements are ignored.truncated - If the limit is reached, the truncated value will be appended to indicate the limit was reached.public String toString()
toString in class Object
@NotNull
public <R extends Traversable<E>> R to(@NotNull
Builder<E,R> builder)
Traversable
to in interface Traversable<E>@NotNull public Set<E> toSet()
Traversable
toSet in interface Traversable<E>@NotNull public SortedSet<E> toSortedSet(Comparator<? super E> comparator)
Traversable
toSortedSet in interface Traversable<E>@NotNull public IndexedList<E> toIndexedList()
Traversable
toIndexedList in interface Traversable<E>public boolean isEmpty()
Traversable
isEmpty in interface Traversable<E>@NotNull public Object[] toArray()
Traversable
toArray in interface Traversable<E>@NotNull public E[] toArray(E[] array)
Traversable
toArray in interface Traversable<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||