Package com.caplin.datasource.namespace
Class PrefixNamespace
- java.lang.Object
-
- com.caplin.datasource.namespace.PrefixNamespace
-
- All Implemented Interfaces:
Namespace
public class PrefixNamespace extends 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 returntrue
. Should the presented subject be /R/VOD.L thematch(String)
method will returnfalse
.
-
-
Constructor Summary
Constructors Constructor Description PrefixNamespace(String prefix)
Initializes a new instance of thePrefixNamespace
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
match(String subject)
Tests aString
to see if it falls within thisNamespace
.String
toString()
-
-
-
Constructor Detail
-
PrefixNamespace
public PrefixNamespace(String prefix)
Initializes a new instance of thePrefixNamespace
class.- Parameters:
prefix
- The prefix to be matched. For example,/FX
.
-
-
Method Detail
-
match
public boolean match(String subject)
Tests a
String
to see if it falls within thisNamespace
.
-
-