Apama Documentation : Developing Apama Applications : EPL Methods Quick Reference
EPL Methods Quick Reference
This reference lists all EPL methods. It is meant as a concise reminder of the method signatures for convenient printing and viewing. For more detailed information on these methods, see Types, which is part of the EPL Reference.
action methods
The only operation that you can perform on an action variable is to call it. You do this in the normal way by passing a set of parameters in parentheses after an expression that evaluates to the action variable. For an example and additional details, see Using action type variables.
For more information on the action type, see action.
boolean methods
Method
Result
canParse(string)
Returns true if the string argument can be successfully parsed.
parse(string)
Returns the boolean instance represented by the string argument.
toString()
Returns a string representation of the boolean.
For more information on the boolean type, see boolean.
Channel methods
Method
Result
canParse()
Returns true if the string argument can be successfully parsed to create a Channel object.
clone()
Returns a new Channel that is an exact copy of the Channel the clone() method is called on. The original content of the Channel is copied into the new Channel.
empty()
Returns true if the Channel object contains an empty context.
parse()
Returns the Channel instance represented by the string argument.
toString()
Returns a string representation of the Channel object.
For more information on the Channel type, see Channel.
chunk methods
Method
Result
clone()
Returns a new chunk that is an exact copy of the chunk that clone() was called on.
empty()
Returns true if the chunk is empty.
getOwner()
Returns a string that contains the name of the correlator plug-in that the chunk belongs to.
For more information on the chunk type, see chunk.
context methods
Method
Result
current()
Returns a context object that is a reference to the current context.
getId()
Returns an integer that is the ID of the context.
getName()
Returns a string that is the name of the context.
isPublic()
Returns a boolean true if the context is public.
toString()
Returns a string that contains the properties of the context.
In addition, the current() static method returns a reference to the current context.
For more information on the context type, see context.
decimal and float methods
Unless noted otherwise, if you call a method on a decimal type, the return value is a decimal, and if you call the method on a float type, the return value is a float.
Method
Result
abs()
Returns the absolute value.
acos()
Returns the inverse cosine.
acosh()
Returns the inverse hyperbolic cosine.
asin()
Returns the inverse sine in radians.
asinh()
Returns the inverse hyperbolic sine.
atan()
Returns the inverse tangent.
atan2(y)
Returns the two-parameter inverse tangent.
atanh()
Returns the inverse hyperbolic tangent.
bitEquals(decimal)
bitEquals(float)
Returns true if the value it is called on and the value passed as an argument to the method are the same. The value the method is called on and the argument to the method must both be decimal types or must both be float types.
canParse(string)
Returns true if the argument can be successfully parsed.
cbrt()
Returns the cube root.
ceil()
Returns the smallest possible integer that is greater than or equal to the operand.
cos()
Returns the cosine.
cosh()
Returns the hyperbolic cosine.
erf()
Returns the error function.
exp()
Returns e to the power x or ex, where x is the value of the decimal or float and where e is approximately 2.71828183.
exponent()
When called on a float value: returns the exponent where x = mantissa*2exponent assuming 0.5 <= |mantissa| < 1.0.
When called on a decimal value: returns the exponent where x = mantissa*10exponent assuming 0.1 <= |mantissa| < 1.0.
floor()
Returns the largest possible integer that is less than or equal to the value the method is called on.
fmod(y)
Returns mod y in exact arithmetic.
formatFixed(integer)
Returns a string representation of the value the method is called on where the value is rounded to the number of decimal places specified in the argument.
formatScientific(integer)
Returns a string representation of the value the method is called on where the value is truncated to the number of significant figures specified in the argument and formatted in Scientific Notation.
fractionalPart()
Returns the fractional component.
gammal()
Returns the logarithm of the gamma function.
ilogb()
Returns an integer that is the binary exponent of non-zero operand.
integralPart()
Returns an integer that is the integral part of a floating point value. Similar to floor() which rounds down, and ceil() which rounds up. integralPart() rounds towards zero.
isFinite()
Returns true if and only if the value it is called on is not +Infinity, -Infinity, or NaN.
isInfinite()
Returns true if and only if the value it is called on is +Infinity or -Infinity.
isNaN()
Returns true if and only if the value it is called on is NaN.
ln()
Returns the natural log.
log10()
Returns the log to base 10.
mantissa()
When called on a float value: returns a mantissa where x = mantissa*2exponent assuming that 0.5 <= |mantissa| < 1.0.
When called on a decimal value: returns a mantissa where x = mantissa*10exponent assuming that 0.1 <= |mantissa| < 1.0.
max(decimal, decimal)
max(float, float)
Returns the value of the larger operand. You can call this method on the decimal or float type, or on an instance of a decimal or float type.
min(decimal, decimal)
min(float, float)
Returns the value of the smaller operand. You can call this method on the decimal or float type, or on an instance of a decimal or float type.
nextafter(y)
Returns the next distinct floating-point number after the operand that is representable in the underlying type in the direction toward y.
parse(string)
Returns the decimal or float instance represented by the string argument.
pow(decimal)
Returns x to the power y (where y is the argument) or xy.
pow(float)
rand()
Returns a random value from 0.0 up to (but not including) the value the method was invoked on.
round()
Rounds to the nearest integer using banker's rounding.
scalbn(integer)
When called on a float value: returns x*2n, where n is of integer type.
When called on a decimal value: returns x*10n, where n is of integer type.
sin()
Returns the sine.
sinh()
Returns the hyperbolic sine.
sqrt()
Returns the positive square root.
tan()
Returns the tangent.
tanh()
Returns the hyperbolic tangent.
toDecimal()
Returns a decimal representation of the float.
toFloat()
Returns a float representation of the decimal.
toString()
Returns a string representation.
For more information on the decimal type, see decimal.
For more information on the float type, see float.
dictionary methods
Method
Result
add(key, item)
Adds an entry to the dictionary.
canParse(string)
When the item type is parseable: returns true if the string argument can be successfully parsed to create a dictionary object.
clear()
Sets the size of the dictionary to 0, deleting all entries.
clone()
Returns a new dictionary that is an exact copy.
getOr(key, alternative)
Returns the item that corresponds to the specified key. If the specified key is not in the dictionary, the getOr() method returns alternative.
getOrDefault(key)
Retrieves an existing item by its key, or returns a default instance of the dictionary's item type if the dictionary does not contain the specified key.
getOrAdd(key, alternative)
Retrieves an existing item by its key, or adds the specified key to the dictionary with alternative as its value if it is not already present and also returns the specified alternative.
getOrAddDefault(key)
Retrieves an existing item by its key or, if it is not already present, adds the specified key with a default instance of the dictionary's item type and returns that instance.
hasKey(key)
Returns true if a key exists within the dictionary.
keys()
Returns a sequence of the dictionary's keys sorted in ascending order.
parse(string)
When the item type is parseable: returns the dictionary object represented by the string argument.
remove(key)
Removes an entry by key.
size()
Returns as an integer the number of elements in the dictionary.
toString()
Converts the entire dictionary in ascending order of key values to a string.
values()
Returns a sequence of the dictionary's items sorted in ascending order of keys.
[key]
Retrieves or overwrites an existing item by its key, or creates a new item.
For more information on the dictionary type, see dictionary.
event methods
Method
Result
canParse(string)
On events that are parseable: returns true if the string argument can be successfully parsed.
clone()
Returns a new event that is an exact copy.
getFieldNames()
Returns a sequence of strings that contain the field names of an event type.
getFieldTypes()
Returns a sequence of strings that contain the type names of an event type's fields.
getFieldValues()
Returns a sequence of strings that contain the field values of an event.
getName()
Returns a string whose value is an event's type name.
getTime()
Returns a float that indicates a time expressed in seconds since the epoch, January 1st, 1970.
isExternal()
Returns true if the event was generated by an external source.
parse(string)
On events that are parseable: returns the event object represented by the string argument.
toString()
Returns a string representation of the event.
For more information on the event type, see event.
Exception methods
The Exception type is defined in the com.apama.exceptions namespace.
Method
Result
getMessage()
Returns a string that contains the exception message.
getStackTrace()
Returns a sequence of StackTraceElement objects that represent the stack trace for when the exception was first thrown.
getType()
Returns a string that contains the exception type.
toString()
Returns a string that contains the exception message and the exception type.
toStringWithStackTrace()
Returns a string that contains the exception message, the exception type, and the stack trace elements.
For more information on the Exception type, see Exception.
integer methods
Method
Result
abs()
Returns as an integer the absolute value.
canParse(string)
Returns true if the argument can be successfully parsed.
getUnique()
Generates a unique integer in the scope of the correlator. This is a type method as well as an instance method.
max(integer, integer)
Returns as an integer the value of the larger operand. You can call this method on the integer type or on an instance of an integer type.
min(integer, integer)
Returns as an integer the value of the smaller operand. You can call this method on the integer type or on an instance of an integer type.
parse(string)
Returns the integer instance represented by the argument. You can call this method on the integer type or on an instance of an integer type.
pow(integer)
Returns as an integer the value of the operand to the power of the argument.
rand()
Returns a random integer value from 0 up to (but not including) the value of the operand.
toDecimal()
Returns a decimal representation.
toFloat()
Returns a float representation.
toString()
Returns a string representation.
For more information on the integer type, see integer.
listener methods
Method
Result
quit()
Immediately terminates the listener.
For more information on the listener type, see listener.
location methods
Method
Result
canParse(string)
Returns true if the argument can be successfully parsed.
clone()
Returns a new location that is an exact copy.
expand(float)
Returns a new location expanded by the value of the parameter in each direction.
inside(location)
Returns true if the location is entirely enclosed by the space defined by the parameter.
parse(string)
Returns the location instance represented by the argument.
toString()
Returns a string representation.
For more information on the location type, see location.
monitor methods
Method
Result
onload()
Invoked immediately after a monitor has been loaded.
ondie()
Invoked when a monitor instance terminates.
onunload()
Invoked after all instances of a monitor have terminated.
onBeginRecovery()
Invoked at the start of recovery of a persistence-enabled correlator.
onConcludeRecovery()
Invoked at the end of recovery of a persistence-enabled correlator.
For more information on monitors, see Monitors and Simple actions.
sequence methods
Method
Result
append(item)
Appends the item to the end of the operand.
appendSequence(sequence)
Appends the sequence to the end of the operand.
canParse(string)
Returns true if the string argument can be successfully parsed to create a sequence object.
clear()
Sets the size of the sequence to 0, deleting all entries.
clone()
Returns a new sequence that is an exact copy.
indexOf(item)
Returns as an integer the location of the first matching item.
insert(item, integer)
Inserts the item specified in the location indicated by the second argument.
parse(string)
Returns the sequence object represented by the string argument.
remove(integer)
Removes the nth element in the sequence, moves all the elements above it down, which reduces the size by 1. The first element in a sequence is at location 0.
reverse()
Reverses the order of the items in the sequence.
setCapacity(integer)
Sets the amount of memory initially allocated for the sequence.
setSize(integer)
Sets the number of elements in the sequence.
size()
Returns as an integer the number of elements in the sequence.
sort()
Sorts the sequence in ascending order.
toString()
Converts the sequence to a string.
[integer]
Retrieves or overwrites the sequence entry located at the index specified. EPL sequence elements are indexed from 0.
For more information on the sequence type, see sequence.
StackTraceElement methods
The StackTraceElement type is defined in the com.apama.exceptions namespace.
Method
Result
getActionName()
Returns a string that contains the name of the action in which the exception occurred.
getFilename()
Returns a string that contains the name of the file that contains the code in which the exception occurred.
getLineNumber()
Returns an integer that indicates the line number of the code in which the exception occurred.
getTypeName()
Returns a string that indicates the type (event, aggregate, monitor) that contains the action in which the exception occurred.
toString()
Returns a string whose format is "typeName.actionName() filename:linenumber".
For more information on the StackTraceElement type, see StackTraceElement.
stream methods
Method
Result
clone()
Returns the original stream. It does not clone it.
quit()
Causes a stream listener to terminate.
For more information on the stream type, see stream.
string methods
Method
Result
canParse(string)
Returns true if the string argument can be successfully parsed.
clone(string)
Returns a reference to the specified string.
find(substring)
Returns an integer indicating the index position of the argument. EPL string indices start at 0.
findFrom(substring, fromIndex)
Behaves like find(), but starts searching at fromIndex.
intern()
Marks the string as interned. Subsequent incoming events that contain a string that is identical to an interned string use the same string object.
join(sequence<string> s)
Concatenates the strings in s using the operand as a separator.
length()
Returns an integer indicating the length of the string.
ltrim()
Returns a string where all whitespace characters at the beginning have been removed.
parse(string)
Returns the string value represented by the string argument without enclosing that value in quotation marks. You can call this method on the string type or on an instance of a string type.
replaceAll(string1, string2)
Makes a copy of the string, replaces instances of string1 with instances of string2 and returns the revised string.
rtrim()
Returns a string where all whitespace characters at the end have been removed.
split(string)
Returns a sequence of strings that represent the argument split at occurrences of the operand string.
substring(integer, integer)
Returns the substring indicated by the integer arguments.
toBoolean()
Returns true if the string is "true".
toDecimal()
Returns a decimal representation of the string.
toFloat()
Returns a float representation of the string.
toInteger()
Returns an integer representation of the string.
toLower()
Returns an all-lowercase string representation.
toUpper()
Returns an all-uppercase string representation.
tokenize(string)
Categorizes each character in the argument as either part of a delimiter (the character appears in the operand string) or part of a token (any other character), divides the argument into tokens separated by delimiters, and returns the tokens as a sequence of strings.
toString()
Returns the contents of the string value, exactly the same as using the string directly.
For more information on the string type, see string.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback