com.apama.event.parser
Class Field<T>

java.lang.Object
  extended by com.apama.event.parser.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
Field(java.lang.String name, FieldType<T> type)
          Creates a new field.
 
Method Summary
 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


Submit a bug or feature
Copyright (c) 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG