package com.neopets;

public enum NeopetsURL {

  ROOT(""),
  INDEX("index.phtml"),
  LOGIN("login.phtml"),
  BANK("bank.phtml"),
  PROCESS_BANK("process_bank.phtml");

  private static final String BASE_URL = "http://www.neopets.com";

  private String path;

  NeopetsURL(String path) {
    this.path = path;
  }

  public String getPath() {
    if (path.isEmpty()) {
      return INDEX.getPath();
    }
    return path;
  }

  public static String formURL(String path) {
    if (path.isEmpty()) {
      return BASE_URL;
    } else {
      return BASE_URL + "/" + path;
    }
  }

  public String toString() {
    return formURL(path);
  }

}

@@ -26,12 +26,13 @@
 lic 
-enum
+class
  Neo
@@ -48,25 +48,121 @@
 %0A%0A  
-ROOT
+public static final NeopetsURL ROOT = new NeopetsURL
 (%22%22)
-,%0A  INDEX
+;%0A  public static final NeopetsURL INDEX = new NeopetsURL
 (%22in
@@ -176,17 +176,65 @@
 ml%22)
-,%0A  LOGIN
+;%0A  public static final NeopetsURL LOGIN = new NeopetsURL
 (%22lo
@@ -248,16 +248,64 @@
 ml%22)
-,%0A  BANK
+;%0A  public static final NeopetsURL BANK = new NeopetsURL
 (%22ba
@@ -318,24 +318,72 @@
 ml%22)
-,%0A  PROCESS_BANK
+;%0A  public static final NeopetsURL PROCESS_BANK = new NeopetsURL
 (%22pr
@@ -497,16 +497,24 @@
 ath;%0A%0A  
+private 
 NeopetsU
@@ -686,22 +686,26 @@
  static 
-String
+NeopetsURL
  formURL
@@ -763,136 +763,585 @@
 urn 
-BASE_URL;%0A    %7D else %7B%0A      return BASE_URL + %22/%22 + path;%0A    %7D%0A  %7D%0A%0A  public String toString() %7B%0A    return formURL(
+ROOT;%0A    %7D else %7B%0A      return new NeopetsURL(path);%0A    %7D%0A  %7D%0A%0A  @Override%0A  public boolean equals(Object o) %7B%0A    if (this == o) return true;%0A    if (!(o instanceof NeopetsURL)) return false;%0A%0A    NeopetsURL that = (NeopetsURL) o;%0A%0A    if (path != null ? !path.equals(that.path) : that.path != null) return false;%0A%0A    return true;%0A  %7D%0A%0A  @Override%0A  public int hashCode() %7B%0A    return path != null ? path.hashCode() : 0;%0A  %7D%0A%0A  @Override%0A  public String toString() %7B%0A    if (path.isEmpty()) %7B%0A      return BASE_URL;%0A    %7D else %7B%0A      return BASE_URL + %22/%22 + 
 path
-)
 ;%0A
+  
   %7D%0A
+  %7D
 %0A%7D%0A

Convert NeopetsURL to a class from enum