public class CutSet extends Object implements ChangeListener
Modifier and Type | Field and Description |
---|---|
protected ChangeEvent |
_defaultEvent |
protected boolean |
_enabled |
protected boolean |
_inverted |
protected boolean |
_passThrough |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener listener)
Adds a listener that will be notified of any changes in this CutSet, its enabled Cuts and Conditions.
|
protected void |
disable(Cut cut) |
protected void |
enable(Cut cut) |
protected void |
enable(Cut cut,
boolean inverted) |
void |
fireStateChanged(ChangeEvent event)
Sends the event to listeners.
|
Set<String> |
getConditionNames()
Returns a set of names of all enabled conditions in this CutSet.
|
Set<Cut> |
getCuts()
Returns a set of all cuts this CutSet knows about - both enabled and disabled.
|
Boolean |
isCutEnabled(Cut cut)
Returns true if the specified cut is enabled in this CutSet.
|
Boolean |
isCutInverted(Cut cut)
Returns true if the specified cut is inverted in this CutSet.
|
boolean |
isEnabled()
Returns true if this CutSet is currently enabled.
|
boolean |
isInverted()
Returns true if this CutSet is inverted.
|
boolean |
isPassThrough()
Returns true if this CutSet is in "pass through" mode.
|
boolean |
pass(Map<String,org.freehep.util.Value> data)
Returns true if the supplied data satisfies this CutSet.
|
boolean |
pass(Map<String,org.freehep.util.Value> data,
Object moreData)
Returns true if the supplied data satisfies this CutSet.
|
void |
remove(Cut cut)
Removes the specified cut from this CutSet.
|
void |
removeChangeListener(ChangeListener listener)
Removes a listener.
|
void |
setEnabled(boolean enabled)
Sets whether or not this CutSet is enabled.
|
void |
setEnabled(Cut cut,
boolean enabled)
Sets whether or not the specified cut is enabled in this CutSet.
|
void |
setInverted(boolean inverted)
Sets whether or not this CutSet is inverted.
|
void |
setInverted(Cut cut,
boolean inverted)
Sets whether or not the specified cut is inverted in this CutSet.
|
void |
setPathThrough(boolean passThrough)
Sets whether or not this CutSet is in "pass through" mode.
|
int |
size()
Returns the number of enabled cuts in this CutSet.
|
void |
stateChanged(ChangeEvent event)
Forwards the event to listeners if this CutSet is currently enabled.
|
protected boolean _enabled
protected boolean _inverted
protected boolean _passThrough
protected ChangeEvent _defaultEvent
public CutSet()
public CutSet(CutSet set)
public void setEnabled(boolean enabled)
public void setInverted(boolean inverted)
public void setPathThrough(boolean passThrough)
public void setEnabled(Cut cut, boolean enabled)
public void setInverted(Cut cut, boolean inverted)
public void remove(Cut cut)
protected void enable(Cut cut)
protected void enable(Cut cut, boolean inverted)
protected void disable(Cut cut)
public boolean isEnabled()
public boolean isInverted()
public boolean isPassThrough()
public Set<Cut> getCuts()
public Set<String> getConditionNames()
public Boolean isCutInverted(Cut cut)
public Boolean isCutEnabled(Cut cut)
public int size()
public boolean pass(Map<String,org.freehep.util.Value> data, Object moreData)
Cut.pass(Map,Object,boolean)
methods of all enabled cuts.
If this CutSet is not inverted, returns true if all cuts return either PASS or IGNORE.
If this CutSet is inverted and in "pass through" mode, returns true if either at least
one cut returns FAIL, or all cuts return IGNORE.
If this CutSet is inverted and not in "pass through" mode, returns true if at least one cut
returns FAIL.data
- Map of attribute names to their values.moreData
- Additional data that can be used in making the decision -
ignored by the implementation provided by this class.public boolean pass(Map<String,org.freehep.util.Value> data)
data
- Map of attribute names to their values.public void addChangeListener(ChangeListener listener)
public void removeChangeListener(ChangeListener listener)
public void fireStateChanged(ChangeEvent event)
public void stateChanged(ChangeEvent event)
stateChanged
in interface ChangeListener
Copyright © 1996-2014 FreeHEP. All Rights Reserved.