public class NameFilter extends java.lang.Object implements Filter
SBase
with the id or name as
given in the constructor of this object.Modifier and Type | Field and Description |
---|---|
(package private) java.lang.String |
id
The desired identifier.
|
(package private) java.lang.String |
name
The desired name.
|
Constructor and Description |
---|
NameFilter()
Creates a new
NameFilter instance |
NameFilter(java.lang.String id)
Creates a new
NameFilter instance with the given id to search for. |
NameFilter(java.lang.String id,
java.lang.String name)
Creates a new
NameFilter instance with the given id and/or name to search for. |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(java.lang.Object o)
This method checks whether the given object is of the correct type and
has the desired properties set to be acceptable.
|
java.lang.String |
getId()
Returns the id.
|
java.lang.String |
getName()
Returns the name.
|
void |
setId(java.lang.String id)
Sets the id to search for.
|
void |
setName(java.lang.String name)
Sets the name to search for.
|
java.lang.String id
java.lang.String name
public NameFilter()
NameFilter
instancepublic NameFilter(java.lang.String id)
NameFilter
instance with the given id to search for.id
- the id to search forpublic NameFilter(java.lang.String id, java.lang.String name)
NameFilter
instance with the given id and/or name to search for.id
- the id to search for (can be null, then we search only for name).name
- the name to search for (can be null, then we search only for id)public boolean accepts(java.lang.Object o)
Filter
public java.lang.String getId()
public java.lang.String getName()
public void setId(java.lang.String id)
id
- the id to setpublic void setName(java.lang.String name)
name
- the name to set