Package | Description |
---|---|
net.sf.rubycollect4j |
Modifier and Type | Method and Description |
---|---|
RubySet<E> |
RubySet.addʔ(E e)
Adds the given object to the set and returns self.
|
RubySet<E> |
RubySet.collectǃ(java.lang.String methodName,
java.lang.Object... args)
Transforms each element by given method name in self.
|
RubySet<E> |
RubySet.collectǃ(TransformBlock<? super E,? extends E> block)
Replaces the elements with ones returned by
RubyEnumerable.collect(TransformBlock) . |
static <E> RubySet<E> |
RubySet.copyOf(java.lang.Iterable<E> elements)
Returns a
RubySet which copies the elements of given Iterable. |
RubySet<E> |
RubySet.delete(E e)
Deletes the given object from the set and returns self.
|
RubySet<E> |
RubySet.deleteIf(BooleanBlock<? super E> block)
Deletes every element of the set for which block evaluates to true, and
returns self.
|
RubySet<E> |
RubySet.deleteʔ(E e)
Deletes the given object from the set and returns self.
|
RubySet<E> |
RubySet.difference(java.lang.Iterable<E> iter)
Returns a new set built by duplicating the set, removing every element that
appears in the given Iterable.
|
<S> RubySet<RubySet<E>> |
RubySet.divide(TransformBlock<? super E,? extends S> block)
Divides the set into a set of subsets according to the commonality defined
by the given block.
|
RubySet<E> |
RubySet.each(Block<? super E> block)
Yields each element to the block.
|
RubySet<E> |
RubySet.exclusive(java.lang.Iterable<E> iter)
Returns a new set containing elements exclusive between the set and the
given Iterable.
|
<S> RubySet<S> |
RubySet.flatten()
Returns a new set that is a copy of the set, flattening each containing set
recursively.
|
RubySet<E> |
RubySet.freeze()
Freezes this
RubySet . |
RubySet<E> |
RubySet.intersection(java.lang.Iterable<E> iter)
Returns a new set containing elements common to the set and the given
Iterable.
|
RubySet<E> |
RubySet.keepIf(BooleanBlock<? super E> block)
Deletes every element of the set for which block evaluates to false, and
returns self.
|
RubySet<E> |
RubySet.mapǃ(java.lang.String methodName,
java.lang.Object... args)
Equivalent to
collectǃ(String, Object...) . |
RubySet<E> |
RubySet.mapǃ(TransformBlock<? super E,? extends E> block)
Equivalent to
collectǃ(TransformBlock) . |
RubySet<E> |
RubySet.merge(java.lang.Iterable<E> iter)
Merges the elements of the given Iterable to the set and returns self.
|
static <E> RubySet<E> |
RubyCollections.newRubySet()
Creates an empty
RubySet . |
static <E> RubySet<E> |
RubyCollections.newRubySet(E... elements)
Creates a
RubySet by given elements. |
static <E> RubySet<E> |
RubyCollections.newRubySet(java.lang.Iterable<E> iter)
Creates a
RubySet by given Iterable. |
static <E> RubySet<E> |
RubySet.of(java.util.LinkedHashSet<E> set)
Returns a
RubySet which wraps the given LinkedHashSet. |
RubySet<E> |
RubySet.rejectǃ(BooleanBlock<? super E> block)
Equivalent to
deleteIf(BooleanBlock) , but returns null if no
changes were made. |
RubySet<E> |
RubySet.replace(java.lang.Iterable<E> iter)
Replaces the contents of the set with the contents of the given Iterable
and returns self.
|
RubySet<E> |
RubySet.selectǃ(BooleanBlock<? super E> block)
Equivalent to
keepIf(BooleanBlock) , but returns null if no changes
were made. |
RubySet<E> |
RubySet.subtract(java.lang.Iterable<E> iter)
Deletes every element that appears in the given Iterable and returns self.
|
RubySet<E> |
RubySet.union(java.lang.Iterable<E> iter)
Returns a new set built by merging the set and the elements of the given
Iterable.
|
Modifier and Type | Method and Description |
---|---|
<S> RubyHash<S,RubySet<E>> |
RubySet.classify(TransformBlock<? super E,? extends S> block)
Classifies the set by the return value of the given block and returns a
RubyHash of {S value => RubySet<E>} pairs. |
<S> RubySet<RubySet<E>> |
RubySet.divide(TransformBlock<? super E,? extends S> block)
Divides the set into a set of subsets according to the commonality defined
by the given block.
|