ucar.unidata.ui
Class PropertyFilter

java.lang.Object
  extended by ucar.unidata.ui.PropertyFilter

public class PropertyFilter
extends Object

Is used to define an operator/value and to evaluate the filter on a given object.


Nested Class Summary
static class PropertyFilter.FilterGui
          Class FilterGui _more_
 
Field Summary
static String NULL_NAME
          _more_
static int OP_EQUALS
          _more_
static int OP_GREATERTHAN
          _more_
static String[] OP_LABELS
          _more_
static int OP_LESSTHAN
          _more_
static int OP_NOTEQUALS
          _more_
static int OP_STRCONTAINEDIN
          _more_
static int OP_STRCONTAINEDIN_NOCASE
          _more_
static int OP_STRCONTAINS
          _more_
static int OP_STRCONTAINS_NOCASE
          _more_
static int OP_STREQUALS
          _more_
static int OP_STRMATCH
          _more_
static int OP_STRNOTCONTAINS
          _more_
static int OP_STRNOTCONTAINS_NOCASE
          _more_
static int OP_STRNOTEQUALS
          _more_
static int OP_STRNOTMATCH
          _more_
static int[] OPERATORS
          _more_
 
Constructor Summary
PropertyFilter()
          A parameterless ctor for encoding/decoding
PropertyFilter(String name, int operator, String value)
          Create a filter.
PropertyFilter(String name, String operator, String value)
          Create a filter.
 
Method Summary
 String getName()
          _more_
 int getOperator()
          Get the Operator property.
static int getOperator(String opLabel)
          _more_
 String getOperatorLabel()
          _more_
 String getValue()
          Get the Value property.
 boolean isNumericOperator()
          _more_
 boolean ok(Object inValue)
          Apply this filter to the given value.
 boolean ok(Object inValue, Object myValue)
          _more_
 void setIsNot(boolean v)
          Deprecated. Keep around for bundles
 void setName(String value)
          Set the Name property.
 void setOperator(int value)
          Set the Operator property.
 void setOperator(String value)
          Set the Operator property.
 void setValue(String value)
          Set the Value property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_NAME

public static final String NULL_NAME
_more_

See Also:
Constant Field Values

OP_GREATERTHAN

public static final int OP_GREATERTHAN
_more_

See Also:
Constant Field Values

OP_LESSTHAN

public static final int OP_LESSTHAN
_more_

See Also:
Constant Field Values

OP_EQUALS

public static final int OP_EQUALS
_more_

See Also:
Constant Field Values

OP_NOTEQUALS

public static final int OP_NOTEQUALS
_more_

See Also:
Constant Field Values

OP_STREQUALS

public static final int OP_STREQUALS
_more_

See Also:
Constant Field Values

OP_STRNOTEQUALS

public static final int OP_STRNOTEQUALS
_more_

See Also:
Constant Field Values

OP_STRCONTAINS

public static final int OP_STRCONTAINS
_more_

See Also:
Constant Field Values

OP_STRNOTCONTAINS

public static final int OP_STRNOTCONTAINS
_more_

See Also:
Constant Field Values

OP_STRMATCH

public static final int OP_STRMATCH
_more_

See Also:
Constant Field Values

OP_STRNOTMATCH

public static final int OP_STRNOTMATCH
_more_

See Also:
Constant Field Values

OP_STRCONTAINS_NOCASE

public static final int OP_STRCONTAINS_NOCASE
_more_

See Also:
Constant Field Values

OP_STRNOTCONTAINS_NOCASE

public static final int OP_STRNOTCONTAINS_NOCASE
_more_

See Also:
Constant Field Values

OP_STRCONTAINEDIN

public static final int OP_STRCONTAINEDIN
_more_

See Also:
Constant Field Values

OP_STRCONTAINEDIN_NOCASE

public static final int OP_STRCONTAINEDIN_NOCASE
_more_

See Also:
Constant Field Values

OPERATORS

public static final int[] OPERATORS
_more_


OP_LABELS

public static final String[] OP_LABELS
_more_

Constructor Detail

PropertyFilter

public PropertyFilter(String name,
                      String operator,
                      String value)
Create a filter.

Parameters:
name - the property name
operator - The operator
value - The value to match

PropertyFilter

public PropertyFilter(String name,
                      int operator,
                      String value)
Create a filter.

Parameters:
name - the property name
operator - The operator
value - The value to match

PropertyFilter

public PropertyFilter()
A parameterless ctor for encoding/decoding

Method Detail

ok

public boolean ok(Object inValue)
Apply this filter to the given value.

Parameters:
inValue - The value to check
Returns:
Does this filter match the given value.

isNumericOperator

public boolean isNumericOperator()
_more_

Returns:
_more_

ok

public boolean ok(Object inValue,
                  Object myValue)
_more_

Parameters:
inValue - _more_
myValue - _more_
Returns:
_more_

getOperator

public static int getOperator(String opLabel)
_more_

Parameters:
opLabel - _more_
Returns:
_more_

getOperatorLabel

public String getOperatorLabel()
_more_

Returns:
_more_

setName

public void setName(String value)
Set the Name property.

Parameters:
value - The new value for Name

getName

public String getName()
_more_

Returns:
_more_

setOperator

public void setOperator(String value)
Set the Operator property. This is here for legacy bundles

Parameters:
value - The new value for Operator

setOperator

public void setOperator(int value)
Set the Operator property.

Parameters:
value - The new value for Operator

getOperator

public int getOperator()
Get the Operator property.

Returns:
The Operator

setValue

public void setValue(String value)
Set the Value property.

Parameters:
value - The new value for Value

getValue

public String getValue()
Get the Value property.

Returns:
The Value

setIsNot

public void setIsNot(boolean v)
Deprecated. Keep around for bundles

Parameters:
v - _more_