Class ValueField


  • public final class ValueField
    extends java.lang.Object
    A descriptor of a value field for use in IEventSinkFactory.create.
    • Field Detail

      • identifier

        private final java.lang.String identifier
      • name

        private final java.lang.String name
      • description

        private final java.lang.String description
      • contentType

        private final ContentType<?> contentType
    • Constructor Detail

      • ValueField

        public ValueField​(IAttribute<?> attribute)
        Create a value field matching an IAttribute.
        Parameters:
        attribute - attribute to match
      • ValueField

        public ValueField​(java.lang.String identifier,
                          java.lang.String name,
                          java.lang.String description,
                          ContentType<?> contentType)
        Create a value field.
        Parameters:
        identifier - field ID
        name - human readable field name
        description - human readable field description
        contentType - content type of the field
    • Method Detail

      • getIdentifier

        public java.lang.String getIdentifier()
      • getName

        public java.lang.String getName()
      • getDescription

        public java.lang.String getDescription()
      • getContentType

        public ContentType<?> getContentType()
      • matches

        public boolean matches​(IAttribute<?> a)
        Check if a value field matches an attribute. Note that only ID and content type is checked since human readable values may differ, especially due to translations.
        Parameters:
        a - attribute to match
        Returns:
        true if the value field and the attribute match, false if not
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object