|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILevel0GenericUniqOperator<I,T>
Method Summary | ||
---|---|---|
|
castTo(org.javaruntype.type.Type<X> type)
Casts the operator's target as the specified type. |
|
|
castToArrayOf(org.javaruntype.type.Type<X> type)
Casts the operator's target as an array of the specified type. |
|
|
castToListOf(org.javaruntype.type.Type<X> type)
Casts the operator's target as a list of the specified type. |
|
|
castToMapOf(org.javaruntype.type.Type<K> keyType,
org.javaruntype.type.Type<V> valueType)
Casts the operator's target as a map of the specified types. |
|
|
castToSetOf(org.javaruntype.type.Type<X> type)
Casts the operator's target as a set of the specified type. |
|
|
exec(IFunction<? super T,X> function)
Executes the specified function on the target object, creating a new operator containing the result of the execution. |
|
ILevel0GenericUniqOperator<I,T> |
execIfFalse(IFunction<? super T,Boolean> eval,
IFunction<? super T,? extends T> function)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfFalse(IFunction<? super T,Boolean> eval,
IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0GenericUniqOperator<I,T> |
execIfNotNull(IFunction<? super T,? extends T> function)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfNotNull(IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0GenericUniqOperator<I,T> |
execIfNull(IFunction<? super T,? extends T> function)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfNull(IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0GenericUniqOperator<I,T> |
execIfTrue(IFunction<? super T,Boolean> eval,
IFunction<? super T,? extends T> function)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
|
execIfTrue(IFunction<? super T,Boolean> eval,
IFunction<? super T,X> function,
IFunction<? super T,X> elseFunction)
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction) but only
on selected elements, leaving all other elements untouched. |
|
ILevel0GenericUniqSelectedOperator<I,T> |
ifFalse(IFunction<? super T,Boolean> eval)
Selects only those targets for which the specified evaluator returns false. |
|
ILevel0GenericUniqSelectedOperator<I,T> |
ifNotNull()
Selects only those targets which are not null. |
|
ILevel0GenericUniqSelectedOperator<I,T> |
ifNull()
Selects only those targets which are null. |
|
ILevel0GenericUniqSelectedOperator<I,T> |
ifTrue(IFunction<? super T,Boolean> eval)
Selects only those targets for which the specified evaluator returns true. |
|
ILevel0ArrayOperator<I,T> |
intoSingletonArrayOf(org.javaruntype.type.Type<T> type)
Builds an array of the specified type containing the operator's targets. |
|
ILevel0ListOperator<I,T> |
intoSingletonList()
Builds a list containing the operator's targets. |
|
|
intoSingletonMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
Builds a map by inputting the operator's targets into a map builder object (a function returning map entries), which is in charge of creating the corresponding key and value for each original target. |
|
ILevel0SetOperator<I,T> |
intoSingletonSet()
Builds a set containing the operator's targets. |
|
ILevel0GenericUniqOperator<I,T> |
replaceIfNullWith(T replacement)
Replaces the current target object with the specified replacement if the current target is null. |
|
ILevel0GenericUniqOperator<I,T> |
replaceWith(T replacement)
Replaces the current target object with the specified replacement. |
|
|
zipKey(K key)
Builds a one-entry map using the operator's target as a value, and the specified object as a key. |
|
|
zipKeyBy(IFunction<? super T,K> keyEval)
Builds a one-entry map using the operator's target as a value, and the result of executing the keyEval evaluator on the target as a key. |
|
|
zipValue(V value)
Builds a one-entry map using the operator's target as a key, and the specified object as a value. |
|
|
zipValueBy(IFunction<? super T,V> valueEval)
Builds a one-entry map using the operator's target as a key, and the result of executing the valueEval evaluator on the target as a value. |
Method Detail |
---|
ILevel0GenericUniqSelectedOperator<I,T> ifTrue(IFunction<? super 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<T>
eval
- the evaluator to be used for selecting targets.
ILevel0GenericUniqSelectedOperator<I,T> ifFalse(IFunction<? super 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<T>
eval
- the evaluator to be used for selecting targets.
ILevel0GenericUniqSelectedOperator<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<T>
ILevel0GenericUniqSelectedOperator<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<T>
ILevel0GenericUniqOperator<I,T> replaceWith(T replacement)
ReplaceableOperator
Replaces the current target object with the specified replacement.
replaceWith
in interface ReplaceableOperator<T>
replacement
- the object which will replace the current target object.
ILevel0GenericUniqOperator<I,T> replaceIfNullWith(T replacement)
ReplaceableIfNullOperator
Replaces the current target object with the specified replacement if the current target is null.
replaceIfNullWith
in interface ReplaceableIfNullOperator<T>
replacement
- the object which will replace the current target object if target is null.
<X> ILevel0GenericUniqOperator<I,X> exec(IFunction<? super T,X> function)
ExecutableOperator
Executes the specified function on the target object, creating a new operator containing the result of the execution.
This function must be able to take as input an object of type T (the current operator's target type) and will return an object of type X, which will be from then on the new operator's target type.
exec
in interface ExecutableOperator<T>
X
- the type of the result, and new type for the operatorfunction
- the function to be executed
ILevel0GenericUniqOperator<I,T> execIfNotNull(IFunction<? super T,? extends T> function)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNotNull
in interface ExecutableOperator<T>
function
- the function to be executed on the selected elements
ILevel0GenericUniqOperator<I,T> execIfNull(IFunction<? super T,? extends T> function)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNull
in interface ExecutableOperator<T>
function
- the function to be executed on the selected elements
ILevel0GenericUniqOperator<I,T> execIfTrue(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfTrue
in interface ExecutableOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
ILevel0GenericUniqOperator<I,T> execIfFalse(IFunction<? super T,Boolean> eval, IFunction<? super T,? extends T> function)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfFalse
in interface ExecutableOperator<T>
eval
- the evaluation function used to select elementsfunction
- the function to be executed on the selected elements
<X> ILevel0GenericUniqOperator<I,X> execIfNotNull(IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNotNull
in interface ExecutableOperator<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> ILevel0GenericUniqOperator<I,X> execIfNull(IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfNull
in interface ExecutableOperator<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> ILevel0GenericUniqOperator<I,X> execIfTrue(IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfTrue
in interface ExecutableOperator<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> ILevel0GenericUniqOperator<I,X> execIfFalse(IFunction<? super T,Boolean> eval, IFunction<? super T,X> function, IFunction<? super T,X> elseFunction)
ExecutableOperator
Executes a function in a way equivalent to ExecutableOperator.exec(IFunction)
but only
on selected elements, leaving all other elements untouched.
execIfFalse
in interface ExecutableOperator<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> ILevel0GenericUniqOperator<I,X> castTo(org.javaruntype.type.Type<X> type)
CastableToTypeOperator
Casts the operator's target as the specified type.
castTo
in interface CastableToTypeOperator<T>
X
- the type of the targetstype
- the type of targets
<X> ILevel0ArrayOperator<I,X> castToArrayOf(org.javaruntype.type.Type<X> type)
CastableToStructuresOperator
Casts the operator's target as an array of the specified type.
castToArrayOf
in interface CastableToStructuresOperator
X
- the type of the elements of the arraytype
- the type of the elements of the array
<X> ILevel0ListOperator<I,X> castToListOf(org.javaruntype.type.Type<X> type)
CastableToStructuresOperator
Casts the operator's target as a list of the specified type.
castToListOf
in interface CastableToStructuresOperator
X
- the type of the elements of the listtype
- the type of the elements of the list
<K,V> ILevel0MapOperator<I,K,V> castToMapOf(org.javaruntype.type.Type<K> keyType, org.javaruntype.type.Type<V> valueType)
CastableToStructuresOperator
Casts the operator's target as a map of the specified types.
castToMapOf
in interface CastableToStructuresOperator
K
- the type for the map's keysV
- the type for the map's valueskeyType
- the type for the map's keysvalueType
- the type for the map's values
<X> ILevel0SetOperator<I,X> castToSetOf(org.javaruntype.type.Type<X> type)
CastableToStructuresOperator
Casts the operator's target as a set of the specified type.
castToSetOf
in interface CastableToStructuresOperator
X
- the type of the elements of the settype
- the type of the elements of the set
ILevel0ListOperator<I,T> intoSingletonList()
BuilderOperator
Builds a list containing the operator's targets.
intoSingletonList
in interface BuilderOperator<I,T>
ILevel0SetOperator<I,T> intoSingletonSet()
BuilderOperator
Builds a set containing the operator's targets.
intoSingletonSet
in interface BuilderOperator<I,T>
ILevel0ArrayOperator<I,T> intoSingletonArrayOf(org.javaruntype.type.Type<T> type)
BuilderOperator
Builds an array of the specified type containing the operator's targets.
intoSingletonArrayOf
in interface BuilderOperator<I,T>
type
- the type if which the array will be instantiated
<K,V> ILevel0MapOperator<I,K,V> intoSingletonMap(IFunction<? super T,Map.Entry<K,V>> mapBuilder)
BuilderOperator
Builds a map by inputting the operator's targets into a map builder object (a function returning map entries), which is in charge of creating the corresponding key and value for each original target. If two values have the same key, all of them but the last to be evaluated will be overwritten.
intoSingletonMap
in interface BuilderOperator<I,T>
K
- the type of the keys returned by the map builderV
- the type of the values returned by the map buildermapBuilder
- the map builder function
<K> ILevel0MapOperator<I,K,T> zipKeyBy(IFunction<? super T,K> keyEval)
BuilderOperator
Builds a one-entry map using the operator's target as a value, and the result of executing the keyEval evaluator on the target as a key.
zipKeyBy
in interface BuilderOperator<I,T>
K
- the type of the new key, resulting from evaluating keyEvalkeyEval
- the evaluator to be used for obtaining the key
<V> ILevel0MapOperator<I,T,V> zipValueBy(IFunction<? super T,V> valueEval)
BuilderOperator
Builds a one-entry map using the operator's target as a key, and the result of executing the valueEval evaluator on the target as a value.
zipValueBy
in interface BuilderOperator<I,T>
V
- the type of the new value, resulting from evaluating valueEvalvalueEval
- the evaluator to be used for obtaining the value
<K> ILevel0MapOperator<I,K,T> zipKey(K key)
BuilderOperator
Builds a one-entry map using the operator's target as a value, and the specified object as a key.
zipKey
in interface BuilderOperator<I,T>
K
- the type of the new key, resulting from evaluating keyEvalkey
- the key to be zipped
<V> ILevel0MapOperator<I,T,V> zipValue(V value)
BuilderOperator
Builds a one-entry map using the operator's target as a key, and the specified object as a value.
zipValue
in interface BuilderOperator<I,T>
V
- the type of the new value, resulting from evaluating valueEvalvalue
- the value to be zipped
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |