org.sbml.jsbml.util.filters
public class SpeciesReferenceFilter extends NameFilter
NameFilter that allows users to search for a
SimpleSpeciesReference that refers to a Species with the
given identifier attribute. The boolean switch filterForSpecies that
can be changed using the setFilterForSpecies(boolean) method decides
whether this SpeciesReferenceFilter should use the given identifier
to filter for the actual SimpleSpeciesReference or for the referenced
Species.| Modifier and Type | Field and Description |
|---|---|
private boolean |
filterForSpecies
Decides whether to filter for the identifier of the referenced
Species or if to use id and name to filter for the instance of
SimpleSpeciesReference itself. |
id, name| Constructor and Description |
|---|
SpeciesReferenceFilter()
Creates a new
SpeciesReferenceFilter with undefined properties. |
SpeciesReferenceFilter(Species species)
Creates a new
SpeciesReferenceFilter that only accepts instances of
SpeciesReference pointing to the id of the given Species. |
SpeciesReferenceFilter(java.lang.String id) |
SpeciesReferenceFilter(java.lang.String id,
java.lang.String name) |
| 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.
|
boolean |
isFilterForSpecies() |
void |
setFilterForSpecies(boolean filterForSpecies) |
getId, getName, setId, setNameprivate boolean filterForSpecies
Species or if to use id and name to filter for the instance of
SimpleSpeciesReference itself.public SpeciesReferenceFilter()
SpeciesReferenceFilter with undefined properties.public SpeciesReferenceFilter(Species species)
SpeciesReferenceFilter that only accepts instances of
SpeciesReference pointing to the id of the given Species.species - the Species of interest.public SpeciesReferenceFilter(java.lang.String id)
id - the identifier of a Species or SpeciesReference we
are interested in. Whether we accept the id of a Species or
a SpeciesReference depends on the flag that can be defined
with setFilterForSpecies(boolean).setFilterForSpecies(boolean)public SpeciesReferenceFilter(java.lang.String id,
java.lang.String name)
id - the identifier of a Species or SpeciesReference we
are interested in. Whether we accept the id of a Species or
a SpeciesReference depends on the flag that can be defined
with setFilterForSpecies(boolean).name - the name of the element we are interested in.setFilterForSpecies(boolean)public boolean accepts(java.lang.Object o)
Filteraccepts in interface Filteraccepts in class NameFiltero - some object whose properties are to be checked.public boolean isFilterForSpecies()
public void setFilterForSpecies(boolean filterForSpecies)
filterForSpecies - the filterForSpecies to set