Class Matches

  • All Implemented Interfaces:
    Operator

    @ComponentProfile(summary="Tests that a configured value matches the supplied value.",
                      tag="conditional,operator")
    public class Matches
    extends java.lang.Object
    implements Operator

    This Operator simply tests two values for using String.matches(String).

    The first value used in the equality test is the Condition that this Operator is configured for; which could be the message payload or a metadata item for example.
    The second value is the static value configured for this operator.

    The static value can be a literal value; "myValue" or can be metadata resolved for example;

      %message{myKey}
     
    The above will test the metadata value identified by the metadata key "myKey".

    In the adapter configuration file this class is aliased as matches which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Summary

      Constructors 
      Constructor Description
      Matches()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean apply​(AdaptrisMessage msg, java.lang.String obj)  
      java.lang.String getValue()  
      void setValue​(java.lang.String value)
      Set the value to match against.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • Matches

        public Matches()
    • Method Detail

      • getValue

        public java.lang.String getValue()
      • setValue

        public void setValue​(java.lang.String value)
        Set the value to match against.
        Parameters:
        value - the value which conforms to a Pattern.
      • toString

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