Package io.vavr.collection
Class BitSetModule.BitSet2<T>
- java.lang.Object
-
- io.vavr.collection.BitSetModule.AbstractBitSet<T>
-
- io.vavr.collection.BitSetModule.BitSet2<T>
-
- All Implemented Interfaces:
BitSet<T>
,Foldable<T>
,Ordered<T>
,Set<T>
,SortedSet<T>
,Traversable<T>
,Function1<T,java.lang.Boolean>
,Value<T>
,java.io.Serializable
,java.lang.Iterable<T>
,java.util.function.Function<T,java.lang.Boolean>
- Enclosing interface:
- BitSetModule
public static class BitSetModule.BitSet2<T> extends BitSetModule.AbstractBitSet<T>
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.vavr.collection.BitSet
BitSet.Builder<T>
-
-
Field Summary
Fields Modifier and Type Field Description private long
elements1
private long
elements2
private int
len
private static long
serialVersionUID
-
Fields inherited from class io.vavr.collection.BitSetModule.AbstractBitSet
fromInt, toInt
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BitSet<T>
add(T t)
Add the given element to this set, if it is not already contained.(package private) long[]
copyExpand(int wordsNum)
(package private) long
getWord(int index)
(package private) int
getWordsNum()
T
head()
Returns the first element of a non-empty Traversable.int
length()
Computes the number of elements of this Traversable.-
Methods inherited from class io.vavr.collection.BitSetModule.AbstractBitSet
addAll, addElement, comparator, contains, createEmpty, createFromAll, distinctBy, distinctBy, drop, dropRight, dropWhile, equals, filter, fromBitMaskNoCopy, groupBy, hashCode, init, intersect, iterator, orElse, orElse, partition, reject, remove, removeAll, scan, shrink, slideBy, sliding, span, take, takeRight, takeWhile, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.vavr.collection.BitSet
collect, diff, distinct, dropUntil, flatMap, flatMap, foldRight, grouped, hasDefiniteSize, initOption, isAsync, isLazy, isTraversableAgain, last, map, map, peek, replace, replaceAll, retainAll, scanLeft, scanRight, sliding, stringPrefix, tail, tailOption, takeUntil, toJavaSet, union, unzip, unzip3, zip, zipAll, zipWith, zipWithIndex, zipWithIndex
-
Methods inherited from interface io.vavr.collection.Foldable
fold, reduce, reduceOption
-
Methods inherited from interface io.vavr.Function1
andThen, arity, compose, curried, isMemoized, memoized, partial, reversed, tupled
-
Methods inherited from interface io.vavr.collection.Set
apply, isDistinct
-
Methods inherited from interface io.vavr.collection.Traversable
arrangeBy, average, containsAll, count, existsUnique, find, findLast, foldLeft, forEachWithIndex, get, headOption, isEmpty, isSequential, isSingleValued, lastOption, max, maxBy, maxBy, min, minBy, minBy, mkCharSeq, mkCharSeq, mkCharSeq, mkString, mkString, mkString, nonEmpty, product, reduceLeft, reduceLeftOption, reduceRight, reduceRightOption, single, singleOption, size, spliterator, sum
-
Methods inherited from interface io.vavr.Value
collect, collect, corresponds, eq, exists, forAll, forEach, getOrElse, getOrElse, getOrElseThrow, getOrElseTry, getOrNull, out, out, stderr, stdout, toArray, toCharSeq, toCompletableFuture, toEither, toEither, toInvalid, toInvalid, toJavaArray, toJavaArray, toJavaArray, toJavaCollection, toJavaList, toJavaList, toJavaMap, toJavaMap, toJavaMap, toJavaOptional, toJavaParallelStream, 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, toVector
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
elements1
private final long elements1
-
elements2
private final long elements2
-
len
private final int len
-
-
Method Detail
-
getWordsNum
int getWordsNum()
- Specified by:
getWordsNum
in classBitSetModule.AbstractBitSet<T>
-
copyExpand
long[] copyExpand(int wordsNum)
- Specified by:
copyExpand
in classBitSetModule.AbstractBitSet<T>
-
getWord
long getWord(int index)
- Specified by:
getWord
in classBitSetModule.AbstractBitSet<T>
-
head
public T head()
Description copied from interface:Traversable
Returns the first element of a non-empty Traversable.- Returns:
- The first element of this Traversable.
-
length
public int length()
Description copied from interface:Traversable
Computes the number of elements of this Traversable.Same as
Traversable.size()
.- Returns:
- the number of elements
-
-