Class StationClassFilter.StationCategory

java.lang.Object
org.ka2ddo.yaac.filter.StationClassFilter.StationCategory
All Implemented Interfaces:
Cloneable
Enclosing class:
StationClassFilter

public final class StationClassFilter.StationCategory extends Object implements Cloneable
Define a subfilter for a particular category of station.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    StationCategory(String tagName, Symbols.Category... categories)
    Create a StationCategory that matches any of the specified categories.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates and returns a copy of this object.
    final boolean
    Test if the specified category matches this category subfilter.
    final boolean
    Test whether this category set is enabled for viewing.
    final void
    setSelected(boolean selected)
    Specify whether stations in this category set should be viewable.
    Returns a string representation of the object.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • tagName

      public final String tagName
  • Constructor Details

    • StationCategory

      protected StationCategory(String tagName, Symbols.Category... categories)
      Create a StationCategory that matches any of the specified categories.
      Parameters:
      tagName - String of resource name for the localized name for this category
      categories - zero or more categories for this subfilter to match
  • Method Details

    • inCategory

      public final boolean inCategory(Symbols.Category testCategory)
      Test if the specified category matches this category subfilter.
      Parameters:
      testCategory - Category to compare
      Returns:
      boolean true if the category matches
    • isSelected

      public final boolean isSelected()
      Test whether this category set is enabled for viewing.
      Returns:
      boolean true if stations in this category are acceptable
    • setSelected

      public final void setSelected(boolean selected)
      Specify whether stations in this category set should be viewable.
      Parameters:
      selected - boolean true if this category should be viewable
    • clone

      public Object clone() throws CloneNotSupportedException
      Creates and returns a copy of this object.
      Overrides:
      clone in class Object
      Returns:
      a clone of this instance.
      Throws:
      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.
    • toString

      public String toString()
      Returns a string representation of the object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object.