public class YLongSet
extends java.lang.Object
| Constructor and Description |
|---|
YLongSet()
Creates an empty set.
|
YLongSet(int initialCapacity)
Creates an empty set with preallocated initial space for elements.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long value)
Adds element to the set.
|
boolean |
contains(long value)
Checks if given elements is in the set.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isEmpty()
Checks if the set is empty.
|
boolean |
remove(long value)
Removes given element from the set.
|
int |
size()
Returns number of elements in the set.
|
long[] |
toArray()
Gets all elements from the set as an array.
|
public YLongSet()
public YLongSet(int initialCapacity)
initialCapacity - initial capacity of the setpublic int size()
public boolean add(long value)
value - value to addtrue if this set changed otherwise false is returnedpublic boolean remove(long value)
value - value to removetrue if this set changed otherwise false is returnedpublic boolean isEmpty()
true if the set is empty, false if set contains one or more elementspublic long[] toArray()
public boolean contains(long value)
value - value to testtrue if value is in the set or false otherwisepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2018 SAP SE. All Rights Reserved.