@JsType(name="WeakSet",
isNative=true,
namespace="<global>")
public class JsWeakSet<T>
extends java.lang.Object
| Constructor and Description |
|---|
JsWeakSet()
The WeakSet constructor lets you create WeakSet objects that store weakly held objects in a collection.
|
JsWeakSet(JsIterable<T> values)
The WeakSet constructor lets you create WeakSet objects that store weakly held objects in a collection.
|
JsWeakSet(T[] values)
The WeakSet constructor lets you create WeakSet objects that store weakly held objects in a collection.
|
| Modifier and Type | Method and Description |
|---|---|
JsWeakSet<T> |
add(T value)
The add() method appends a new object to the end of a WeakSet object.
|
boolean |
delete(T value)
The delete() method removes the specified element from a WeakSet object.
|
boolean |
has(T value)
The has() method returns a boolean indicating whether an object exists in a WeakSet or not.
|
public JsWeakSet()
public JsWeakSet(@Nonnull
JsIterable<T> values)
values - the iterable that will have all of it's elements added to the WeakSet.public JsWeakSet(@Nonnull
T[] values)
values - the array that will have all of it's elements added to the WeakSet.@Nonnull public JsWeakSet<T> add(@Nonnull T value)
value - the object to add to the WeakSet collection.public boolean delete(@Nonnull
T value)
value - the object remove from the WeakSet object.public boolean has(@Nonnull
T value)
value - the object to test for presence in the WeakSet.