FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION |
Action summary | |
---|---|
com.apamax.functional.Functional |
accumulate(any func)
Returns a generator which accumulates over the underlying container, returning the result after accumulating each item. Similar to reduce, but returns a generator for each item in turn, rather than just the final total. |
com.apamax.functional.Functional |
argmap(any func)
Use the contents as a list of arguments with which to invoke a function. |
com.apamax.functional.Functional |
consume(integer n)
Consume a given number of items from the contained generator and discard them. |
com.apamax.functional.Functional | static count()
Returns a Functional generator producing sequential integers with the first one being 0. |
com.apamax.functional.Functional | static cycle(any seq)
Iterates through a sequence of items and continues looping forever. |
com.apamax.functional.Functional |
filter(any func)
Filters the contents using a boolean predicate func. |
any |
generate()
If this Functional is wrapping a generator, generate one item with the underlying generator and return it. |
com.apamax.functional.Functional | static generator(any func)
Create a generator from a function, which is passed the previous value and should return the next value. The initial value will be a default-initialized TYPE and the result of first generation will be the result of invoking func on that default-initialized value. To specify the initial value, use generateFrom. |
com.apamax.functional.Functional | static generatorFrom(any start, any func)
Create a generator from a function, which is passed the previous value and should return the next value. |
any |
get()
Return the wrapped container. |
void | static getAllEvents(string valueEventName, dictionary<string, any> valueEventFields, string endEventName, dictionary<string, any> endEventFields, float timeout, any onComplete, any onTimeout)
Listens for all of the given events and then calls the given function once a second event arrives. |
com.apamax.functional.Functional |
listenForAnyOf(string typeName, string fieldName, dictionary<string, any> otherFields, any arrivedAction)
Takes a sequence of values and starts a listener one for each of them, with an action to call if any of those events arrive. |
com.apamax.functional.Functional |
map(any func)
Maps the contents using a function. |
integer |
quantify(any pred)
Counts how many times a predicate is true for the values of a sequence or dictionary. Works on a sequence or a dictionary. The result is an actual value, not a Functional, since it's no longer a container. |
com.apamax.functional.Functional | static range(integer start, integer end, integer stride)
Returns a Functional range of integers from start (inclusive) to end (exclusive), incrementing stride each time. |
any |
reduce(any func)
Accumulates all of the contents using an accumulator function, returning the final result. |
com.apamax.functional.Functional | static repeat(any item)
Repeats the given element forever. |
com.apamax.functional.Functional | static sequenceOf(any item, integer n)
Returns a sequence containing the given item the given number of times. |
com.apamax.functional.Functional |
slice(integer start, integer end, integer stride)
Returns a given sub-range as a finite sequence. |
void |
waitForAllCompleted(string typeName, string fieldName, float timeout, any onCompleted, any onTimeout)
Wait for completion of several asynchronous tasks. |
Action detail |
---|
com.apamax.functional.Functional accumulate(any func)Returns a generator which accumulates over the underlying container, returning the result after accumulating each item. Similar to reduce, but returns a generator for each item in turn, rather than just the final total.
com.apamax.functional.Functional argmap(any func)Use the contents as a list of arguments with which to invoke a function.
com.apamax.functional.Functional consume(integer n)Consume a given number of items from the contained generator and discard them.
com.apamax.functional.Functional static count()Returns a Functional generator producing sequential integers with the first one being 0.
com.apamax.functional.Functional static cycle(any seq)Iterates through a sequence of items and continues looping forever.
com.apamax.functional.Functional filter(any func)Filters the contents using a boolean predicate func.
any generate()If this Functional is wrapping a generator, generate one item with the underlying generator and return it.
com.apamax.functional.Functional static generator(any func)Create a generator from a function, which is passed the previous value and should return the next value. The initial value will be a default-initialized TYPE and the result of first generation will be the result of invoking func on that default-initialized value. To specify the initial value, use generateFrom.
com.apamax.functional.Functional static generatorFrom(any start, any func)Create a generator from a function, which is passed the previous value and should return the next value.
any get()Return the wrapped container.
void static getAllEvents(string valueEventName, dictionary<string, any> valueEventFields, string endEventName, dictionary<string, any> endEventFields, float timeout, any onComplete, any onTimeout)Listens for all of the given events and then calls the given function once a second event arrives.
com.apamax.functional.Functional listenForAnyOf(string typeName, string fieldName, dictionary<string, any> otherFields, any arrivedAction)Takes a sequence of values and starts a listener one for each of them, with an action to call if any of those events arrive.
com.apamax.functional.Functional map(any func)Maps the contents using a function.
integer quantify(any pred)Counts how many times a predicate is true for the values of a sequence or dictionary. Works on a sequence or a dictionary. The result is an actual value, not a Functional, since it's no longer a container.
com.apamax.functional.Functional static range(integer start, integer end, integer stride)Returns a Functional range of integers from start (inclusive) to end (exclusive), incrementing stride each time.
any reduce(any func)Accumulates all of the contents using an accumulator function, returning the final result.
com.apamax.functional.Functional static repeat(any item)Repeats the given element forever.
com.apamax.functional.Functional static sequenceOf(any item, integer n)Returns a sequence containing the given item the given number of times.
com.apamax.functional.Functional slice(integer start, integer end, integer stride)Returns a given sub-range as a finite sequence.
void waitForAllCompleted(string typeName, string fieldName, float timeout, any onCompleted, any onTimeout)Wait for completion of several asynchronous tasks.
FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION |