abstract class GraphEmptyBase
undocumented
Extends: EmptyBase
Extended by: GraphEmpty<N,V,Tp,TpG>, ValuedGraphEmpty<N,V,Tp,TpG>
Properties
_NonEmptyType
undocumented
_NonEmptyTypeisEmpty
Returns true since the collection is empty.
isEmptytrue since the collection is empty.length
Returns 0 for the length of the collection.
length0 for the length of the collection.size
Returns 0 for the size of the collection.
size0 for the size of the collection.Methods
[Symbol.iterator]
Returns an empty iterator.
[Symbol.iterator]assumeNonEmpty
Throws a RimbuError.EmptyCollectionAssumedNonEmptyError, since the collection is empty.
assumeNonEmptyRimbuError.EmptyCollectionAssumedNonEmptyError, since the collection is empty.filter
Returns this, since filtering an empty collection is still empty.
filterthis, since filtering an empty collection is still empty.forEach
Performs no action, since there are no elements.
forEachnonEmpty
Returns false, keeping the type narrowed to the empty variant.
nonEmptyfalse, keeping the type narrowed to the empty variant.remove
Returns this, since removing from an empty collection has no effect.
removethis, since removing from an empty collection has no effect.stream
Returns an empty Stream.
streamStream.toArray
Returns an empty array.
toArray