Package openllet.core.utils.intset
Class ArrayIntSet
- java.lang.Object
-
- openllet.core.utils.intset.ArrayIntSet
-
-
Constructor Summary
Constructors Constructor Description ArrayIntSet()ArrayIntSet(int[] others)ArrayIntSet(ArrayIntSet other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int value)Adds a new integer to this set.voidaddAll(IntSet values)Adds all the integers from another set to this set.booleancontains(int value)Checks if the given integer value is in this set.IntSetcopy()Creates a copy of this set.booleanequals(java.lang.Object o)inthashCode()booleanisEmpty()Cehcks if the set is empty.IntIteratoriterator()An iterator over the values of this set.intmax()Returns the maximum integer in this set.intmin()Returns the minimum integer in this set.voidremove(int value)Remove the given integer value from this set.intsize()Returns the number of elements in the set.java.lang.StringtoString()IntSetunion(IntSet values)Creates a new IntSet that is the union of this set and the given set.
-
-
-
Constructor Detail
-
ArrayIntSet
public ArrayIntSet()
-
ArrayIntSet
public ArrayIntSet(ArrayIntSet other)
-
ArrayIntSet
public ArrayIntSet(int[] others)
-
-
Method Detail
-
add
public void add(int value)
Adds a new integer to this set.
-
addAll
public void addAll(IntSet values)
Adds all the integers from another set to this set.
-
contains
public boolean contains(int value)
Checks if the given integer value is in this set.
-
copy
public IntSet copy()
Creates a copy of this set.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
isEmpty
public boolean isEmpty()
Cehcks if the set is empty.
-
iterator
public IntIterator iterator()
An iterator over the values of this set. There is no guarantee on the _order of the elements.
-
max
public int max()
Returns the maximum integer in this set.
-
min
public int min()
Returns the minimum integer in this set.
-
remove
public void remove(int value)
Remove the given integer value from this set.
-
size
public int size()
Returns the number of elements in the set.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-