Enum Food

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Food>

    public enum Food
    extends java.lang.Enum<Food>
    • Enum Constant Detail

      • SHRIMP

        public static final Food SHRIMP
      • COOKED_CHICKEN

        public static final Food COOKED_CHICKEN
      • COOKED_MEAT

        public static final Food COOKED_MEAT
      • SARDINE

        public static final Food SARDINE
      • BREAD

        public static final Food BREAD
      • HERRING

        public static final Food HERRING
      • TROUT

        public static final Food TROUT
      • PIKE

        public static final Food PIKE
      • PEACH

        public static final Food PEACH
      • SALMON

        public static final Food SALMON
      • TUNA

        public static final Food TUNA
      • REDBERRY_PIE

        public static final Food REDBERRY_PIE
      • JUG_OF_WINE

        public static final Food JUG_OF_WINE
      • STEW

        public static final Food STEW
      • CAKE

        public static final Food CAKE
      • MEAT_PIE

        public static final Food MEAT_PIE
      • LOBSTER

        public static final Food LOBSTER
      • BASS

        public static final Food BASS
      • PLAIN_PIZZA

        public static final Food PLAIN_PIZZA
      • SWORDFISH

        public static final Food SWORDFISH
      • POTATO_WITH_BUTTER

        public static final Food POTATO_WITH_BUTTER
      • CHILLI_POTATO

        public static final Food CHILLI_POTATO
      • APPLE_PIE

        public static final Food APPLE_PIE
      • CHOCOLATE_CAKE

        public static final Food CHOCOLATE_CAKE
      • CHOCOLATE_BOMB

        public static final Food CHOCOLATE_BOMB
      • POTATO_WITH_CHEESE

        public static final Food POTATO_WITH_CHEESE
      • MEAT_PIZZA

        public static final Food MEAT_PIZZA
      • MONKFISH

        public static final Food MONKFISH
      • ANCHOVY_PIZZA

        public static final Food ANCHOVY_PIZZA
      • COOKED_KARAMBWAN

        public static final Food COOKED_KARAMBWAN
      • CURRY

        public static final Food CURRY
      • SHARK

        public static final Food SHARK
      • SEA_TURTLE

        public static final Food SEA_TURTLE
      • PINEAPPLE_PIZZA

        public static final Food PINEAPPLE_PIZZA
      • SUMMER_PIE

        public static final Food SUMMER_PIE
      • WILD_PIE

        public static final Food WILD_PIE
      • MANTA_RAY

        public static final Food MANTA_RAY
      • TUNA_POTATO

        public static final Food TUNA_POTATO
      • DARK_CRAB

        public static final Food DARK_CRAB
      • ANGLERFISH

        public static final Food ANGLERFISH
      • BLIGHTED_KARAMBWAN

        public static final Food BLIGHTED_KARAMBWAN
      • BLIGHTED_MANTA_RAY

        public static final Food BLIGHTED_MANTA_RAY
      • BLIGHTED_ANGLERFISH

        public static final Food BLIGHTED_ANGLERFISH
      • CHOC_ICE

        public static final Food CHOC_ICE
    • Method Detail

      • values

        public static Food[] 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 (Food c : Food.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Food 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
      • getFilter

        public Filter<Item> getFilter()
        Gets a Filter to match a non-null, non-noted non-placeholder Item that matches the current Food
        Returns:
        Food that matches the Filter, null if none found.
      • getBestOnHand

        public static Food getBestOnHand​(boolean overEat)
        Gets the best Food in your Inventory based on if you pass in true/false for over eating.
        Parameters:
        overEat - If Boolean.TRUE, it will ignore getHeals(), otherwise it will only return a Food that heals for <= your missing hp
        Returns:
        Best Food in Inventory that satisfies the overEat parameter. Null if none found.
      • getHeals

        public int getHeals()
      • eat

        public static boolean eat​(int minHealth,
                                  boolean overEat)
        Checks for the best Food and eats it based on the minHealth and overEat parameters. It will check against your current Skill.HITPOINTS's Skill.getBoostedLevel() for the minHealth parameter. If your current hitpoints are >= the minHealth amount, it will not eat.
        Parameters:
        minHealth - The minimum HP you require before eating.
        overEat - Boolean value for if you want the method to eat even if it will over-heal you.
        Returns:
        Boolean.FALSE if your health is above the minimum value and overEat is false or if there is no valid Food found. See eat() if a valid Food is found.
      • toString

        public java.lang.String toString()
        Returns the proper name without _'s and proper casing. EX: Manta ray instead of MANTA_RAY
        Overrides:
        toString in class java.lang.Enum<Food>
      • getNames

        public java.lang.String[] getNames()
      • getCondition

        public Condition getCondition()