|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.yaac.filter.Filter
public abstract class Filter
This abstract class defines the basic concept of a message filter. It defines APIs by which an arbitrarily complex filter expression may be used to specify which messages and stations are displayed.
Note this abstract class does not extend the Cloneable interface, to ensure that Filter implementers explicitly ensure that the clone() method has been properly adjusted to correctly clone the stateful Filters.
Field Summary | |
---|---|
static int |
RESULT_NEUTRAL
This Filter cannot determine if this object passes the filter or not. |
static int |
RESULT_PASS
The object exactly passes this Filter and is completely acceptable by the Filter's constraints. |
static int |
RESULT_REJECT
The object is completely unacceptable to this Filter and should not be displayed, saved, etc.. |
static int |
RESULT_WEAK_PASS
The object is loosely acceptable to the Filter. |
static int |
RESULT_WEAK_REJECT
The object is unacceptable to the Filter, but might want to be kept around and indicated as unacceptable. |
Constructor Summary | |
---|---|
Filter()
|
Method Summary | |
---|---|
abstract int |
acceptAX25Frame(AX25Frame frame)
Indicate whether the specified message should be displayed or used to determine if a station should be displayed (if recursively called from acceptStation()). |
abstract int |
acceptMessage(AX25Message msg)
Indicate whether the specified message should be displayed or used to determine if a station should be displayed (if recursively called from acceptStation()). |
abstract int |
acceptStation(StationState ss)
Indicate whether the specified station should be displayed. |
abstract void |
addFilterChangeListener(FilterChangeListener l)
Register a listener for changes of this Filter. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
abstract java.lang.String |
getFilterHelpTagName()
Report a tag name used to look up JavaHelp for a filter editor. |
abstract java.lang.String |
getFilterTypeTagName()
Report a tag name used to look up the labelling for an editor panel for this editor instance in a ResourceBundle of translated names. |
abstract java.lang.String |
getFilterUIName()
Get the class name of a dynamically loadable class for the the GUI for this filter. |
abstract void |
removeFilterChangeListener(FilterChangeListener l)
Deregisters a listener. |
abstract void |
setToPassall()
Reset the filter to a configuration that would pass the maximum amount of messages, packets, and stations. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RESULT_REJECT
public static final int RESULT_WEAK_REJECT
public static final int RESULT_NEUTRAL
public static final int RESULT_WEAK_PASS
public static final int RESULT_PASS
Constructor Detail |
---|
public Filter()
Method Detail |
---|
public abstract java.lang.String getFilterTypeTagName()
public abstract java.lang.String getFilterHelpTagName()
public abstract java.lang.String getFilterUIName()
public abstract int acceptStation(StationState ss)
ss
- StationState record to analyze
public abstract int acceptMessage(AX25Message msg)
msg
- the APRS Message record to analyze
public abstract int acceptAX25Frame(AX25Frame frame)
frame
- the timestamped AX25 frame record to analyze
public abstract void addFilterChangeListener(FilterChangeListener l)
l
- FilterChangeListener to registerpublic abstract void removeFilterChangeListener(FilterChangeListener l)
l
- FilterChangeListener to deregisterpublic abstract void setToPassall()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
will be true, and that the expression:x.clone() != x
will be true, but these are not absolute requirements. While it is typically the case that:x.clone().getClass() == x.getClass()
will be true, this is not an absolute requirement, and can be false for Filters of the same class because of their filtering attributes changing post-cloning.x.clone().equals(x)
By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().
By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the object's class does not
support the Cloneable
interface. Subclasses
that override the clone
method can also
throw this exception to indicate that an instance cannot
be cloned. Valid Filters should never throw this exception.Cloneable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |