Class Field<T>


  • public class Field<T>
    extends java.lang.Object
    Represents the name and type of a field in an EventType. Note that the easiest way to create Field objects is to use FieldTypes to get the required FieldType then call the FieldType.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");

    • Constructor Summary

      Constructors 
      Constructor Description
      Field​(java.lang.String name, FieldType<T> type)
      Creates a new field.
    • 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 object
      FieldType<T> getType()
      Method to return the FieldType of the field object
      java.lang.String toString()
      Returns a String representation of the event type.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 name
        type - 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 class java.lang.Object