public class IntSetFixedSize extends AbstractSet<Integer> implements Serializable
Constructor and Description |
---|
IntSetFixedSize(int size)
Creates a new fixed size int set
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(int e)
Adds a new integer into the set
|
boolean |
add(Integer e) |
boolean |
contains(int val)
Checks if the given value is contained in this set
|
boolean |
contains(Object o) |
Iterator<Integer> |
iterator() |
boolean |
remove(int val)
Removes the specified integer from the set
|
boolean |
remove(Object o) |
int |
size() |
equals, hashCode, removeAll
addAll, clear, containsAll, isEmpty, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, clear, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public IntSetFixedSize(int size)
size
- the size of the int setpublic boolean add(Integer e)
add
in interface Collection<Integer>
add
in interface Set<Integer>
add
in class AbstractCollection<Integer>
public boolean add(int e)
e
- the value to add into the settrue
if the operation modified the set, false
otherwise.public boolean remove(Object o)
remove
in interface Collection<Integer>
remove
in interface Set<Integer>
remove
in class AbstractCollection<Integer>
public boolean remove(int val)
val
- the value to removetrue
if the set was modified by this operation,
false
if it was not.public boolean contains(Object o)
contains
in interface Collection<Integer>
contains
in interface Set<Integer>
contains
in class AbstractCollection<Integer>
public boolean contains(int val)
val
- the value to check fortrue
if the value is in the set, false
otherwise.public int size()
size
in interface Collection<Integer>
size
in interface Set<Integer>
size
in class AbstractCollection<Integer>
Copyright © 2017. All rights reserved.