edu.uci.ics.jung.graph.filters.impl
Class AlphabeticVertexFilter

java.lang.Object
  extended byedu.uci.ics.jung.graph.filters.GeneralVertexAcceptFilter
      extended byedu.uci.ics.jung.graph.filters.impl.AlphabeticVertexFilter
All Implemented Interfaces:
EfficientFilter, Filter

public class AlphabeticVertexFilter
extends GeneralVertexAcceptFilter
implements EfficientFilter

A small example filter that accepts vertices that are alphabetically past the input value.

Author:
danyelf

Constructor Summary
AlphabeticVertexFilter(java.lang.String threshhold, StringLabeller sl, boolean acceptAboveThreshold)
           
 
Method Summary
 boolean acceptVertex(Vertex vert)
          Passes the vertex if its StringLabeller value compares over (or under) the threshold.
 java.lang.String getName()
          Returns a name for this: AlphabeticFilter(>"TestString")
 StringLabeller getStringLabeller()
          Returns the String Labeller being used by this filter to check vertices with.
 java.lang.String getThreshhold()
           
 boolean isAcceptThoseAboveThreshhold()
          Returns the current direction of the comparison: True if this accepts only strings above the threshhold, otherwise, accepts only strings at or below the threshhold.
 void setAcceptThoseAboveThreshhold(boolean acceptThoseAboveThreshhold)
          Sets the acceptThoseAboveThreshhold: if true, this accepts values over the threshhold; if false, this accepts values up to and including the threshhold, but not above it.
 void setStringLabeller(StringLabeller stringLabeller)
          Sets the stringLabeller.
 void setThreshhold(java.lang.String threshhold)
          Sets the threshhold.
 
Methods inherited from class edu.uci.ics.jung.graph.filters.GeneralVertexAcceptFilter
filter, filter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.uci.ics.jung.graph.filters.EfficientFilter
filter
 
Methods inherited from interface edu.uci.ics.jung.graph.filters.Filter
filter
 

Constructor Detail

AlphabeticVertexFilter

public AlphabeticVertexFilter(java.lang.String threshhold,
                              StringLabeller sl,
                              boolean acceptAboveThreshold)
Method Detail

acceptVertex

public boolean acceptVertex(Vertex vert)
Passes the vertex if its StringLabeller value compares over (or under) the threshold.

Specified by:
acceptVertex in class GeneralVertexAcceptFilter

getName

public java.lang.String getName()
Returns a name for this: AlphabeticFilter(>"TestString")

Specified by:
getName in interface Filter
Returns:
A string that describes the filter.

isAcceptThoseAboveThreshhold

public boolean isAcceptThoseAboveThreshhold()
Returns the current direction of the comparison: True if this accepts only strings above the threshhold, otherwise, accepts only strings at or below the threshhold.

Returns:
boolean

getThreshhold

public java.lang.String getThreshhold()
Returns:
String the current comparison value

setAcceptThoseAboveThreshhold

public void setAcceptThoseAboveThreshhold(boolean acceptThoseAboveThreshhold)
Sets the acceptThoseAboveThreshhold: if true, this accepts values over the threshhold; if false, this accepts values up to and including the threshhold, but not above it.

Parameters:
acceptThoseAboveThreshhold -

setThreshhold

public void setThreshhold(java.lang.String threshhold)
Sets the threshhold.

Parameters:
threshhold - The threshhold to set

getStringLabeller

public StringLabeller getStringLabeller()
Returns the String Labeller being used by this filter to check vertices with.

Returns:
StringLabeller

setStringLabeller

public void setStringLabeller(StringLabeller stringLabeller)
Sets the stringLabeller.

Parameters:
stringLabeller - The stringLabeller to set