title: Can I add a function to enums in Java?
body: <p>I have an enum, which looks like</p>
  
  <pre><code>public enum Animal {
    ELEPHANT,
    GIRAFFE,
    TURTLE,
    SNAKE,
    FROG
  }
  </code></pre>
  
  <p>and I want to do something like</p>
  
  <pre><code>Animal frog = Animal.FROG;
  Animal snake = Animal.SNAKE;
  
  boolean isFrogAmphibian = frog.isAmphibian(); //true
  boolean isSnakeAmphibian = snake.isAmphibian(); //false
  
  boolean isFrogReptile = frog.isReptile(); //false
  boolean isSnakeReptile = snake.isReptile(); //true
  
  boolean isFrogMammal = frog.isMammal(); //false
  boolean isSnakeMammal = snake.isMammal(); //false
  </code></pre>
  
  <p>I simplified the example for didactic purposes, but this would be really useful to me for my real life example. Can I do it in Java?</p>