Documentation of 'jsat.utils.IntSortedSet' Java class
IntSortedSet
jsat.utils

Class IntSortedSet

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<java.lang.Integer>, java.util.Collection<java.lang.Integer>, java.util.Set<java.lang.Integer>, java.util.SortedSet<java.lang.Integer>


    public class IntSortedSet
    extends java.util.AbstractSet<java.lang.Integer>
    implements java.io.Serializable, java.util.SortedSet<java.lang.Integer>
    A utility class for efficiently storing a set of integers. In order to do this, the integers are stored in their natural order.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      IntSortedSet() 
      IntSortedSet(java.util.Collection<java.lang.Integer> collection)
      Creates a set of integers from the given collection
      IntSortedSet(int initialSize) 
      IntSortedSet(java.util.Set<java.lang.Integer> set)
      Creates a new set of integers from the given set
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean add(java.lang.Integer e) 
      java.util.Comparator<? super java.lang.Integer> comparator() 
      boolean contains(int o) 
      boolean contains(java.lang.Object o) 
      java.lang.Integer first() 
      static IntSortedSet from(int... ints)
      Creates a set of integers from the given list of integers.
      java.util.SortedSet<java.lang.Integer> headSet(java.lang.Integer toElement) 
      java.util.Iterator<java.lang.Integer> iterator() 
      java.lang.Integer last() 
      int size() 
      java.util.SortedSet<java.lang.Integer> subSet(java.lang.Integer fromElement, java.lang.Integer toElement) 
      java.util.SortedSet<java.lang.Integer> tailSet(java.lang.Integer fromElement) 
      • Methods inherited from class java.util.AbstractSet

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

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

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.SortedSet

        spliterator
      • Methods inherited from interface java.util.Set

        addAll, clear, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
      • Methods inherited from interface java.util.Collection

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

        forEach
    • Constructor Detail

      • IntSortedSet

        public IntSortedSet(int initialSize)
      • IntSortedSet

        public IntSortedSet(java.util.Set<java.lang.Integer> set)
        Creates a new set of integers from the given set
        Parameters:
        set - the set of integers to create a copy of
      • IntSortedSet

        public IntSortedSet(java.util.Collection<java.lang.Integer> collection)
        Creates a set of integers from the given collection
        Parameters:
        collection - a collection of integers to create a set from
      • IntSortedSet

        public IntSortedSet()
    • Method Detail

      • from

        public static IntSortedSet from(int... ints)
        Creates a set of integers from the given list of integers.
        Parameters:
        ints - a list of integers to create a set from
        Returns:
        a set of integers of all the unique integers in the given list
      • add

        public boolean add(java.lang.Integer e)
        Specified by:
        add in interface java.util.Collection<java.lang.Integer>
        Specified by:
        add in interface java.util.Set<java.lang.Integer>
        Overrides:
        add in class java.util.AbstractCollection<java.lang.Integer>
      • contains

        public boolean contains(int o)
      • contains

        public boolean contains(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<java.lang.Integer>
        Specified by:
        contains in interface java.util.Set<java.lang.Integer>
        Overrides:
        contains in class java.util.AbstractCollection<java.lang.Integer>
      • iterator

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

        public int size()
        Specified by:
        size in interface java.util.Collection<java.lang.Integer>
        Specified by:
        size in interface java.util.Set<java.lang.Integer>
        Specified by:
        size in class java.util.AbstractCollection<java.lang.Integer>
      • comparator

        public java.util.Comparator<? super java.lang.Integer> comparator()
        Specified by:
        comparator in interface java.util.SortedSet<java.lang.Integer>
      • subSet

        public java.util.SortedSet<java.lang.Integer> subSet(java.lang.Integer fromElement,
                                                             java.lang.Integer toElement)
        Specified by:
        subSet in interface java.util.SortedSet<java.lang.Integer>
      • headSet

        public java.util.SortedSet<java.lang.Integer> headSet(java.lang.Integer toElement)
        Specified by:
        headSet in interface java.util.SortedSet<java.lang.Integer>
      • tailSet

        public java.util.SortedSet<java.lang.Integer> tailSet(java.lang.Integer fromElement)
        Specified by:
        tailSet in interface java.util.SortedSet<java.lang.Integer>
      • first

        public java.lang.Integer first()
        Specified by:
        first in interface java.util.SortedSet<java.lang.Integer>
      • last

        public java.lang.Integer last()
        Specified by:
        last in interface java.util.SortedSet<java.lang.Integer>

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.