Author: nextgens
Date: 2008-08-14 22:24:27 +0000 (Thu, 14 Aug 2008)
New Revision: 21880

Modified:
   trunk/freenet/src/freenet/io/AddressIdentifier.java
Log:
Convert AddressIdentifier.AddressType from a class to an enum

Modified: trunk/freenet/src/freenet/io/AddressIdentifier.java
===================================================================
--- trunk/freenet/src/freenet/io/AddressIdentifier.java 2008-08-14 22:23:38 UTC 
(rev 21879)
+++ trunk/freenet/src/freenet/io/AddressIdentifier.java 2008-08-14 22:24:27 UTC 
(rev 21880)
@@ -46,23 +46,9 @@
                ipv6PatternWithPercentScopeID = 
Pattern.compile(ipv6AddressRegex + percentScopeIDRegex);
                ipv6ISATAPPattern = Pattern.compile(ipv6ISATAPAddressRegex);
        }
-
-       public static class AddressType {
-
-               public static final AddressType OTHER = new 
AddressType("Other");
-               public static final AddressType IPv4 = new AddressType("IPv4");
-               public static final AddressType IPv6 = new AddressType("IPv6");
-
-               private final String name;
-
-               private AddressType(String name) {
-                       this.name = name;
-               }
-
-               public String toString() {
-                       return name;
-               }
-
+       
+       public enum AddressType {
+               OTHER, IPv4, IPv6;
        }

        /**


Reply via email to