Apama 10.3.1 | 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 descriptions of the built-in types in the API Reference for EPL (ApamaDoc) for the methods you can call on types and instances.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.