Class AnyFieldValue


  • public class AnyFieldValue
    extends java.lang.Object
    Represents the value of an Apamaany field.

    Example usage:

     
     		Field<AnyFieldValue> anyField = new AnyFieldType().newField("myAny");
    		EventType anyEventType = new EventType("E1", anyField);
    		Event e1 = new Event(anyEventType);
    		// Set to string
    		e1.setField("myAny", new AnyFieldValue(FieldTypes.STRING, "Foo BAR"));
    
    • Constructor Summary

      Constructors 
      Constructor Description
      AnyFieldValue()
      Create a new AnyFieldValue object representing empty 'any'
      AnyFieldValue​(FieldType<?> fieldType, java.lang.Object value)
      Create a new AnyFieldValue
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FieldType<?> getType()  
      java.lang.Object getValue()  
      java.lang.String toString()
      Returns the string form of the contained value directly, or the word "empty" if there is no value.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AnyFieldValue

        public AnyFieldValue​(FieldType<?> fieldType,
                             java.lang.Object value)
        Create a new AnyFieldValue
        Parameters:
        fieldType - : An Apama type
        value - : Corresponding value for the Apama type.
      • AnyFieldValue

        public AnyFieldValue()
        Create a new AnyFieldValue object representing empty 'any'
    • Method Detail

      • getType

        public FieldType<?> getType()
        Returns:
        the actual any contained Field Type.
      • getValue

        public java.lang.Object getValue()
        Returns:
        the actual value contained by 'any'
      • toString

        public java.lang.String toString()
        Returns the string form of the contained value directly, or the word "empty" if there is no value. For strings, the contents of the string will be returned, without extra quoting.
        Overrides:
        toString in class java.lang.Object