T - the value typepublic class MiniSet3<T> extends MiniSet<T>
MiniSet containing three values.| Modifier and Type | Class and Description |
|---|---|
class |
MiniSet3.Miniterator
An
Iterator over a set with two values. |
| Constructor and Description |
|---|
MiniSet3(Set<T> set)
Construct a
MiniSet3 from another Set (helps with deserializing). |
MiniSet3(T value0,
T value1,
T value2)
Construct a
MiniSet3 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 three).
|
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 MiniSet3(T value0, T value1, T value2)
MiniSet3 with the given values.value0 - the first valuevalue1 - the second valuevalue2 - the third valuepublic MiniSet3(Set<T> set)
MiniSet3 from another Set (helps with deserializing).set - the other SetIllegalArgumentException - if the size of the other set is not 3public 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 three 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 three values identical to those of this set.public int hashCode()
Copyright © 2022. All rights reserved.