|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILevel0SetOperator<I,T>
Method Summary | ||
---|---|---|
ILevel0SetOperator<I,T> |
add(T newElement)
Adds the specified element at the end of the target structure object. |
|
ILevel0SetOperator<I,T> |
addAll(Collection<T> collection)
Adds all the elements in the specified collection to the target structure object. |
|
ILevel0SetOperator<I,T> |
addAll(T... newElements)
Adds all the specified elements at the end of the target structure object. |
|
ILevel0GenericUniqOperator<I,Boolean> |
all(IFunction<? super T,Boolean> eval)
|
|
ILevel0GenericUniqOperator<I,Boolean> |
any(IFunction<? super T,Boolean> eval)
|
|
|
castToSetOf(org.javaruntype.type.Type<X> type)
Casts the operator's target as a set of the specified type. |
|
ILevel0MapOperator<I,T,T> |
couple()
Converts the target object to a map, by using the even elements (starting at 0) as keys, and the odd elements as values. |
|
ILevel0MapOperator<I,T,Set<T>> |
coupleAndGroup()
Converts the target object to a map, by using the even elements (starting at 0) as keys, and the odd elements as values. |
|
|
exec(IFunction<? super Set<T>,X> function)
Executes the specified function on the target set, creating a new generic operator containing the result of the execution and setting the new operator type to the one specified. |
|
|
execAsSet(IFunction<? super Set<T>,? extends Set<X>> function)
Executes the specified function on the target set, creating a new set operator containing the result of the execution. |
|
ILevel0SetOperator<I,T> |
execIfFalseAsSet(IFunction<? super Set<T>,Boolean> eval,
IFunction<? super Set<T>,? extends Set<? extends T>> function)
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfFalseAsSet(IFunction<? super Set<T>,Boolean> eval,
IFunction<? super Set<T>,? extends Set<X>> function,
IFunction<? super Set<T>,? extends Set<X>> elseFunction)
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0SetOperator<I,T> |
execIfNotNullAsSet(IFunction<? super Set<T>,? extends Set<? extends T>> function)
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfNotNullAsSet(IFunction<? super Set<T>,? extends Set<X>> function,
IFunction<? super Set<T>,? extends Set<X>> elseFunction)
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0SetOperator<I,T> |
execIfNullAsSet(IFunction<? super Set<T>,? extends Set<? extends T>> function)
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfNullAsSet(IFunction<? super Set<T>,? extends Set<X>> function,
IFunction<? super Set<T>,? extends Set<X>> elseFunction)
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0SetOperator<I,T> |
execIfTrueAsSet(IFunction<? super Set<T>,Boolean> eval,
IFunction<? super Set<T>,? extends Set<? extends T>> function)
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfTrueAsSet(IFunction<? super Set<T>,Boolean> eval,
IFunction<? super Set<T>,? extends Set<X>> function,
IFunction<? super Set<T>,? extends Set<X>> elseFunction)
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel1SetElementsOperator<I,T> |
forEach()
Iterates the target collection. |
|
ILevel0GenericUniqOperator<I,Set<T>> |
generic()
Converts the specialized structure operator into generic operators (with no specific methods for structures - e.g. forEach()) |
|
ILevel0SetSelectedOperator<I,T> |
ifFalse(IFunction<? super Set<T>,Boolean> eval)
Selects only those targets for which the specified evaluator returns false. |
|
ILevel0SetSelectedOperator<I,T> |
ifNotNull()
Selects only those targets which are not null. |
|
ILevel0SetSelectedOperator<I,T> |
ifNull()
Selects only those targets which are null. |
|
ILevel0SetSelectedOperator<I,T> |
ifTrue(IFunction<? super Set<T>,Boolean> eval)
Selects only those targets for which the specified evaluator returns true. |
|
ILevel0SetOperator<I,T> |
insert(int position,
T newElement)
Inserts a new element into the specified position (starting in 0) of the target structure object. |
|
ILevel0SetOperator<I,T> |
insertAll(int position,
T... newElements)
Inserts new elements into the specified position (starting in 0) of the target structure object. |
|
|
map(IFunction<? super T,X> function)
Executes the specified function on each of the elements, creating a new operator containing the result of all the executions and setting the new operator type to the one resulting from the function execution. |
|
ILevel0SetOperator<I,T> |
mapIfFalse(IFunction<? super T,Boolean> eval,
IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfFalse(IFunction<? super T,Boolean> eval,
IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0SetOperator<I,T> |
mapIfNotNull(IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfNotNull(IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0SetOperator<I,T> |
mapIfNull(IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfNull(IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0SetOperator<I,T> |
mapIfTrue(IFunction<? super T,Boolean> eval,
IFunction<? super T,? extends T> function)
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
mapIfTrue(IFunction<? super T,Boolean> eval,
IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
of(org.javaruntype.type.Type<X> type)
Casts the operator's target as a set of the specified type. |
|
ILevel0SetOperator<I,T> |
removeAllEqual(T... values)
Removes the specified values from the target structure object. |
|
ILevel0SetOperator<I,T> |
removeAllFalse(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which evaluate as false using the specified evaluator. |
|
ILevel0SetOperator<I,T> |
removeAllIndexes(int... indexes)
Removes all the elements in the target structure object which position (index) in it matches one the specified indexes. |
|
ILevel0SetOperator<I,T> |
removeAllIndexesNot(int... indexes)
Removes all the elements in the target structure object except those which position (index) in it matches one of the specified indexes. |
|
ILevel0SetOperator<I,T> |
removeAllNotNullAndFalse(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which are not null and evaluate as false using the specified evaluator. |
|
ILevel0SetOperator<I,T> |
removeAllNotNullAndTrue(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which are not null and evaluate as true using the specified evaluator. |
|
ILevel0SetOperator<I,T> |
removeAllNull()
Remove all the null elements in the target structure object. |
|
ILevel0SetOperator<I,T> |
removeAllNullOrFalse(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which either are null or evaluate as false using the specified evaluator. |
|
ILevel0SetOperator<I,T> |
removeAllNullOrTrue(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which either are null or evaluate as true using the specified evaluator. |
|
ILevel0SetOperator<I,T> |
removeAllTrue(IFunction<? super T,Boolean> eval)
Removes from the target structure object all the elements which evaluate as true using the specified evaluator. |
|
ILevel0SetOperator<I,T> |
replaceIfNullWith(Set<T> replacement)
Replaces the current target object with the specified replacement if the current target is null. |
|
ILevel0SetOperator<I,T> |
replaceWith(Set<T> replacement)
Replaces the current target object with the specified replacement. |
|
ILevel0SetOperator<I,T> |
reverse()
Reverses the elements of the structure. |
|
ILevel0SetOperator<I,T> |
sort()
Sorts the elements of the structure according to their natural ordering. |
|
ILevel0SetOperator<I,T> |
sort(Comparator<? super T> comparator)
Sorts the elements of the structure according to the order induced by the specified comparator. |
|
ILevel0SetOperator<I,T> |
sortBy(IFunction<? super T,?> by)
Sorts the elements of the structure according to the result of executing the specified function. |
|
ILevel0ArrayOperator<I,T> |
toArrayOf(org.javaruntype.type.Type<T> type)
Converts the current target to an array of the specified type. |
|
|
toGroupMap(IFunction<? super T,K> keyFunction,
IFunction<? super T,V> valueFunction)
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values. |
|
|
toGroupMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values. |
|
ILevel0ListOperator<I,T> |
toList()
Converts the current target to a list. |
|
|
toMap(IFunction<? super T,K> keyFunction,
IFunction<? super T,V> valueFunction)
Converts the target object to a map by inputting the original target's elements into the specified functions, which will create the resulting keys and values. |
|
|
toMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values. |
|
|
zipAndGroupKeys(K... keys)
Converts the target object to a map by using the original target's elements as values the specified objects as keys. |
|
|
zipAndGroupKeysBy(IFunction<? super T,K> keyEval)
Converts the target object to a map by using the original target's elements as values and applying an evaluator (keyEval) to them in order to obtain their corresponding keys. |
|
|
zipAndGroupKeysFrom(Collection<K> keys)
Converts the target object to a map by using the original target's elements as values the specified objects as keys. |
|
|
zipAndGroupKeysFrom(K[] keys)
Converts the target object to a map by using the original target's elements as values the specified objects as keys. |
|
|
zipAndGroupValues(V... values)
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. |
|
|
zipAndGroupValuesBy(IFunction<? super T,V> valueEval)
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. |
|
|
zipAndGroupValuesFrom(Collection<V> values)
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. |
|
|
zipAndGroupValuesFrom(V[] values)
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. |
|
|
zipKeys(K... keys)
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys. |
|
|
zipKeysBy(IFunction<? super T,K> keyEval)
Converts the target object to a map by using the original target's elements as values and applying an evaluator (keyEval) to them in order to obtain their corresponding keys. |
|
|
zipKeysFrom(Collection<K> keys)
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys. |
|
|
zipKeysFrom(K[] keys)
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys. |
|
|
zipValues(V... values)
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. |
|
|
zipValuesBy(IFunction<? super T,V> valueEval)
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. |
|
|
zipValuesFrom(Collection<V> values)
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. |
|
|
zipValuesFrom(V[] values)
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. |
Method Detail |
---|
ILevel0SetSelectedOperator<I,T> ifTrue(IFunction<? super Set<T>,Boolean> eval)
SelectableOperator
Selects only those targets for which the specified evaluator returns true. After this method, all the subsequently executed operations will only be executed on the target objects selected here, until an "endIf()" method is called.
ifTrue
in interface SelectableOperator<Set<T>>
eval
- the evaluator to be used for selecting targets.
ILevel0SetSelectedOperator<I,T> ifFalse(IFunction<? super Set<T>,Boolean> eval)
SelectableOperator
Selects only those targets for which the specified evaluator returns false. After this method, all the subsequently executed operations will only be executed on the target objects selected here, until an "endIf()" method is called.
ifFalse
in interface SelectableOperator<Set<T>>
eval
- the evaluator to be used for selecting targets.
ILevel0SetSelectedOperator<I,T> ifNull()
SelectableOperator
Selects only those targets which are null. After this method, all the subsequently executed operations will only be executed on the target objects selected here, until an "endIf()" method is called.
ifNull
in interface SelectableOperator<Set<T>>
ILevel0SetSelectedOperator<I,T> ifNotNull()
SelectableOperator
Selects only those targets which are not null. After this method, all the subsequently executed operations will only be executed on the target objects selected here, until an "endIf()" method is called.
ifNotNull
in interface SelectableOperator<Set<T>>
ILevel1SetElementsOperator<I,T> forEach()
NavigableCollectionOperator
Iterates the target collection. After executing this method, any further operations will be applied on each of the collection elements until an "endFor()" method is called.
forEach
in interface NavigableCollectionOperator<T>
ILevel0SetOperator<I,T> sort()
SortableOperator
Sorts the elements of the structure according to their natural ordering.
sort
in interface SortableOperator<T>
ILevel0SetOperator<I,T> sort(Comparator<? super T> comparator)
SortableOperator
Sorts the elements of the structure according to the order induced by the specified comparator.
sort
in interface SortableOperator<T>
comparator
- the comparator to be used.
ILevel0SetOperator<I,T> sortBy(IFunction<? super T,?> by)
SortableOperator
Sorts the elements of the structure according to the result of executing the specified function.
sortBy
in interface SortableOperator<T>
by
- the function to be executed in order to obtain the compared object
ILevel0SetOperator<I,T> add(T newElement)
ModifiableCollectionOperator
Adds the specified element at the end of the target structure object.
The original target object is not modified, but copied instead.
add
in interface ModifiableCollectionOperator<T>
newElement
- the element to be added
ILevel0SetOperator<I,T> addAll(T... newElements)
ModifiableCollectionOperator
Adds all the specified elements at the end of the target structure object.
The original target object is not modified, but copied instead.
addAll
in interface ModifiableCollectionOperator<T>
newElements
- the elements to be added
ILevel0SetOperator<I,T> insert(int position, T newElement)
ModifiableCollectionOperator
Inserts a new element into the specified position (starting in 0) of the target structure object.
The original target object is not modified, but copied instead.
insert
in interface ModifiableCollectionOperator<T>
position
- the position in which the new element will be inserted (starting in 0)newElement
- the element to be inserted
ILevel0SetOperator<I,T> insertAll(int position, T... newElements)
ModifiableCollectionOperator
Inserts new elements into the specified position (starting in 0) of the target structure object.
The original target object is not modified, but copied instead.
insertAll
in interface ModifiableCollectionOperator<T>
position
- the position in which the new element will be inserted (starting in 0)newElements
- the elements to be inserted
ILevel0SetOperator<I,T> addAll(Collection<T> collection)
ModifiableCollectionOperator
Adds all the elements in the specified collection to the target structure object.
The original target object is not modified, but copied instead.
addAll
in interface ModifiableCollectionOperator<T>
collection
- the collection containing the elements to be added
ILevel0SetOperator<I,T> removeAllIndexes(int... indexes)
ModifiableCollectionOperator
Removes all the elements in the target structure object which position (index) in it matches one the specified indexes.
The original target object is not modified, but copied instead.
removeAllIndexes
in interface ModifiableCollectionOperator<T>
indexes
- the positions of the elements to be removed
ILevel0SetOperator<I,T> removeAllEqual(T... values)
ModifiableCollectionOperator
Removes the specified values from the target structure object.
The original target object is not modified, but copied instead.
removeAllEqual
in interface ModifiableCollectionOperator<T>
values
- the values to be removed from the target.
ILevel0SetOperator<I,T> removeAllTrue(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which evaluate as true using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllTrue
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0SetOperator<I,T> removeAllFalse(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which evaluate as false using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllFalse
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0SetOperator<I,T> removeAllNullOrFalse(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which either are null or evaluate as false using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllNullOrFalse
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0SetOperator<I,T> removeAllNotNullAndFalse(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which are not null and evaluate as false using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllNotNullAndFalse
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0SetOperator<I,T> removeAllNotNullAndTrue(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which are not null and evaluate as true using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllNotNullAndTrue
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0SetOperator<I,T> removeAllNullOrTrue(IFunction<? super T,Boolean> eval)
ModifiableCollectionOperator
Removes from the target structure object all the elements which either are null or evaluate as true using the specified evaluator.
The original target object is not modified, but copied instead.
removeAllNullOrTrue
in interface ModifiableCollectionOperator<T>
eval
- the evaluator to be used, which must return Boolean
ILevel0SetOperator<I,T> removeAllIndexesNot(int... indexes)
ModifiableCollectionOperator
Removes all the elements in the target structure object except those which position (index) in it matches one of the specified indexes.
The original target object is not modified, but copied instead.
removeAllIndexesNot
in interface ModifiableCollectionOperator<T>
indexes
- the positions of the elements to be kept
ILevel0SetOperator<I,T> removeAllNull()
ModifiableCollectionOperator
Remove all the null elements in the target structure object.
The original target object is not modified, but copied instead.
removeAllNull
in interface ModifiableCollectionOperator<T>
ILevel0ArrayOperator<I,T> toArrayOf(org.javaruntype.type.Type<T> type)
ConvertibleToArrayOperator
Converts the current target to an array of the specified type.
toArrayOf
in interface ConvertibleToArrayOperator<T>
type
- the type of the array elements.
ILevel0ListOperator<I,T> toList()
ConvertibleToListOperator
Converts the current target to a list.
toList
in interface ConvertibleToListOperator
<K,V> ILevel0MapOperator<I,K,V> toMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
ConvertibleToMapOperator
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
toMap
in interface ConvertibleToMapOperator<T>
K
- the type of the keys that will be createdV
- the type of the values that will be createdmapBuilder
- the map builder function to be used
<K,V> ILevel0MapOperator<I,K,V> toMap(IFunction<? super T,K> keyFunction, IFunction<? super T,V> valueFunction)
ConvertibleToMapOperator
Converts the target object to a map by inputting the original target's elements into the specified functions, which will create the resulting keys and values.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
toMap
in interface ConvertibleToMapOperator<T>
K
- the type of the keys that will be createdV
- the type of the values that will be createdkeyFunction
- the function for building the keysvalueFunction
- the function for building the values
<K,V> ILevel0MapOperator<I,K,Set<V>> toGroupMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
ConvertibleToMapOfSetOperator
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values. Values with the same key will be grouped into sets.
toGroupMap
in interface ConvertibleToMapOfSetOperator<T>
K
- the type of the keys that will be createdV
- the type of the values that will be createdmapBuilder
- the map builder function to be used
<K,V> ILevel0MapOperator<I,K,Set<V>> toGroupMap(IFunction<? super T,K> keyFunction, IFunction<? super T,V> valueFunction)
ConvertibleToMapOfSetOperator
Converts the target object to a map by inputting the original target's elements into the specified map builder (a function returning map entries) which will create the resulting keys and values. Values with the same key will be grouped into sets.
toGroupMap
in interface ConvertibleToMapOfSetOperator<T>
K
- the type of the keys that will be createdV
- the type of the values that will be createdkeyFunction
- the function for building the keysvalueFunction
- the function for building the values
ILevel0MapOperator<I,T,T> couple()
ConvertibleToMapOperator
Converts the target object to a map, by using the even elements (starting at 0) as keys, and the odd elements as values.
couple
in interface ConvertibleToMapOperator<T>
ILevel0MapOperator<I,T,Set<T>> coupleAndGroup()
ConvertibleToMapOfSetOperator
Converts the target object to a map, by using the even elements (starting at 0) as keys, and the odd elements as values. Values with the same key will be grouped into sets.
coupleAndGroup
in interface ConvertibleToMapOfSetOperator<T>
<K> ILevel0MapOperator<I,K,T> zipKeys(K... keys)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
zipKeys
in interface ConvertibleToMapOperator<T>
K
- the type of the keyskeys
- the new keys
<V> ILevel0MapOperator<I,T,V> zipValues(V... values)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value.
zipValues
in interface ConvertibleToMapOperator<T>
V
- the type of the valuesvalues
- the new values
<K> ILevel0MapOperator<I,K,T> zipKeysFrom(Collection<K> keys)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
zipKeysFrom
in interface ConvertibleToMapOperator<T>
K
- the type of the keyskeys
- the new keys
<V> ILevel0MapOperator<I,T,V> zipValuesFrom(Collection<V> values)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value.
zipValuesFrom
in interface ConvertibleToMapOperator<T>
V
- the type of the valuesvalues
- the new values
<K> ILevel0MapOperator<I,K,T> zipKeysFrom(K[] keys)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as values and setting the specified objects as keys.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
zipKeysFrom
in interface ConvertibleToMapOperator<T>
K
- the type of the keyskeys
- the new keys
<V> ILevel0MapOperator<I,T,V> zipValuesFrom(V[] values)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value.
zipValuesFrom
in interface ConvertibleToMapOperator<T>
V
- the type of the valuesvalues
- the new values
<K> ILevel0MapOperator<I,K,T> zipKeysBy(IFunction<? super T,K> keyEval)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as values and applying an evaluator (keyEval) to them in order to obtain their corresponding keys.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
zipKeysBy
in interface ConvertibleToMapOperator<T>
K
- the type of the keys that will be createdkeyEval
- the evaluator used for obtaining the keys
<V> ILevel0MapOperator<I,T,V> zipValuesBy(IFunction<? super T,V> valueEval)
ConvertibleToMapOperator
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value.
Note that if more than one value get the same key, only the last one will be in the resulting map (the other ones will be overwritten).
zipValuesBy
in interface ConvertibleToMapOperator<T>
V
- the type of the values that will be createdvalueEval
- the evaluator used for obtaining the values
<K> ILevel0MapOperator<I,K,Set<T>> zipAndGroupKeys(K... keys)
ConvertibleToMapOfSetOperator
Converts the target object to a map by using the original target's elements as values the specified objects as keys. Values with the same key will be grouped into lists.
zipAndGroupKeys
in interface ConvertibleToMapOfSetOperator<T>
K
- the type of the keys that will be createdkeys
- the keys to be zipped
<V> ILevel0MapOperator<I,T,Set<V>> zipAndGroupValues(V... values)
ConvertibleToMapOfSetOperator
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. Values with the same key will be grouped into lists.
zipAndGroupValues
in interface ConvertibleToMapOfSetOperator<T>
V
- the type of the values that will be createdvalues
- the values to be zipped
<K> ILevel0MapOperator<I,K,Set<T>> zipAndGroupKeysFrom(Collection<K> keys)
ConvertibleToMapOfSetOperator
Converts the target object to a map by using the original target's elements as values the specified objects as keys. Values with the same key will be grouped into lists.
zipAndGroupKeysFrom
in interface ConvertibleToMapOfSetOperator<T>
K
- the type of the keys that will be createdkeys
- the keys to be zipped
<V> ILevel0MapOperator<I,T,Set<V>> zipAndGroupValuesFrom(Collection<V> values)
ConvertibleToMapOfSetOperator
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. Values with the same key will be grouped into lists.
zipAndGroupValuesFrom
in interface ConvertibleToMapOfSetOperator<T>
V
- the type of the values that will be createdvalues
- the values to be zipped
<K> ILevel0MapOperator<I,K,Set<T>> zipAndGroupKeysFrom(K[] keys)
ConvertibleToMapOfSetOperator
Converts the target object to a map by using the original target's elements as values the specified objects as keys. Values with the same key will be grouped into lists.
zipAndGroupKeysFrom
in interface ConvertibleToMapOfSetOperator<T>
K
- the type of the keys that will be createdkeys
- the keys to be zipped
<V> ILevel0MapOperator<I,T,Set<V>> zipAndGroupValuesFrom(V[] values)
ConvertibleToMapOfSetOperator
Converts the target object to a map by using the original target's elements as keys and the specified objects as values. Values with the same key will be grouped into lists.
zipAndGroupValuesFrom
in interface ConvertibleToMapOfSetOperator<T>
V
- the type of the values that will be createdvalues
- the values to be zipped
<K> ILevel0MapOperator<I,K,Set<T>> zipAndGroupKeysBy(IFunction<? super T,K> keyEval)
ConvertibleToMapOfSetOperator
Converts the target object to a map by using the original target's elements as values and applying an evaluator (keyEval) to them in order to obtain their corresponding keys. Values with the same key will be grouped into sets.
zipAndGroupKeysBy
in interface ConvertibleToMapOfSetOperator<T>
K
- the type of the keys that will be createdkeyEval
- the evaluator used for obtaining the keys
<V> ILevel0MapOperator<I,T,Set<V>> zipAndGroupValuesBy(IFunction<? super T,V> valueEval)
ConvertibleToMapOfSetOperator
Converts the target object to a map by using the original target's elements as keys and applying an evaluator (valueEval) to them in order to obtain their corresponding value. Values with the same key will be grouped into sets.
zipAndGroupValuesBy
in interface ConvertibleToMapOfSetOperator<T>
V
- the type of the values that will be createdvalueEval
- the evaluator used for obtaining the values
ILevel0GenericUniqOperator<I,Set<T>> generic()
GenerizableOperator
Converts the specialized structure operator into generic operators (with no specific methods for structures - e.g. forEach())
generic
in interface GenerizableOperator<I,Set<T>>
ILevel0SetOperator<I,T> replaceWith(Set<T> replacement)
ReplaceableOperator
Replaces the current target object with the specified replacement.
replaceWith
in interface ReplaceableOperator<Set<T>>
replacement
- the object which will replace the current target object.
ILevel0SetOperator<I,T> replaceIfNullWith(Set<T> replacement)
ReplaceableIfNullOperator
Replaces the current target object with the specified replacement if the current target is null.
replaceIfNullWith
in interface ReplaceableIfNullOperator<Set<T>>
replacement
- the object which will replace the current target object if target is null.
<X> ILevel0GenericUniqOperator<I,X> exec(IFunction<? super Set<T>,X> function)
ExecutableSetOperator
Executes the specified function on the target set, creating a new generic operator containing the result of the execution and setting the new operator type to the one specified.
exec
in interface ExecutableSetOperator<T>
X
- the type of the result objectfunction
- the function to be executed
<X> ILevel0SetOperator<I,X> execAsSet(IFunction<? super Set<T>,? extends Set<X>> function)
ExecutableSetOperator
Executes the specified function on the target set, creating a new set operator containing the result of the execution.
This function must be able to take as input an object of the current operator's target type, and will return an object of a different type but same structure, which will be from then on the new operator's target type.
execAsSet
in interface ExecutableSetOperator<T>
X
- the type of the result elementsfunction
- the function to be executed
ILevel0SetOperator<I,T> execIfNotNullAsSet(IFunction<? super Set<T>,? extends Set<? extends T>> function)
ExecutableSetOperator
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNotNullAsSet
in interface ExecutableSetOperator<T>
function
- the function to be executed on the selected elements
ILevel0SetOperator<I,T> execIfNullAsSet(IFunction<? super Set<T>,? extends Set<? extends T>> function)
ExecutableSetOperator
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNullAsSet
in interface ExecutableSetOperator<T>
function
- the function to be executed on the selected elements
ILevel0SetOperator<I,T> execIfTrueAsSet(IFunction<? super Set<T>,Boolean> eval, IFunction<? super Set<T>,? extends Set<? extends T>> function)
ExecutableSetOperator
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfTrueAsSet
in interface ExecutableSetOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
ILevel0SetOperator<I,T> execIfFalseAsSet(IFunction<? super Set<T>,Boolean> eval, IFunction<? super Set<T>,? extends Set<? extends T>> function)
ExecutableSetOperator
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfFalseAsSet
in interface ExecutableSetOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
<X> ILevel0SetOperator<I,X> execIfNotNullAsSet(IFunction<? super Set<T>,? extends Set<X>> function, IFunction<? super Set<T>,? extends Set<X>> elseFunction)
ExecutableSetOperator
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNotNullAsSet
in interface ExecutableSetOperator<T>
X
- the new type returned by the functionsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
<X> ILevel0SetOperator<I,X> execIfNullAsSet(IFunction<? super Set<T>,? extends Set<X>> function, IFunction<? super Set<T>,? extends Set<X>> elseFunction)
ExecutableSetOperator
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNullAsSet
in interface ExecutableSetOperator<T>
X
- the new type returned by the functionsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
<X> ILevel0SetOperator<I,X> execIfTrueAsSet(IFunction<? super Set<T>,Boolean> eval, IFunction<? super Set<T>,? extends Set<X>> function, IFunction<? super Set<T>,? extends Set<X>> elseFunction)
ExecutableSetOperator
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfTrueAsSet
in interface ExecutableSetOperator<T>
X
- the new type returned by the functionseval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
<X> ILevel0SetOperator<I,X> execIfFalseAsSet(IFunction<? super Set<T>,Boolean> eval, IFunction<? super Set<T>,? extends Set<X>> function, IFunction<? super Set<T>,? extends Set<X>> elseFunction)
ExecutableSetOperator
Executes a function in a way equivalent to ExecutableSetOperator.execAsSet(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfFalseAsSet
in interface ExecutableSetOperator<T>
X
- the new type returned by the functionseval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
<X> ILevel0SetOperator<I,X> map(IFunction<? super T,X> function)
ExecutableSetOperator
Executes the specified function on each of the elements, creating a new operator containing the result of all the executions and setting the new operator type to the one resulting from the function execution.
This method is equivalent to forEach().exec(function).endFor().
map
in interface ExecutableSetOperator<T>
X
- the type of the result elementsfunction
- the function to be executed
ILevel0SetOperator<I,T> mapIfNotNull(IFunction<? super T,? extends T> function)
ExecutableSetOperator
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNotNull
in interface ExecutableSetOperator<T>
function
- the function to be executed on the selected elements
ILevel0SetOperator<I,T> mapIfNull(IFunction<? super T,? extends T> function)
ExecutableSetOperator
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNull
in interface ExecutableSetOperator<T>
function
- the function to be executed on the selected elements
ILevel0SetOperator<I,T> mapIfTrue(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
ExecutableSetOperator
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfTrue
in interface ExecutableSetOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
ILevel0SetOperator<I,T> mapIfFalse(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
ExecutableSetOperator
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfFalse
in interface ExecutableSetOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
<X> ILevel0SetOperator<I,X> mapIfNotNull(IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableSetOperator
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNotNull
in interface ExecutableSetOperator<T>
X
- the new type returned by the functionsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
<X> ILevel0SetOperator<I,X> mapIfNull(IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableSetOperator
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfNull
in interface ExecutableSetOperator<T>
X
- the new type returned by the functionsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
<X> ILevel0SetOperator<I,X> mapIfTrue(IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableSetOperator
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfTrue
in interface ExecutableSetOperator<T>
X
- the new type returned by the functionseval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
<X> ILevel0SetOperator<I,X> mapIfFalse(IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableSetOperator
Maps a function in a way equivalent to ExecutableSetOperator.map(IFunction)
but only
on selected elements, leaving all other elements untouched.
mapIfFalse
in interface ExecutableSetOperator<T>
X
- the new type returned by the functionseval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elementselseFunction
- the function to be executed on the non-selected elements
<X> ILevel0SetOperator<I,X> of(org.javaruntype.type.Type<X> type)
CastableToSetOperator
Casts the operator's target as a set of the specified type.
of
in interface CastableToSetOperator
X
- the type of the elements of the settype
- the type of the elements of the set
<X> ILevel0SetOperator<I,X> castToSetOf(org.javaruntype.type.Type<X> type)
CastableToSetOperator
Casts the operator's target as a set of the specified type.
castToSetOf
in interface CastableToSetOperator
X
- the type of the elements of the settype
- the type of the elements of the set
ILevel0GenericUniqOperator<I,Boolean> any(IFunction<? super T,Boolean> eval)
any
in interface TotalizableOperator<I,T>
ILevel0GenericUniqOperator<I,Boolean> all(IFunction<? super T,Boolean> eval)
all
in interface TotalizableOperator<I,T>
ILevel0SetOperator<I,T> reverse()
ReversibleOperator
Reverses the elements of the structure.
reverse
in interface ReversibleOperator<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |