|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
Hashed ArrayList implementation of the List and Collection interface. More...
Public Member Functions | |
| ArrayHashSet (final boolean supportNullValue, final int initialCapacity, final float loadFactor) | |
| ArrayHashSet (final ArrayHashSet< E > o) | |
| final boolean | supportsNullValue () |
Returns true for default behavior, i.e. More... | |
| final Object | clone () |
| final ArrayList< E > | getData () |
| Returns this object ordered ArrayList. More... | |
| final HashMap< E, E > | getMap () |
| Returns this object hash map. More... | |
| final String | toString () |
| final void | clear () |
| final boolean | add (final E element) throws NullPointerException |
| Add element at the end of this list, if it is not contained yet. More... | |
| final boolean | remove (final Object element) throws NullPointerException |
| Remove element from this list. More... | |
| final boolean | addAll (final Collection<? extends E > c) |
Add all elements of given java.util.Collection at the end of this list. More... | |
| final boolean | contains (final Object element) |
| Test for containment This is an O(1) operation. More... | |
| final boolean | containsAll (final Collection<?> c) |
Test for containment of given java.util.Collection This is an O(n) operation, over the given Collection size. More... | |
| final boolean | removeAll (final Collection<?> c) |
Remove all elements of given java.util.Collection from this list. More... | |
| final boolean | retainAll (final Collection<?> c) |
Retain all elements of the given java.util.Collection c, ie remove all elements not contained by the given java.util.Collection c. More... | |
| final boolean | equals (final Object arrayHashSet) |
| This is an O(n) operation. More... | |
| final int | hashCode () |
| This is an O(n) operation over the size of this list. More... | |
| final boolean | isEmpty () |
| final Iterator< E > | iterator () |
| final int | size () |
| final Object[] | toArray () |
| final< T > T[] | toArray (final T[] a) |
| final E | get (final int index) |
| final int | indexOf (final Object element) |
| final void | add (final int index, final E element) throws IllegalArgumentException, NullPointerException |
| Add element at the given index in this list, if it is not contained yet. More... | |
| final boolean | addAll (final int index, final Collection<? extends E > c) throws UnsupportedOperationException |
| final E | set (final int index, final E element) |
| final E | remove (final int index) |
| Remove element at given index from this list. More... | |
| final int | lastIndexOf (final Object o) |
Since this list is unique, equivalent to indexOf(java.lang.Object). More... | |
| final ListIterator< E > | listIterator () |
| final ListIterator< E > | listIterator (final int index) |
| final List< E > | subList (final int fromIndex, final int toIndex) |
| final ArrayList< E > | toArrayList () |
| final E | get (final Object element) |
| Identity method allowing to get the identical object, using the internal hash map. More... | |
| final E | getOrAdd (final E element) throws NullPointerException |
| Identity method allowing to get the identical object, using the internal hash map. More... | |
| final boolean | containsSafe (final Object element) |
| Test for containment This is an O(n) operation, using equals operation over the list. More... | |
Static Public Attributes | |
| static final float | DEFAULT_LOAD_FACTOR = 0.75f |
| Default load factor: {@value}. More... | |
| static final int | DEFAULT_INITIAL_CAPACITY = 16 |
| The default initial capacity: {@value}. More... | |
Hashed ArrayList implementation of the List and Collection interface.
Implementation properties are:
java.lang.Object#hashCode() for O(1) operations, see below. java.util.List functionality, ie java.util.List#indexOf(java.lang.Object) and java.util.List#get(int), hence object identity can be implemented. get(java.lang.Object) O(1) operations:
O(n) operations:
For thread safety, the application shall decorate access to instances via com.jogamp.common.util.locks.RecursiveLock.
Definition at line 68 of file ArrayHashSet.java.
| com.jogamp.common.util.ArrayHashSet< E >.ArrayHashSet | ( | final boolean | supportNullValue, |
| final int | initialCapacity, | ||
| final float | loadFactor | ||
| ) |
| supportNullValue | Use true for default behavior, i.e. null can be a valid value. Use false if null is not a valid value, here remove(E) and getOrAdd(Object) will be optimized. |
| initialCapacity | use DEFAULT_INITIAL_CAPACITY for default |
| loadFactor | use DEFAULT_LOAD_FACTOR for default |
Definition at line 93 of file ArrayHashSet.java.
| com.jogamp.common.util.ArrayHashSet< E >.ArrayHashSet | ( | final ArrayHashSet< E > | o | ) |
Definition at line 102 of file ArrayHashSet.java.
| final boolean com.jogamp.common.util.ArrayHashSet< E >.add | ( | final E | element | ) | throws NullPointerException |
Add element at the end of this list, if it is not contained yet.
This is an O(1) operation
| NullPointerException | if element is null but supportsNullValue() == false |
Definition at line 161 of file ArrayHashSet.java.
| final void com.jogamp.common.util.ArrayHashSet< E >.add | ( | final int | index, |
| final E | element | ||
| ) | throws IllegalArgumentException, NullPointerException |
Add element at the given index in this list, if it is not contained yet.
This is an O(1) operation
| IllegalArgumentException | if the given element was already contained |
| NullPointerException | if element is null but supportsNullValue() == false |
Definition at line 398 of file ArrayHashSet.java.
| final boolean com.jogamp.common.util.ArrayHashSet< E >.addAll | ( | final Collection<? extends E > | c | ) |
Add all elements of given java.util.Collection at the end of this list.
This is an O(n) operation, over the given Collection size.
Definition at line 228 of file ArrayHashSet.java.
| final boolean com.jogamp.common.util.ArrayHashSet< E >.addAll | ( | final int | index, |
| final Collection<? extends E > | c | ||
| ) | throws UnsupportedOperationException |
| UnsupportedOperationException |
Definition at line 420 of file ArrayHashSet.java.
| final void com.jogamp.common.util.ArrayHashSet< E >.clear | ( | ) |
Definition at line 143 of file ArrayHashSet.java.
| final Object com.jogamp.common.util.ArrayHashSet< E >.clone | ( | ) |
Definition at line 126 of file ArrayHashSet.java.
| final boolean com.jogamp.common.util.ArrayHashSet< E >.contains | ( | final Object | element | ) |
Test for containment
This is an O(1) operation.
Definition at line 248 of file ArrayHashSet.java.
| final boolean com.jogamp.common.util.ArrayHashSet< E >.containsAll | ( | final Collection<?> | c | ) |
Test for containment of given java.util.Collection
This is an O(n) operation, over the given Collection size.
Definition at line 264 of file ArrayHashSet.java.
| final boolean com.jogamp.common.util.ArrayHashSet< E >.containsSafe | ( | final Object | element | ) |
Test for containment
This is an O(n) operation, using equals operation over the list.
You may utilize this method to verify your hash values,
ie contains(java.lang.Object) and containsSafe(java.lang.Object) shall have the same result.
Definition at line 555 of file ArrayHashSet.java.
| final boolean com.jogamp.common.util.ArrayHashSet< E >.equals | ( | final Object | arrayHashSet | ) |
This is an O(n) operation.
Definition at line 326 of file ArrayHashSet.java.
| final E com.jogamp.common.util.ArrayHashSet< E >.get | ( | final int | index | ) |
Definition at line 377 of file ArrayHashSet.java.
| final E com.jogamp.common.util.ArrayHashSet< E >.get | ( | final Object | element | ) |
Identity method allowing to get the identical object, using the internal hash map.
This is an O(1) operation.
| element | hash source to find the identical Object within this list |
key hash code, or null if not contained Definition at line 507 of file ArrayHashSet.java.
| final ArrayList< E > com.jogamp.common.util.ArrayHashSet< E >.getData | ( | ) |
Returns this object ordered ArrayList.
Use w/ care, it's not a copy.
Definition at line 131 of file ArrayHashSet.java.
| final HashMap< E, E > com.jogamp.common.util.ArrayHashSet< E >.getMap | ( | ) |
Returns this object hash map.
Use w/ care, it's not a copy.
Definition at line 133 of file ArrayHashSet.java.
| final E com.jogamp.common.util.ArrayHashSet< E >.getOrAdd | ( | final E | element | ) | throws NullPointerException |
Identity method allowing to get the identical object, using the internal hash map.
If the element is not yet contained, add it.
This is an O(1) operation.
| element | hash source to find the identical Object within this list |
key hash code, or add the given key and return it. | NullPointerException | if element is null but supportsNullValue() == false |
Definition at line 522 of file ArrayHashSet.java.
| final int com.jogamp.common.util.ArrayHashSet< E >.hashCode | ( | ) |
This is an O(n) operation over the size of this list.
java.util.List#hashCode(), ie hashing all elements of this list. Definition at line 343 of file ArrayHashSet.java.
| final int com.jogamp.common.util.ArrayHashSet< E >.indexOf | ( | final Object | element | ) |
| final boolean com.jogamp.common.util.ArrayHashSet< E >.isEmpty | ( | ) |
Definition at line 348 of file ArrayHashSet.java.
| final Iterator< E > com.jogamp.common.util.ArrayHashSet< E >.iterator | ( | ) |
Definition at line 353 of file ArrayHashSet.java.
| final int com.jogamp.common.util.ArrayHashSet< E >.lastIndexOf | ( | final Object | o | ) |
Since this list is unique, equivalent to indexOf(java.lang.Object).
This is an O(n) operation.
Definition at line 468 of file ArrayHashSet.java.
| final ListIterator< E > com.jogamp.common.util.ArrayHashSet< E >.listIterator | ( | ) |
Definition at line 473 of file ArrayHashSet.java.
| final ListIterator< E > com.jogamp.common.util.ArrayHashSet< E >.listIterator | ( | final int | index | ) |
Definition at line 478 of file ArrayHashSet.java.
| final E com.jogamp.common.util.ArrayHashSet< E >.remove | ( | final int | index | ) |
Remove element at given index from this list.
This is an O(n) operation.
Definition at line 449 of file ArrayHashSet.java.
| final boolean com.jogamp.common.util.ArrayHashSet< E >.remove | ( | final Object | element | ) | throws NullPointerException |
Remove element from this list.
This is an O(1) operation, in case the element does not exist, otherwise O(n).
| NullPointerException | if element is null but supportsNullValue() == false |
Definition at line 193 of file ArrayHashSet.java.
| final boolean com.jogamp.common.util.ArrayHashSet< E >.removeAll | ( | final Collection<?> | c | ) |
Remove all elements of given java.util.Collection from this list.
This is an O(n) operation.
Definition at line 285 of file ArrayHashSet.java.
| final boolean com.jogamp.common.util.ArrayHashSet< E >.retainAll | ( | final Collection<?> | c | ) |
Retain all elements of the given java.util.Collection c, ie remove all elements not contained by the given java.util.Collection c.
This is an O(n) operation.
Definition at line 306 of file ArrayHashSet.java.
| final E com.jogamp.common.util.ArrayHashSet< E >.set | ( | final int | index, |
| final E | element | ||
| ) |
| final int com.jogamp.common.util.ArrayHashSet< E >.size | ( | ) |
Definition at line 358 of file ArrayHashSet.java.
| final List< E > com.jogamp.common.util.ArrayHashSet< E >.subList | ( | final int | fromIndex, |
| final int | toIndex | ||
| ) |
Definition at line 483 of file ArrayHashSet.java.
| final boolean com.jogamp.common.util.ArrayHashSet< E >.supportsNullValue | ( | ) |
Returns true for default behavior, i.e.
null can be a valid value.
Returns false if null is not a valid value, here remove(E) and getOrAdd(Object) are optimized operations.
Definition at line 116 of file ArrayHashSet.java.
| final Object[] com.jogamp.common.util.ArrayHashSet< E >.toArray | ( | ) |
Definition at line 363 of file ArrayHashSet.java.
| final< T > T[] com.jogamp.common.util.ArrayHashSet< E >.toArray | ( | final T[] | a | ) |
Definition at line 368 of file ArrayHashSet.java.
| final ArrayList< E > com.jogamp.common.util.ArrayHashSet< E >.toArrayList | ( | ) |
Definition at line 494 of file ArrayHashSet.java.
| final String com.jogamp.common.util.ArrayHashSet< E >.toString | ( | ) |
Definition at line 136 of file ArrayHashSet.java.
|
static |
The default initial capacity: {@value}.
Definition at line 78 of file ArrayHashSet.java.
|
static |
Default load factor: {@value}.
Definition at line 74 of file ArrayHashSet.java.