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

Class IntSetFixedSize

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


    public class IntSetFixedSize
    extends java.util.AbstractSet<java.lang.Integer>
    implements java.io.Serializable
    A set for integers that is of a fixed initial size, and can only accept integers in the range [0, size). Insertions, removals, and checks are all constant time with a fast iterator.
    Null values are not supported
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      IntSetFixedSize(int size)
      Creates a new fixed size int set
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean add(int e)
      Adds a new integer into the set
      boolean add(java.lang.Integer e) 
      boolean contains(int val)
      Checks if the given value is contained in this set
      boolean contains(java.lang.Object o) 
      java.util.Iterator<java.lang.Integer> iterator() 
      boolean remove(int val)
      Removes the specified integer from the set
      boolean remove(java.lang.Object o) 
      int size() 
      • Methods inherited from class java.util.AbstractSet

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

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

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

        addAll, clear, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
      • Methods inherited from interface java.util.Collection

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

        forEach
    • Constructor Detail

      • IntSetFixedSize

        public IntSetFixedSize(int size)
        Creates a new fixed size int set
        Parameters:
        size - the size of the int set
    • Method Detail

      • 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>
      • add

        public boolean add(int e)
        Adds a new integer into the set
        Parameters:
        e - the value to add into the set
        Returns:
        true if the operation modified the set, false otherwise.
      • remove

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

        public boolean remove(int val)
        Removes the specified integer from the set
        Parameters:
        val - the value to remove
        Returns:
        true if the set was modified by this operation, false if it was not.
      • 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>
      • contains

        public boolean contains(int val)
        Checks if the given value is contained in this set
        Parameters:
        val - the value to check for
        Returns:
        true if the value is in the set, false otherwise.
      • 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>

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.