public abstract class Filter
extends java.lang.Object
Note this abstract class does not extend the Cloneable interface, to ensure that Filter subclass implementers explicitly ensure that the clone() method has been properly adjusted to correctly clone the stateful Filters.
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier | Constructor and Description |
---|---|
protected |
Filter()
Create a Filter instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
canRejectSome()
Specifies that this filter may reject some stations, messages, and/or frames.
|
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.
|
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
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 analyzepublic abstract int acceptMessage(AX25Message msg)
msg
- the APRS Message record to analyzepublic abstract int acceptAX25Frame(AX25Frame frame)
frame
- the timestamped AX25 frame record to analyzepublic abstract void addFilterChangeListener(FilterChangeListener l)
l
- FilterChangeListener to registerpublic abstract void removeFilterChangeListener(FilterChangeListener l)
l
- FilterChangeListener to deregisterpublic abstract void setToPassall()
public boolean canRejectSome()
setToPassall()
,
CumulativeFilter
,
CumulativeBooleanAndFilter
,
CumulativeBooleanOrFilter
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
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