Apama Documentation : Developing Apama Applications : EPL Reference : Types : Type methods and instance methods
Type methods and instance methods
There are two kinds of inbuilt methods: type methods and instance methods. Type methods are associated with types. Instance methods are associated with values.
Type methods
To call a type method, you specify the name of the type followed by a period, followed by the method name with its parameters enclosed in parentheses. Some methods do not have parameters and for them you must supply an empty parameter list.
Examples:
event someEvent;
{   
integer n;
}
integer i;
i:=integer.getUnique();
print someEvent.getName();
Instance methods
Each type (except action), whether primitive or reference, has a number of instance methods that provide a number of useful functions and operations on instance variables of that type. These methods are quite similar to actions except that they are predefined and associated with variables, not monitors or events.
To call an instance method, you specify an expression followed by a period and the name of the method, followed by a parenthesized list of actual parameters or arguments to be passed to the method when it is called. Some methods do not have parameters and for them you must supply an empty parameter list.
Examples:
integer i := 642;
float f;
f := i.toFloat ();
print f.formatFixed (5);
See Also
See the information in the following sections for the methods you can call on types and instances:
*Primitive and string types
*Reference types
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback