Class BitSetModule.BitSetN<T>

    • Field Detail

      • elements

        private final long[] elements
      • len

        private final int len
    • Constructor Detail

      • BitSetN

        BitSetN​(Function1<java.lang.Integer,​T> fromInt,
                Function1<T,​java.lang.Integer> toInt,
                long[] elements)
    • Method Detail

      • calcLength

        private static int calcLength​(long[] elements)
      • head

        public T head()
        Description copied from interface: Traversable
        Returns the first element of this non-empty Traversable.
        Returns:
        the first element
      • length

        public int length()
        Description copied from interface: Traversable
        Returns the number of elements in this Traversable.

        Equivalent to Traversable.size().

        Returns:
        the number of elements
      • add

        public BitSet<T> add​(T t)
        Description copied from interface: Set
        Returns a new set containing all elements of this set plus the given element, if it was not already present.
        Parameters:
        t - the element to add
        Returns:
        a new set including the element