T - the value typepublic class MiniSet5<T> extends MiniSet<T>
MiniSet containing four values.| Modifier and Type | Class and Description |
|---|---|
class |
MiniSet5.Miniterator
An
Iterator over a set with two values. |
| Constructor and Description |
|---|
MiniSet5(T value0,
T value1,
T value2,
T value3,
T value4)
Construct a
MiniSet5 with the given values. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Object o)
Test whether the collection contains an object equal to the specified value.
|
boolean |
equals(Object other)
Compares the specified object with this set for equality.
|
int |
hashCode()
Returns the hash code value for this set.
|
boolean |
isEmpty()
Return
false to indicate that the set is not empty. |
Iterator<T> |
iterator()
Return an
Iterator over the set. |
int |
size()
Get the number of values (always five).
|
Object[] |
toArray()
Copy the set to an array.
|
<TT> TT[] |
toArray(TT[] a)
Copy the set to an array, either the supplied array (if it fits) or a new array of the specified type.
|
String |
toString()
Returns a string representation of this set.
|
add, addAll, clear, containsAll, of, of, of, of, of, of, of, remove, removeAll, retainAll, stringOfclone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratorparallelStream, removeIf, streampublic int size()
public boolean isEmpty()
false to indicate that the set is not empty.falsepublic boolean contains(Object o)
o - the objecttrue if any of the five values is equal to the objectpublic Object[] toArray()
public <TT> TT[] toArray(TT[] a)
TT - the type of the destination array itemsa - the destination arrayArrayStoreException - if the values in the collection can't be stored in the destination arraypublic boolean equals(Object other)
true if the specified object is also a
set containing five values identical to those of this set.public int hashCode()
Copyright © 2022. All rights reserved.