HashSet implementation that has predictable (insertion-order) iteration.
| Modifier and Type | Class and Description |
|---|---|
| private static class | LinkedHashSet.
The component type of the underlying list. T>A serialization proxy which, in this context, is used to deserialize immutable, linked Lists with final instance fields. |
| Modifier and Type | Field and Description |
|---|---|
| private static final LinkedHashSet | |
| private final LinkedHashMap | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public LinkedHashSet | Returns: A new set containing all elements of this set and alsoelement.The element to be added. element)Implements io. Add the given element to this set, replacing existing one if it is already contained. |
| public LinkedHashSet | Returns: A new set containing all elements of this set and the givenelements, if not already contained.The elements to be added. elements)Implements io. Adds all of the given elements to this set, replacing existing one if they are not already contained. |
| private static <T> LinkedHashMap | |
| public <R> LinkedHashSet | collect(PartialFunction<? super T, ? extends R>
A function that is not necessarily defined of all elements of this traversable. partialFunction)Implements io. Collects all elements that are in the domain of the given |
| public static < Component type of the LinkedHashSet. T> Collector | Returns: A io.vavr.collection.LinkedHashSet Collector.Returns a |
| public boolean | contains(T
An Object of type A, may be null. element)Implements io. Shortcut for |
| public LinkedHashSet | diff(Set<? extends T>
Elements to be removed from this set. elements)Implements io. Calculates the difference between this set and another set. |
| public LinkedHashSet | distinct()
Implements io. Returns a new version of this which contains no duplicates. |
| public LinkedHashSet | distinctBy(Comparator<? super T>
A comparator comparator)Implements io. Returns a new version of this which contains no duplicates. |
| public <U> LinkedHashSet | distinctBy(Function<? super T, ? extends U>
A key extractor keyExtractor)Implements io. Returns a new version of this which contains no duplicates. |
| public LinkedHashSet | drop(int
The number of elements to drop. n)Implements io. Drops the first n elements of this or all elements, if this length < n. |
| public LinkedHashSet | dropRight(int
The number of elements to drop. n)Implements io. Drops the last n elements of this or all elements, if this length < n. |
| public LinkedHashSet | dropUntil(Predicate<? super T>
A condition tested subsequently for this elements. predicate)Implements io. Drops elements until the predicate holds for the current element. |
| public LinkedHashSet | dropWhile(Predicate<? super T>
A condition tested subsequently for this elements. predicate)Implements io. Drops elements while the predicate holds for the current element. |
| public static <T> LinkedHashSet | |
| public boolean | equals(Object
an object, may be null o)Overrides java. Implements io. In Vavr there are four basic classes of collections:
|
| public static < Component type of the LinkedHashSet T> LinkedHashSet | |
| public LinkedHashSet | filter(Predicate<? super T>
A predicate predicate)Implements io. Returns a new traversable consisting of all elements which satisfy the given predicate. |
| public <U> LinkedHashSet | flatMap(Function<? super T, ? extends Iterable<? extends U>>
A mapper mapper)Implements io. FlatMaps this Traversable. |
| public <U> U | foldRight(U
A zero element to start with. zero, BiFunction<? super T, ? super U, ? extends U> A function which combines elements. f)Implements io. Folds this elements from the right, starting with |
| public <C> Map | groupBy(Function<? super T, ? extends C>
A function which classifies elements into classes classifier)Implements io. Groups this elements by classifying the elements. |
| public Iterator | grouped(int
a positive block size size)Implements io. Groups this |
| public boolean | hasDefiniteSize()
Implements io. Checks if this Traversable is known to have a finite size. |
| public int | hashCode()
Overrides java. Implements io. Returns the hash code of this collection. |
| public T | head()
Implements io. Returns the first element of a non-empty Traversable. |
| public Option | headOption()
Overrides default io. Returns the first element of a non-empty Traversable as |
| public LinkedHashSet | init()
Implements io. Dual of tail(), returning all elements except the last. |
| public Option | initOption()
Implements io. Dual of tailOption(), returning all elements except the last as |
| public LinkedHashSet | intersect(Set<? extends T>
the set to intersect with. elements)Implements io. Computes the intersection between this set and another set. |
| public boolean | Returns: falseImplements io. An |
| public boolean | isEmpty()
Overrides default io. Checks if this Traversable is empty. |
| public boolean | Returns: falseImplements io. An |
| public boolean | isSequential()
Overrides default io. Checks if the elements of this Traversable appear in encounter order. |
| public boolean | isTraversableAgain()
Implements io. Checks if this Traversable can be repeatedly traversed. |
| public Iterator | |
| public T | |
| public int | length()
Implements io. Computes the number of elements of this Traversable. |
| public <U> LinkedHashSet | map(Function<? super T, ? extends U>
A mapper. mapper)Implements io. Maps the elements of this |
| public String | mkString(CharSequence
prefix of the resulting string prefix, CharSequence A delimiter string put between string representations of elements of this delimiter, CharSequence suffix of the resulting string suffix)Overrides default io. Joins the string representations of this elements using a specific delimiter, prefix and suffix. |
| public static < Component type of the T> LinkedHashSetlinkedHashSet. | Returns: the givenlinkedHashSet instance as narrowed type LinkedHashSet<T>.A linkedHashSet)LinkedHashSet.Narrows a widened |
| public static < The component type T> LinkedHashSet | Returns: A new LinkedHashSet instance containing the given elementAn element. element)Returns a singleton |
| public static < Component type of the LinkedHashSet. T> LinkedHashSet | Returns: A set containing the given elements.Zero or more elements. elements)Creates a LinkedHashSet of the given elements. |
| public static < The value type T> LinkedHashSet | |
| public static < Component type of the Stream. T> LinkedHashSet | Returns: A LinkedHashSet containing the given elements in the same order.Creates a LinkedHashSet that contains the elements of the given |
| public static LinkedHashSet | Returns: A new LinkedHashSet of Boolean valuesboolean values elements)Creates a LinkedHashSet from boolean values. |
| public static LinkedHashSet | Returns: A new LinkedHashSet of Byte valuesbyte values elements)Creates a LinkedHashSet from byte values. |
| public static LinkedHashSet | Returns: A new LinkedHashSet of Character valueschar values elements)Creates a LinkedHashSet from char values. |
| public static LinkedHashSet | Returns: A new LinkedHashSet of Double valuesdouble values elements)Creates a LinkedHashSet from double values. |
| public static LinkedHashSet | Returns: A new LinkedHashSet of Float valuesa float values elements)Creates a LinkedHashSet from float values. |
| public static LinkedHashSet | Returns: A new LinkedHashSet of Integer valuesint values elements)Creates a LinkedHashSet from int values. |
| public static LinkedHashSet | Returns: A new LinkedHashSet of Long valueslong values elements)Creates a LinkedHashSet from long values. |
| public static LinkedHashSet | Returns: A new LinkedHashSet of Short valuesshort values elements)Creates a LinkedHashSet from short values. |
| public LinkedHashSet | orElse(Iterable<? extends T>
An alternative other)TraversableImplements io. Returns this |
| public LinkedHashSet | orElse(Supplier<? extends Iterable<? extends T>>
An alternative supplier)Traversable supplierImplements io. Returns this |
| public Tuple2 | partition(Predicate<? super T>
A predicate which classifies an element if it is in the first or the second traversable. predicate)Implements io. Creates a partition of this |
| public LinkedHashSet | peek(Consumer<? super T>
The action that will be performed on the element(s). action)Implements io. Performs the given |
| public static LinkedHashSet | Returns: a range of int values as specified or the empty range iffrom >= toExclusivethe first number from, int the last number + 1 toExclusive)Creates a LinkedHashSet of int numbers starting from |
| public static LinkedHashSet | |
| public static LinkedHashSet | Returns: a range of long values as specified or the empty range iffrom >= toExclusivethe first number from, long the last number + 1 toExclusive)Creates a LinkedHashSet of long numbers starting from |
| public static LinkedHashSet | Returns: a range of long values as specified or the empty range iffrom >= toInclusive and step > 0 orfrom <= toInclusive and step < 0the first number from, int the last number + 1 toExclusive, int the step step)Creates a LinkedHashSet of int numbers starting from |
| public static LinkedHashSet | |
| public static LinkedHashSet | |
| public static LinkedHashSet | Returns: a range of long values as specified or the empty range iffrom >= toInclusive and step > 0 orfrom <= toInclusive and step < 0the first number from, long the last number + 1 toExclusive, long the step step)Creates a LinkedHashSet of long numbers starting from |
| public static LinkedHashSet | Returns: a range of int values as specified or the empty range iffrom > toInclusivethe first number from, int the last number toInclusive)Creates a LinkedHashSet of int numbers starting from |
| public static LinkedHashSet | |
| public static LinkedHashSet | Returns: a range of long values as specified or the empty range iffrom > toInclusivethe first number from, long the last number toInclusive)Creates a LinkedHashSet of long numbers starting from |
| public static LinkedHashSet | Returns: a range of int values as specified or the empty range iffrom > toInclusive and step > 0 orfrom < toInclusive and step < 0the first number from, int the last number toInclusive, int the step step)Creates a LinkedHashSet of int numbers starting from |
| public static LinkedHashSet | |
| public static LinkedHashSet | |
| public static LinkedHashSet | Returns: a range of int values as specified or the empty range iffrom > toInclusive and step > 0 orfrom < toInclusive and step < 0the first number from, long the last number toInclusive, long the step step)Creates a LinkedHashSet of long numbers starting from |
| private void | readObject(ObjectInputStream
An object serialization stream. stream)
|
| public LinkedHashSet | reject(Predicate<? super T>
A predicate predicate)Implements io. Returns a new traversable consisting of all elements which do not satisfy the given predicate. |
| public LinkedHashSet | remove(T
The element to be removed from this set. element)Implements io. Removes a specific element from this set, if present. |
| public LinkedHashSet | removeAll(Iterable<? extends T>
The elements to be removed from this set. elements)Implements io. Removes all of the given elements from this set, if present. |
| public LinkedHashSet | replace(T
An element to be substituted. currentElement, T A replacement for currentElement. newElement)Implements io. Replaces the first occurrence (if exists) of the given currentElement with newElement. |
| public LinkedHashSet | replaceAll(T
An element to be substituted. currentElement, T A replacement for currentElement. newElement)Implements io. Replaces all occurrences of the given currentElement with newElement. |
| public LinkedHashSet | retainAll(Iterable<? extends T>
Elements to be kept. elements)Implements io. Keeps all occurrences of the given elements from this. |
| public LinkedHashSet | scan(T
neutral element for the operator op zero, BiFunction<? super T, ? super T, ? extends T> the associative operator for the scan operation)Implements io. Computes a prefix scan of the elements of the collection. |
| public <U> LinkedHashSet | scanLeft(U
the initial value zero, BiFunction<? super U, ? super T, ? extends U> the binary operator applied to the intermediate result and the element operation)Implements io. Produces a collection containing cumulative results of applying the operator going left to right. |
| public <U> LinkedHashSet | scanRight(U
the initial value zero, BiFunction<? super T, ? super U, ? extends U> the binary operator applied to the intermediate result and the element operation)Implements io. Produces a collection containing cumulative results of applying the operator going right to left. |
| public Iterator | slideBy(Function<? super T, ?>
A function which classifies elements into classes classifier)Implements io. Slides a non-overlapping window of a variable size over this |
| public Iterator | sliding(int
a positive window size size)Implements io. Slides a window of a specific |
| public Iterator | sliding(int
a positive window size size, int a positive step size step)Implements io. Slides a window of a specific |
| public Tuple2 | span(Predicate<? super T>
A predicate. predicate)Implements io. Returns a tuple where the first element is the longest prefix of elements that satisfy the given
|
| public String | stringPrefix()
Implements io. Returns the name of this Value type, which is used by toString(). |
| public static < Component type of the LinkedHashSet T> LinkedHashSet | Returns: A LinkedHashSet consisting of elementsf(0),f(1), ..., f(n - 1)The number of elements in the LinkedHashSet n, Function<? super Integer, ? extends T> The Function computing element values f)Returns a LinkedHashSet containing |
| public LinkedHashSet | |
| public Option | tailOption()
Implements io. Drops the first element of a non-empty Traversable and returns an |
| public LinkedHashSet | take(int
The number of elements to take. n)Implements io. Takes the first n elements of this or all elements, if this length < n. |
| public LinkedHashSet | takeRight(int
The number of elements to take. n)Implements io. Takes the last n elements of this or all elements, if this length < n. |
| public LinkedHashSet | takeUntil(Predicate<? super T>
A condition tested subsequently for this elements. predicate)Implements io. Takes elements until the predicate holds for the current element. |
| public LinkedHashSet | takeWhile(Predicate<? super T>
A condition tested subsequently for the contained elements. predicate)Implements io. Takes elements while the predicate holds for the current element. |
| public LinkedHashSet | toJavaSet()
Implements io. Converts this Vavr |
| public String | toString()
Overrides java. Implements io. Clarifies that values have a proper toString() method implemented. |
| public < Type of transformation result U> U | Returns: An instance of typeUA transformation f)Transforms this |
| public LinkedHashSet | Returns: A new set that contains all distinct elements of this andelements set.The set to form the union with. elements)Implements io. Adds all of the elements of |
| public <T1, T2> Tuple2 | unzip(Function<? super T, Tuple2<? extends T1, ? extends T2>>
a function which converts elements of this to pairs unzipper)Implements io. Unzips this elements by mapping this elements to pairs which are subsequently split into two distinct sets. |
| public <T1, T2, T3> Tuple3 | unzip3(Function<? super T, Tuple3<? extends T1, ? extends T2, ? extends T3>>
a function which converts elements of this to pairs unzipper)Implements io. Unzips this elements by mapping this elements to triples which are subsequently split into three distinct sets. |
| pack-priv static <T> LinkedHashSet | |
| private Object | Returns: A SerializationProxy for this enclosing class.
|
| public <U> LinkedHashSet | zip(Iterable<? extends U>
The Iterable providing the second half of each result pair. that)Implements io. Returns a traversable formed from this traversable and another Iterable collection by combining corresponding elements in pairs. |
| public <U> LinkedHashSet | zipAll(Iterable<? extends U>
The Iterable providing the second half of each result pair. that, T The element to be used to fill up the result if this traversable is shorter than that. thisElem, U The element to be used to fill up the result if that is shorter than this traversable. thatElem)Implements io. Returns a traversable formed from this traversable and another Iterable by combining corresponding elements in pairs. |
| public <U, R> LinkedHashSet | zipWith(Iterable<? extends U>
The Iterable providing the second parameter of the mapper. that, BiFunction<? super T, ? super U, ? extends R> a mapper. mapper)Implements io. Returns a traversable formed from this traversable and another Iterable collection by mapping elements. |
| public LinkedHashSet | zipWithIndex()
Implements io. Zips this traversable with its indices. |
| public <U> LinkedHashSet | zipWithIndex(BiFunction<? super T, ? super Integer, ? extends U>
a mapper. mapper)Implements io. Zips this traversable with its indices by applying mapper provided. |