Class ImmutableDomainObjectSet<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<T>
-
- org.gradle.tooling.model.internal.ImmutableDomainObjectSet<T>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<T>
,java.util.Collection<T>
,java.util.Set<T>
,DomainObjectSet<T>
public class ImmutableDomainObjectSet<T> extends java.util.AbstractSet<T> implements DomainObjectSet<T>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ImmutableDomainObjectSet(java.lang.Iterable<? extends T> elements)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<T>
getAll()
Returns the elements of this set in the set's iteration order.T
getAt(int index)
Returns the element at the given index according to the set's iteration order.java.util.Iterator<T>
iterator()
static <T> ImmutableDomainObjectSet<T>
of(java.lang.Iterable<? extends T> elements)
int
size()
-
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
ImmutableDomainObjectSet
public ImmutableDomainObjectSet(java.lang.Iterable<? extends T> elements)
-
-
Method Detail
-
iterator
public java.util.Iterator<T> iterator()
-
size
public int size()
-
getAt
public T getAt(int index) throws java.lang.IndexOutOfBoundsException
Description copied from interface:DomainObjectSet
Returns the element at the given index according to the set's iteration order.- Specified by:
getAt
in interfaceDomainObjectSet<T>
- Parameters:
index
- The index of the element to get.- Returns:
- The element at the given index according to the set's iteration order.
- Throws:
java.lang.IndexOutOfBoundsException
-
getAll
public java.util.List<T> getAll()
Description copied from interface:DomainObjectSet
Returns the elements of this set in the set's iteration order.- Specified by:
getAll
in interfaceDomainObjectSet<T>
- Returns:
- The elements of this set in the set's iteration order.
-
of
public static <T> ImmutableDomainObjectSet<T> of(java.lang.Iterable<? extends T> elements)
-
-