Apama 10.7.2 | Developing Apama Applications | EPL Reference | Types | Potentially cyclic types
 
Potentially cyclic types
 
Which types are potentially cyclic?
String form of potentially cyclic types
A cyclic object is an object that refers directly or indirectly to itself. For example:
event E {
   sequence<E> seq;
}
E e := new E;
e.seq.append(e);
When an object is cyclic or contains a reference to a cyclic object, it can be referred to as containing cycles. If it is possible to create an object that contains cycles, the type of that object is referred to as potentially cyclic.
When a type has the potential to contain cycles, and you call parse() on that type, or toString() or clone() on an object of that type, the result is different from when those methods are called on a type, or object of a type that is not potentially cyclic. Consequently, it is sometimes important to understand which types are potentially cyclic and what the string form of these objects looks like.