Class 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.AbstractSet

        equals, hashCode, removeAll
      • Methods inherited from class java.util.AbstractCollection

        add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Set

        add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, spliterator, toArray, toArray
    • Constructor Detail

      • ImmutableDomainObjectSet

        public ImmutableDomainObjectSet​(java.lang.Iterable<? extends T> elements)
    • Method Detail

      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Specified by:
        iterator in interface java.util.Set<T>
        Specified by:
        iterator in class java.util.AbstractCollection<T>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<T>
        Specified by:
        size in interface java.util.Set<T>
        Specified by:
        size in class java.util.AbstractCollection<T>
      • 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 interface DomainObjectSet<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 interface DomainObjectSet<T>
        Returns:
        The elements of this set in the set's iteration order.