public class TypeSpecification extends Object implements TMObjectMatcherIF
Modifier and Type | Field and Description |
---|---|
protected TMObjectMatcherIF |
matcher |
protected boolean |
subclasses |
Constructor and Description |
---|
TypeSpecification()
INTERNAL: Creates a new type specification.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(TMObjectMatcherIF object)
INTERNAL: Returns true if this object equals the given parameter.
|
TMObjectMatcherIF |
getClassMatcher()
INTERNAL: Returns the matcher used to match the allowed type.
|
boolean |
getSubclasses()
INTERNAL: If true, subclasses of the matched topic are allowed.
|
boolean |
matches(TMObjectIF object)
INTERNAL: Matches the type of the given object, which must implement
the TypedIF interface.
|
boolean |
matchType(TopicIF type)
INTERNAL: Returns true if the given topic defines an acceptable type.
|
void |
setClassMatcher(TMObjectMatcherIF matcher)
INTERNAL: Sets the object used to match the type.
|
void |
setSubclasses(boolean subclasses)
INTERNAL: Controls whether subclasses of the matched topic are
accepted.
|
protected TMObjectMatcherIF matcher
protected boolean subclasses
public TypeSpecification()
public TMObjectMatcherIF getClassMatcher()
public void setClassMatcher(TMObjectMatcherIF matcher)
public boolean getSubclasses()
public void setSubclasses(boolean subclasses)
public boolean matchType(TopicIF type)
type
- A candidate acceptable type.public boolean matches(TMObjectIF object)
matches
in interface TMObjectMatcherIF
public boolean equals(TMObjectMatcherIF object)
TMObjectMatcherIF
equals
in interface TMObjectMatcherIF