Package com.apama.event.parser
Class Field<T>
- java.lang.Object
-
- com.apama.event.parser.Field<T>
-
public class Field<T> extends java.lang.Object
Represents the name and type of a field in anEventType
. Note that the easiest way to create Field objects is to useFieldTypes
to get the required FieldType then call theFieldType.newField(String)
helper method to create the Field.For example, to create a field object whose type is an Apama sequence of integers:
Field<Long> myField = FieldTypes.sequence(FieldTypes.INTEGER).newField("myField");
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Method to return the name of the field objectFieldType<T>
getType()
Method to return the FieldType of the field objectjava.lang.String
toString()
Returns a String representation of the event type.
-
-
-
Constructor Detail
-
Field
public Field(java.lang.String name, FieldType<T> type)
Creates a new field.Consider using
FieldType.newField(String)
as a simpler alternative to calling this constructor.- Parameters:
name
- the field nametype
- the field type
-
-
Method Detail
-
getName
public java.lang.String getName()
Method to return the name of the field object- Returns:
- name of the Field
-
getType
public FieldType<T> getType()
Method to return the FieldType of the field object- Returns:
- type of the field
-
toString
public java.lang.String toString()
Returns a String representation of the event type. Note that this representation will use the Java toString() method to format the results, and is not valid monitorscript.- Overrides:
toString
in classjava.lang.Object
-
-