Class BoxedMutableShortSet

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Iterable<java.lang.Short>, java.util.Collection<java.lang.Short>, java.util.Set<java.lang.Short>, MutableCollection<java.lang.Short>, InternalIterable<java.lang.Short>, RichIterable<java.lang.Short>, MutableSet<java.lang.Short>, MutableSetIterable<java.lang.Short>, SetIterable<java.lang.Short>, UnsortedSetIterable<java.lang.Short>

    public class BoxedMutableShortSet
    extends AbstractMutableSet<java.lang.Short>
    implements MutableSet<java.lang.Short>
    A boxed view of a MutableShortSet. This is for scenarios where optimization is not a consideration and therefore no further methods will be optimized.

    This file was automatically generated from template file boxedPrimitiveSet.stg.

    Since:
    12.0
    • Constructor Detail

      • BoxedMutableShortSet

        public BoxedMutableShortSet​(MutableShortSet delegate)
    • Method Detail

      • size

        public int size()
        Description copied from interface: RichIterable
        Returns the number of items in this iterable.
        Specified by:
        size in interface java.util.Collection<java.lang.Short>
        Specified by:
        size in interface RichIterable<java.lang.Short>
        Specified by:
        size in interface java.util.Set<java.lang.Short>
      • getFirst

        public java.lang.Short getFirst()
        Description copied from interface: RichIterable
        Returns the first element of an iterable. In the case of a List it is the element at the first index. In the case of any other Collection, it is the first element that would be returned during an iteration. If the iterable is empty, null is returned. If null is a valid element of the container, then a developer would need to check to see if the iterable is empty to validate that a null result was not due to the container being empty.

        The order of Sets are not guaranteed (except for TreeSets and other Ordered Set implementations), so if you use this method, the first element could be any element from the Set.

        Specified by:
        getFirst in interface RichIterable<java.lang.Short>
      • getLast

        public java.lang.Short getLast()
        Description copied from interface: RichIterable
        Returns the last element of an iterable. In the case of a List it is the element at the last index. In the case of any other Collection, it is the last element that would be returned during an iteration. If the iterable is empty, null is returned. If null is a valid element of the container, then a developer would need to check to see if the iterable is empty to validate that a null result was not due to the container being empty.

        The order of Sets are not guaranteed (except for TreeSets and other Ordered Set implementations), so if you use this method, the last element could be any element from the Set.

        Specified by:
        getLast in interface RichIterable<java.lang.Short>
      • each

        public void each​(Procedure<? super java.lang.Short> procedure)
        Description copied from interface: RichIterable
        The procedure is executed for each element in the iterable.

        Example using a Java 8 lambda expression:

         people.each(person -> LOGGER.info(person.getName()));
         
        This method is a variant of InternalIterable.forEach(Procedure) that has a signature conflict with Iterable.forEach(java.util.function.Consumer).
        Specified by:
        each in interface RichIterable<java.lang.Short>
        See Also:
        InternalIterable.forEach(Procedure), Iterable.forEach(java.util.function.Consumer)
      • add

        public boolean add​(java.lang.Short item)
        Specified by:
        add in interface java.util.Collection<java.lang.Short>
        Specified by:
        add in interface java.util.Set<java.lang.Short>
        Overrides:
        add in class AbstractMutableCollection<java.lang.Short>
      • contains

        public boolean contains​(java.lang.Object object)
        Description copied from interface: RichIterable
        Returns true if the iterable has an element which responds true to element.equals(object).
        Specified by:
        contains in interface java.util.Collection<java.lang.Short>
        Specified by:
        contains in interface RichIterable<java.lang.Short>
        Specified by:
        contains in interface java.util.Set<java.lang.Short>
        Overrides:
        contains in class AbstractRichIterable<java.lang.Short>
      • remove

        public boolean remove​(java.lang.Object object)
        Specified by:
        remove in interface java.util.Collection<java.lang.Short>
        Specified by:
        remove in interface java.util.Set<java.lang.Short>
        Overrides:
        remove in class AbstractMutableCollection<java.lang.Short>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<java.lang.Short>
        Specified by:
        clear in interface java.util.Set<java.lang.Short>
      • hashCode

        public int hashCode()
        Description copied from interface: SetIterable
        Follows the same general contract as Set.hashCode().
        Specified by:
        hashCode in interface java.util.Collection<java.lang.Short>
        Specified by:
        hashCode in interface java.util.Set<java.lang.Short>
        Specified by:
        hashCode in interface SetIterable<java.lang.Short>
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Description copied from interface: SetIterable
        Follows the same general contract as Set.equals(Object).
        Specified by:
        equals in interface java.util.Collection<java.lang.Short>
        Specified by:
        equals in interface java.util.Set<java.lang.Short>
        Specified by:
        equals in interface SetIterable<java.lang.Short>
        Overrides:
        equals in class java.lang.Object
      • iterator

        public java.util.Iterator<java.lang.Short> iterator()
        Specified by:
        iterator in interface java.util.Collection<java.lang.Short>
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.Short>
        Specified by:
        iterator in interface java.util.Set<java.lang.Short>