Class CSet<E>

    • Constructor Detail

      • CSet

        public CSet()
      • CSet

        public CSet​(E... c)
      • CSet

        public CSet​(java.util.stream.Stream<E> stream)
      • CSet

        public CSet​(java.lang.Iterable<E> iterable)
    • Method Detail

      • of

        public static <C> CSet<C> of​(C... c)
      • of

        public static <C> CSet<C> of​(java.util.stream.Stream<C> stream)
      • of

        public static <C> CSet<C> of​(java.lang.Iterable<C> iterable)
      • removeIf

        public boolean removeIf​(java.util.function.Predicate<? super E> filter)
        Description copied from interface: CCollection
        Removes all of the elements of this collection that satisfy the given predicate. Errors or runtime exceptions thrown during iteration or by the predicate are relayed to the caller.
        Specified by:
        removeIf in interface CCollection<E>
        Specified by:
        removeIf in interface java.util.Collection<E>
        Parameters:
        filter - predicate which returns true for elements to be removed
        Returns:
        true if any elements were removed
      • stream

        public java.util.stream.Stream<E> stream()
        Description copied from interface: CCollection
        Returns sequential Stream with this collection as its source.

        This method should be overridden when the CCollection.spliterator() method cannot return spliterator that is IMMUTABLE, CONCURRENT, or late-binding. (See CCollection.spliterator() for details.)

        Specified by:
        stream in interface CCollection<E>
        Specified by:
        stream in interface CIterable<E>
        Specified by:
        stream in interface java.util.Collection<E>
        Returns:
        sequential Stream over the elements in this collection
      • equals

        public boolean equals​(java.lang.Object c)
        Description copied from interface: CIterable
        Returns true if this collection equals the specified collection.
        Specified by:
        equals in interface CIterable<E>
        Specified by:
        equals in interface java.util.Collection<E>
        Specified by:
        equals in interface java.util.Set<E>
        Overrides:
        equals in class java.util.AbstractSet<E>
        Parameters:
        c - collection to be checked for equality
        Returns:
        true if this collection contains none of the elements in the specified collection
        See Also:
        CIterableState.contains(Object)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractCollection<E>