NeighborCriterion
, java.io.Serializable
CriterionBondedSimple
, CriterionInterMolecular
public abstract class CriterionAdapter extends java.lang.Object implements NeighborCriterion, java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
protected NeighborCriterion |
subCriterion |
Constructor | Description |
---|---|
CriterionAdapter(NeighborCriterion criterion) |
Constructs criterion that wraps the given criterion.
|
Modifier and Type | Method | Description |
---|---|---|
abstract boolean |
accept(IAtom atom1,
IAtom atom2) |
Implementation of this method should introduce new criterion and return
true if pair meets this criterion and that of the wrapped
NeighborCriterion.
|
NeighborCriterion |
getWrappedCriterion() |
Returns the criterion wrapped by this adapter
|
boolean |
needUpdate(IAtom atom) |
Indicates whether the neighbor list for the given atom should be updated,
according to the wrapped criterion.
|
void |
reset(IAtom atom) |
Indicates to wrapped criterion that given atom's neighbor list has just
been updated, and that properties (e.g., record of atom's position) used
by needUpdate and unsafe() methods should be reset.
|
void |
setBox(Box box) |
Specifies to the wrapped criterion the box where the criterion is being
applied.
|
boolean |
unsafe() |
Indicates whether the atom has changed (e.g.
|
protected final NeighborCriterion subCriterion
public CriterionAdapter(NeighborCriterion criterion)
criterion
- public final NeighborCriterion getWrappedCriterion()
public abstract boolean accept(IAtom atom1, IAtom atom2)
accept
in interface NeighborCriterion
atom1
- atom2
- public boolean needUpdate(IAtom atom)
needUpdate
in interface NeighborCriterion
public void setBox(Box box)
setBox
in interface NeighborCriterion
public boolean unsafe()
unsafe
in interface NeighborCriterion
public void reset(IAtom atom)
reset
in interface NeighborCriterion