Class PrefixNamespace

  • All Implemented Interfaces:
    Namespace

    public class PrefixNamespace
    extends java.lang.Object
    implements Namespace

    The prefix namespace matches the initial part of a subject name.

     

    A prefix namespace matches a subject according to the start of the subject name. For example, if the prefix defined for the namespace is is /I/ and the subject presented is /I/VOD.L the match(String) method will return true. Should the presented subject be /R/VOD.L the match(String) method will return false.

    • Constructor Summary

      Constructors 
      Constructor Description
      PrefixNamespace​(java.lang.String prefix)
      Initializes a new instance of the PrefixNamespace class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean match​(java.lang.String subject)
      Tests a String to see if it falls within this Namespace.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

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

      • PrefixNamespace

        public PrefixNamespace​(java.lang.String prefix)
        Initializes a new instance of the PrefixNamespace class.
        Parameters:
        prefix - The prefix to be matched. For example, /FX.
    • Method Detail

      • match

        public boolean match​(java.lang.String subject)

        Tests a String to see if it falls within this Namespace.

        Specified by:
        match in interface Namespace
        Parameters:
        subject - The string to be tested for matching.
        Returns:
        true if subject falls within this Namespace, false otherwise.
      • toString

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