Source of Orientation.java


  1: package maze; 
  2: 
  3: /*
  4:  *  An enumeration type 
  5:  */ 
  6: public class Orientation { 
  7: 
  8:   public static final Orientation VERTICAL = new Orientation("Vertical");
  9:   public static final Orientation HORIZONTAL = new Orientation("Horizontal");
 10: 
 11:   public String toString() { 
 12:     return name; 
 13:   }
 14: 
 15:   private Orientation(String name) { 
 16:     this.name = name; 
 17:   }
 18:   
 19:   private final String name; 
 20: 
 21: }