Top Description Methods
org.eclipse.collections.api

public Interface PrimitiveIterable

Known Direct Subinterfaces
org.eclipse.collections.api.ShortIterable, org.eclipse.collections.api.BooleanIterable, org.eclipse.collections.api.ByteIterable, org.eclipse.collections.api.CharIterable, org.eclipse.collections.api.DoubleIterable, org.eclipse.collections.api.FloatIterable, org.eclipse.collections.api.IntIterable, org.eclipse.collections.api.LongIterable

PrimitiveIterable includes API that is common to all primitive collections.
Since
3.0

Method Summary

Modifier and TypeMethod and Description
public default void
appendString(Appendable appendable)

Prints a string representation of this collection onto the given Appendable.

public default void
appendString(Appendable appendable, String separator)

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String start, String separator, String end)

Prints a string representation of this collection onto the given Appendable.

public default boolean
isEmpty()

Returns true if this iterable has zero items.

public default String

Returns:

a string representation of this collection.
makeString
()

Returns a string representation of this collection by delegating to makeString(String) and defaulting the separator parameter to the characters ", " (comma and space).

public default String

Returns:

a string representation of this collection.
makeString
(String separator)

Returns a string representation of this collection by delegating to makeString(String, String, String) and defaulting the start and end parameters to "" (the empty String).

public default String

Returns:

a string representation of this collection.
makeString
(String start, String separator, String end)

Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.

public default boolean
notEmpty()

The English equivalent of !this.isEmpty()

public int
size()

Returns the number of items in this iterable.

public String

Returns:

a string representation of this PrimitiveIterable
toString
()

Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets.

Method Detail

appendStringback to summary
public default void appendString(Appendable appendable)

Prints a string representation of this collection onto the given Appendable. Prints the string returned by makeString().

Since
3.0
appendStringback to summary
public default void appendString(Appendable appendable, String separator)

Prints a string representation of this collection onto the given Appendable. Prints the string returned by makeString(String).

Since
3.0
appendStringback to summary
public void appendString(Appendable appendable, String start, String separator, String end)

Prints a string representation of this collection onto the given Appendable. Prints the string returned by makeString(String, String, String).

Since
3.0
isEmptyback to summary
public default boolean isEmpty()

Returns true if this iterable has zero items.

Since
3.0
makeStringback to summary
public default String makeString()

Returns a string representation of this collection by delegating to makeString(String) and defaulting the separator parameter to the characters ", " (comma and space).

Returns:String

a string representation of this collection.

Since
3.0
makeStringback to summary
public default String makeString(String separator)

Returns a string representation of this collection by delegating to makeString(String, String, String) and defaulting the start and end parameters to "" (the empty String).

Returns:String

a string representation of this collection.

Since
3.0
makeStringback to summary
public default String makeString(String start, String separator, String end)

Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.

Returns:String

a string representation of this collection.

Since
3.0
notEmptyback to summary
public default boolean notEmpty()

The English equivalent of !this.isEmpty()

Since
3.0
sizeback to summary
public int size()

Returns the number of items in this iterable.

Since
3.0
toStringback to summary
public String toString()

Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets.

Assert.assertEquals("[]", IntLists.mutable.empty().toString());
Assert.assertEquals("[1]", IntLists.mutable.with(1).toString());
Assert.assertEquals("[1, 2, 3]", IntLists.mutable.with(1, 2, 3).toString());
Returns:String

a string representation of this PrimitiveIterable

Annotations
@Override
See Also
java.util.AbstractCollection#toString()