Interface TownBlockOwner

All Superinterfaces:
Nameable, Permissible
All Known Implementing Classes:
PlotGroup, Resident, Town

public interface TownBlockOwner extends Permissible, Nameable
Allows objects to contain townblocks to be accessed/manipulated.
Author:
EdgarL, Shade, Suneet Tipirneni (Siris)
  • Method Details

    • getTownBlocks

      Collection<TownBlock> getTownBlocks()
      Gets the unmodifiable collection of townblocks.
      Returns:
      The townblocks this object contains.
    • hasTownBlock

      boolean hasTownBlock(TownBlock townBlock)
      Checks whether object has townblock or not.
      Parameters:
      townBlock - The townblock to check for.
      Returns:
      A boolean indicating if it was found or not.
    • addTownBlock

      void addTownBlock(TownBlock townBlock) throws AlreadyRegisteredException
      Adds a townblock to the list of existing townblocks.
      Parameters:
      townBlock - The townblock to add.
      Throws:
      AlreadyRegisteredException - When the townblock is already in the list.
    • removeTownBlock

      void removeTownBlock(TownBlock townBlock) throws NotRegisteredException
      Removes townblock from the list of existing townblocks.
      Parameters:
      townBlock - The townblock to remove.
      Throws:
      NotRegisteredException - Thrown when the townblock given is not in the list.