final class ArraySet extends Object implements Set
Modifier and Type | Class and Description |
---|---|
private class |
ArraySet.Iter
Simple iterator.
|
Constructor and Description |
---|
ArraySet(Object[] elements)
Creates an instance from an array.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object o)
Always throws UnsupportedOperationException.
|
boolean |
addAll(Collection c)
Always throws UnsupportedOperationException.
|
void |
clear()
Always throws UnsupportedOperationException.
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isEmpty() |
Iterator |
iterator() |
boolean |
remove(Object o)
Always throws UnsupportedOperationException.
|
boolean |
removeAll(Collection c)
Always throws UnsupportedOperationException.
|
boolean |
retainAll(Collection c)
Always throws UnsupportedOperationException.
|
int |
size() |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator
parallelStream, removeIf, stream
private final Object[] elements
ArraySet(Object[] elements)
public int size()
size
in interface Collection
size
in interface Set
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface Set
public boolean contains(Object o)
contains
in interface Collection
contains
in interface Set
public Iterator iterator()
public Object[] toArray()
toArray
in interface Collection
toArray
in interface Set
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface Set
public boolean add(Object o)
add
in interface Collection
add
in interface Set
public boolean remove(Object o)
remove
in interface Collection
remove
in interface Set
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface Set
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface Set
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface Set
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface Set
public void clear()
clear
in interface Collection
clear
in interface Set
public boolean equals(Object o)
public int hashCode()
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.