T - Component type of the Stream.@Deprecated public static final class Stream.Empty<T> extends Stream<T> implements java.io.Serializable
This is a singleton, i.e. not Cloneable.
Stream.Cons<T>, Stream.Empty<T>| Modifier and Type | Method and Description |
|---|---|
Stream<T> |
append(T element)
Deprecated.
Appends an element to this.
|
Stream<T> |
appendAll(java.lang.Iterable<? extends T> elements)
Deprecated.
Appends all given elements to this.
|
boolean |
equals(java.lang.Object o)
Deprecated.
In Vavr there are four basic classes of collections:
Seq (sequential elements)
Set (distinct elements)
Map (indexed elements)
Multimap (indexed collections)
Two collection instances of these classes are equal if and only if both collections
belong to the same basic collection class (Seq, Set, Map or Multimap)
contain the same elements
have the same element order, if the collections are of type Seq
Two Map/Multimap elements, resp.
|
int |
hashCode()
Deprecated.
Returns the hash code of this collection.
|
T |
head()
Deprecated.
Returns the first element of a non-empty Traversable.
|
static <T> Stream.Empty<T> |
instance()
Deprecated.
Returns the singleton empty Stream instance.
|
boolean |
isEmpty()
Deprecated.
Checks if this Traversable is empty.
|
Iterator<T> |
iterator()
Deprecated.
An iterator by means of head() and tail().
|
Stream<T> |
tail()
Deprecated.
Drops the first element of a non-empty Traversable.
|
java.lang.String |
toString()
Deprecated.
Clarifies that values have a proper toString() method implemented.
|
appendSelf, apply, asJava, asJava, asJavaMutable, asJavaMutable, collect, collector, combinations, combinations, concat, concat, cons, continually, continually, crossProduct, cycle, cycle, distinct, distinctBy, distinctBy, drop, dropRight, dropRightUntil, dropRightWhile, dropUntil, dropWhile, empty, extend, extend, extend, fill, fill, filter, filterNot, flatMap, from, from, from, from, get, getOption, getOrElse, group, groupBy, grouped, hasDefiniteSize, indexOf, init, initOption, insert, insertAll, intersperse, isAsync, isDefinedAt, isLazy, isTraversableAgain, iterate, iterate, last, lastIndexOf, leftPadTo, length, map, narrow, of, of, ofAll, ofAll, ofAll, ofAll, ofAll, ofAll, ofAll, ofAll, ofAll, ofAll, orElse, orElse, padTo, partition, patch, peek, permutations, prepend, prependAll, range, range, range, rangeBy, rangeBy, rangeBy, rangeBy, rangeClosed, rangeClosed, rangeClosed, rangeClosedBy, rangeClosedBy, rangeClosedBy, rangeClosedBy, remove, removeAll, removeAll, removeAt, removeFirst, removeLast, replace, replaceAll, retainAll, reverse, rotateLeft, rotateRight, scan, scanLeft, scanRight, shuffle, shuffle, slice, slideBy, sliding, sliding, sortBy, sortBy, sorted, sorted, span, splitAt, splitAt, splitAtInclusive, stringPrefix, subSequence, subSequence, tabulate, tailOption, take, takeRight, takeRightUntil, takeRightWhile, takeUntil, takeWhile, transform, transpose, unfold, unfoldLeft, unfoldRight, update, update, zip, zipAll, zipWith, zipWithIndex, zipWithIndexclone, finalize, getClass, notify, notifyAll, wait, wait, waitasPartialFunction, indexOfSlice, indexWhere, lastIndexOfSlice, lastIndexWhere, narrow, reverseIterator, search, search, segmentLengthcontainsSlice, crossProduct, crossProduct, endsWith, foldRight, indexOf, indexOfOption, indexOfOption, indexOfSlice, indexOfSliceOption, indexOfSliceOption, indexWhere, indexWhereOption, indexWhereOption, isSequential, iterator, lastIndexOf, lastIndexOfOption, lastIndexOfOption, lastIndexOfSlice, lastIndexOfSliceOption, lastIndexOfSliceOption, lastIndexWhere, lastIndexWhereOption, lastIndexWhereOption, lift, narrow, prefixLength, startsWith, startsWitharrangeBy, average, containsAll, count, existsUnique, find, findLast, fold, foldLeft, forEachWithIndex, get, headOption, isDistinct, isOrdered, isSingleValued, lastOption, max, maxBy, maxBy, min, minBy, minBy, mkCharSeq, mkCharSeq, mkCharSeq, mkString, mkString, mkString, narrow, nonEmpty, product, reduce, reduceLeft, reduceLeftOption, reduceOption, reduceRight, reduceRightOption, single, singleOption, size, spliterator, sum, toLinkedMap, toMap, toSortedMap, toSortedMap, unzip, unzip3collect, collect, contains, corresponds, eq, exists, forAll, forEach, getOrElse, getOrElse, getOrElseThrow, getOrElseTry, getOrNull, narrow, out, out, stderr, stdout, toArray, toCharSeq, toCompletableFuture, toEither, toEither, toInvalid, toInvalid, toJavaArray, toJavaArray, toJavaArray, toJavaCollection, toJavaList, toJavaList, toJavaMap, toJavaMap, toJavaMap, toJavaOptional, toJavaParallelStream, toJavaSet, toJavaSet, toJavaStream, toLeft, toLeft, toLinkedMap, toLinkedMap, toLinkedSet, toList, toMap, toMap, toOption, toPriorityQueue, toPriorityQueue, toQueue, toRight, toRight, toSet, toSortedMap, toSortedMap, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toStream, toTree, toTree, toTry, toTry, toValid, toValid, toValidation, toValidation, toVectorpublic Stream<T> append(T element)
Seqpublic Stream<T> appendAll(java.lang.Iterable<? extends T> elements)
Seqpublic static <T> Stream.Empty<T> instance()
T - Component type of the Streampublic T head()
Traversablehead in interface Traversable<T>public boolean isEmpty()
Traversablepublic Iterator<T> iterator()
Traversablepublic Stream<T> tail()
Traversablepublic boolean equals(java.lang.Object o)
TraversableNotes:
public int hashCode()
Traversable
int hash = 1;
for (T t : this) { hash = hash * 31 + Objects.hashCode(t); }
Collections with arbitrary iteration order are hashed in a way such that the hash of a fixed number of elements is independent of their iteration order.
int hash = 1;
for (T t : this) { hash += Objects.hashCode(t); }
Please note that the particular hashing algorithms may change in a future version of Vavr.
public final class Hashed<K> {
private final K key;
private final Lazy<Integer> hashCode;
public Hashed(K key) {
this.key = key;
this.hashCode = Lazy.of(() -> Objects.hashCode(key));
}
public K key() {
return key;
}
@Override
public boolean equals(Object o) {
if (o == key) {
return true;
} else if (key != null && o instanceof Hashed) {
final Hashed that = (Hashed) o;
return key.equals(that.key);
} else {
return false;
}
}
@Override
public int hashCode() {
return hashCode.get();
}
@Override
public String toString() {
return "Hashed(" + (key == null ? "null" : key.toString()) + ")";
}
}
public java.lang.String toString()
ValueSee Object.toString().