Constructor and Description |
---|
SetBase(int capacity)
Construct a new set with a
SetBase.size of zero and specified initial capacity . |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all values from this set.
|
com.sap.cloud.server.odata.core.UntypedSet |
getUntypedSet()
Return the underlying untyped set.
|
boolean |
isEmpty()
Return
true if this set contains no values. |
int |
size()
Return the number of values in this set.
|
java.lang.String |
toString() |
public SetBase(int capacity)
Construct a new set with a SetBase.size
of zero and specified initial capacity
.
A set can expand in size beyond its initial capacity, but best performance
will be obtained if the initial capacity is close to the set's maximum size.
capacity
- Initial capacity.public void clear()
Remove all values from this set.
public com.sap.cloud.server.odata.core.UntypedSet getUntypedSet()
Return the underlying untyped set. Use with care, avoiding the addition of objects with an incorrect value type.
public boolean isEmpty()
Return true
if this set contains no values.
true
if this set contains no values.public int size()
Return the number of values in this set.
public java.lang.String toString()
toString
in class java.lang.Object