etomica.nbr
Class CriterionType

java.lang.Object
  extended by etomica.nbr.CriterionAdapter
      extended by etomica.nbr.CriterionType
All Implemented Interfaces:
NeighborCriterion, Serializable

public class CriterionType
extends CriterionAdapter

Filters atoms to match a given AtomType.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class etomica.nbr.CriterionAdapter
subCriterion
 
Constructor Summary
CriterionType(NeighborCriterion criterion, IAtomType type)
           
 
Method Summary
 boolean accept(IAtomList atom)
          Returns true if the AtomType of the atom matches the AtomType given at construction and if the wrapped criterion accept also returns true.
 IAtomType getType()
          Returns the AtomType accepted by this criterion.
 
Methods inherited from class etomica.nbr.CriterionAdapter
getWrappedCriterion, needUpdate, reset, setBox, unsafe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CriterionType

public CriterionType(NeighborCriterion criterion,
                     IAtomType type)
Method Detail

accept

public boolean accept(IAtomList atom)
Returns true if the AtomType of the atom matches the AtomType given at construction and if the wrapped criterion accept also returns true.

Specified by:
accept in interface NeighborCriterion
Specified by:
accept in class CriterionAdapter

getType

public IAtomType getType()
Returns the AtomType accepted by this criterion.