| Modifier and Type | Class and Description |
|---|---|
| protected class |
| Modifier and Type | Field and Description |
|---|---|
| private T | |
| private T | |
| private T | |
| private T | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public QuadrupletonSet | clone()
Overrides org. Implements org. Creates and returns a copy of this object. |
| public boolean | contains(Object obj)
Overrides org. Implements org. Returns true if the iterable has an element which responds true to element.equals(object). |
| public void | each(Procedure<? super T> procedure)
Implements org. The procedure is executed for each element in the iterable. |
| public boolean | equals(Object o)
Overrides java. Implements org. Follows the same general contract as |
| public <P> void | forEachWith(Procedure2<? super T, ? super P> procedure, P parameter)
Overrides org. Implements org. The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument. |
| public void | forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
Overrides org. Implements org. Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure. |
| public T | getFirst()
Implements org. Returns the first element of an iterable. |
| public T | getLast()
Implements org. Returns the last element of an iterable. |
| public T | getOnly()
Overrides default org. Returns the element if the iterable has exactly one element. |
| pack-priv T | |
| pack-priv T | |
| public int | hashCode()
Overrides java. Implements org. Follows the same general contract as |
| public Iterator | iterator()
Implements java. Returns an iterator over elements of type |
| public void | readExternal(ObjectInput in)
Implements java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
| public int | size()
Implements org. Returns the number of items in this iterable. |
| public MutableSet | with(T element)
Overrides default org. Implements org. This method allows fixed size collections the ability to add elements to their existing elements. |
| public MutableSet | without(T element)
Overrides default org. Implements org. This method allows fixed size collections the ability to remove elements from their existing elements. |
| public void | writeExternal(ObjectOutput out)
Implements java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
| element1 | back to summary |
|---|---|
| private T element1 | |
| element2 | back to summary |
|---|---|
| private T element2 | |
| element3 | back to summary |
|---|---|
| private T element3 | |
| element4 | back to summary |
|---|---|
| private T element4 | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| QuadrupletonSet | back to summary |
|---|---|
public QuadrupletonSet()
| |
| QuadrupletonSet | back to summary |
|---|---|
| pack-priv QuadrupletonSet(T obj1, T obj2, T obj3, T obj4) | |
| clone | back to summary |
|---|---|
| public QuadrupletonSet Overrides org. Implements org. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| contains | back to summary |
|---|---|
| public boolean contains(Object obj) Overrides org. Implements org. Doc from org. Returns true if the iterable has an element which responds true to element.equals(object).
| |
| each | back to summary |
|---|---|
| public void each(Procedure<? super T> procedure) Implements org. Doc from org. The procedure is executed for each element in the iterable. Example using a Java 8 lambda expression: people.each(person -> LOGGER.info(person.getName()));This method is a variant of InternalIterable#forEach(Procedure)
that has a signature conflict with Iterable#forEach(java..
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Implements org. Doc from org. Follows the same general contract as
| |
| forEachWith | back to summary |
|---|---|
| public <P> void forEachWith(Procedure2<? super T, ? super P> procedure, P parameter) Overrides org. Implements org. Doc from org. The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument. Example using a Java 8 lambda:
people.forEachWith((Person person, Person other) ->
{
if (person.isRelatedTo(other))
{
LOGGER.info(person.getName());
}
}, fred);
Example using an anonymous inner class:
people.forEachWith(new Procedure2<Person, Person>()
{
public void value(Person person, Person other)
{
if (person.isRelatedTo(other))
{
LOGGER.info(person.getName());
}
}
}, fred);
| |
| forEachWithIndex | back to summary |
|---|---|
| public void forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure) Overrides org. Implements org. Doc from org. Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure. Example using a Java 8 lambda:
people.forEachWithIndex((Person person, int index) -> LOGGER.info("Index: " + index + " person: " + person.getName()));
Example using an anonymous inner class:
people.forEachWithIndex(new ObjectIntProcedure<Person>()
{
public void value(Person person, int index)
{
LOGGER.info("Index: " + index + " person: " + person.getName());
}
});
| |
| getFirst | back to summary |
|---|---|
| public T getFirst() Implements org. Doc from org. Returns the first element of an iterable. In the case of a List it is the element at the first index. In the case of any other Collection, it is the first element that would be returned during an iteration. If the iterable is empty, null is returned. If null is a valid element of the container, then a developer would need to check to see if the iterable is empty to validate that a null result was not due to the container being empty. The order of Sets are not guaranteed (except for TreeSets and other Ordered Set implementations), so if you use this method, the first element could be any element from the Set.
| |
| getLast | back to summary |
|---|---|
| public T getLast() Implements org. Doc from org. Returns the last element of an iterable. In the case of a List it is the element at the last index. In the case of any other Collection, it is the last element that would be returned during an iteration. If the iterable is empty, null is returned. If null is a valid element of the container, then a developer would need to check to see if the iterable is empty to validate that a null result was not due to the container being empty. The order of Sets are not guaranteed (except for TreeSets and other Ordered Set implementations), so if you use this method, the last element could be any element from the Set.
| |
| getOnly | back to summary |
|---|---|
| public T getOnly() Overrides default org. Doc from org. Returns the element if the iterable has exactly one element. Otherwise, throw
| |
| getSecond | back to summary |
|---|---|
| pack-priv T getSecond() | |
| getThird | back to summary |
|---|---|
| pack-priv T getThird() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements org. Doc from org. Follows the same general contract as
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over elements of type
| |
| readExternal | back to summary |
|---|---|
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException Implements java. Doc from java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.
| |
| size | back to summary |
|---|---|
| public int size() Implements org. Doc from org. Returns the number of items in this iterable.
| |
| with | back to summary |
|---|---|
| public MutableSet Overrides default org. Implements org. Doc from org. This method allows fixed size collections the ability to add elements to their existing elements. A new instance
of
MutableCollection<String> list;
list = list.with("1");
list = list.with("2");
return list;
| |
| without | back to summary |
|---|---|
| public MutableSet Overrides default org. Implements org. Doc from org. This method allows fixed size collections the ability to remove elements from their existing elements. A new
instance of
MutableCollection<String> list;
list = list.without("1");
list = list.without("2");
return list;
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(ObjectOutput out) throws IOException Implements java. Doc from java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
| |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected T |
| QuadrupletonSetIterator | back to summary |
|---|---|
| protected QuadrupletonSetIterator() | |
| getElement | back to summary |
|---|---|
| protected T getElement(int i) Implements abstract org.
| |