// decompiled version of BreedI.
// See how enum constant methods are implemented.

package com.mindprod.example;

public class BreedI extends Enum
   {

   public static final BreedI[] values()
      {
      return(BreedI[])$VALUES.clone();
      }

   // If there is no match for the String, valueOf will throw an
   // IllegalArgumentException.
   public static BreedI valueOf(String s)
      {
      return(BreedI)Enum.valueOf(com.mindprod.example.BreedI, s);
      }

   // instance method common to all enum constants
   public String getColours()
      {
      return colours;
      }

   // constructor with tho hidden parms and one
   // explicit one
   private BreedI(String s, int i, String s1)
      {
      super(s, i);
      colours = s1;
      }

   public static final BreedI DACHSHUND;
   public static final BreedI DALMATIAN;
   public static final BreedI LABRADOR;
   private String colours;
   private static final BreedI $VALUES[];

   static
   {
      DACHSHUND = new BreedI("DACHSHUND", 0, "brown");
      DALMATIAN = new BreedI("DALMATIAN", 1, "spotted")
         {
         // anonymous inner class for DALMATIAN

         // method only defined for DALMATIAN
         public int getSpotCount()
            {
            return 50;
            }

         // instance variable private to DALMATIAN
         private final int spots = 50;

         };

      // other enum constants without their own peculiar methods
      // don't get an inner class.
      LABRADOR = new BreedI("LABRADOR", 2, "black or tan");
      $VALUES = (new BreedI[] {
                    DACHSHUND, DALMATIAN, LABRADOR
                 });
   }

   // DALMATIAN'S inner class
   static final class BreedI$1 extends BreedI
      {

      public int getSpotCount()
         {
         return 50;
         }

      private final int spots = 50;

      // constructor with tho hidden parms and one
      // explicit one
      BreedI$1(String s, int i, String s1)
         {
         super(s, i, s1, null);
         }
      }
   }