Class RegionTypeSwitch

  • All Implemented Interfaces:
    Replacer

    public class RegionTypeSwitch
    extends AbstractRegionSwitch
    A switch that reacts if the given region is of a certain type.

    Three possible constructors:

    • RegionType object -> direct test
    • StringID -> compares given region's type ID
    • String -> creates a StringID

    Version:
    1.0
    Author:
    Andreas
    • Field Detail

      • type

        protected RegionType type
        For use if constructed with Region Type.
      • id

        protected StringID id
        For use if constructed with String or String ID.
    • Constructor Detail

      • RegionTypeSwitch

        public RegionTypeSwitch​(java.lang.String type)
        Creates a RegionType Switch out of a String describing a Region Type.
      • RegionTypeSwitch

        public RegionTypeSwitch​(StringID type)
        Creates a RegionType Switch out of a String ID describing a Region Type.
      • RegionTypeSwitch

        public RegionTypeSwitch​(RegionType type)
        Creates a RegionType Switch out of a Region Type.
    • Method Detail

      • getRegionType

        public RegionType getRegionType()
        Returns the defining region type.
      • getStringID

        public StringID getStringID()
        Returns the defining region type ID.
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Replacer
        Returns a description for the user of what this replacer does.
        See Also:
        Replacer.getDescription()