Enum BankLocation

    • Method Detail

      • values

        public static BankLocation[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BankLocation c : BankLocation.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BankLocation valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getSortedValidLocations

        public static java.util.List<BankLocation> getSortedValidLocations​(Entity nearest)
      • getSortedValidLocations

        public static java.util.List<BankLocation> getSortedValidLocations​(Tile nearest)
      • getValidLocations

        public static java.util.List<BankLocation> getValidLocations()
      • getNearestEuclidean

        public static BankLocation getNearestEuclidean​(Tile tile,
                                                       boolean ignoreRequirements)
        Gets the nearest bank location to the entity based on euclidean distance getNearest(Tile) will check against web paths to find more exact distances, so takes longer This method should be quicker call, while possibly being less precise.
        Parameters:
        tile - tile to check for nearest bank location
        ignoreRequirements - boolean whether to ignore bank location requirements or not
        Returns:
        Nearest bank location based on euclidean distance to the tile
      • getNearest

        public static BankLocation getNearest​(Entity entity)
        Gets the nearest BankLocation to the entity
        Parameters:
        entity - Entity to find nearest BankLocation to.
        Returns:
        BankLocation that is closest to Entity
      • getNearest

        public static BankLocation getNearest​(Tile tile)
        Gets the nearest BankLocation to the tile
        Parameters:
        tile - Tile to find nearest bank location to
        Returns:
        BankLocation that is closest to tile
      • getNearest

        public static BankLocation getNearest​(Tile tile,
                                              boolean includeTeleports)
        Gets the nearest BankLocation to the given Tile
        Parameters:
        tile - Tile to find nearest bank location to
        includeTeleports - boolean for whether you want to include teleports on hand in nearest calculations
        Returns:
        BankLocation that is closest, if no web path is found it uses euclidean distance
      • resetCache

        public static void resetCache()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<BankLocation>
      • getCenter

        public Tile getCenter()
        Gets the center Tile of the bank
        Returns:
        Tile of the center of the bank
      • getBankType

        public BankType getBankType()
        Gets the BankType
        Returns:
        BankType
      • getCondition

        public Condition getCondition()
        Gets any requirements needed to access this bank
        Returns:
        Requirements condition
      • isMembersOnly

        public boolean isMembersOnly()
      • getArea

        public Area getArea​(int radius)
        Generates an Area around the center Tile based on radius
        Parameters:
        radius - Radius of the Area
        Returns:
        Area generated around Bank's center Tile
      • getTile

        public Tile getTile()
        Description copied from interface: Locatable
        Gets tile of the object.
        Specified by:
        getTile in interface Locatable
        Returns:
        the object tile.