(no commit message)
[utils] / crawler / basic / src / org / wamblee / crawler / PageType.java
index 9d2af30b74455c0f844060b7b80d375a3d0aed22..8320c0bea732142a40c0df81e3cbec549e27f2a9 100644 (file)
 package org.wamblee.crawler;
 
 /**
- * 
+ * Represents the type of a page determining how the HTML should be transformed into 
+ * XML.
  */
 public class PageType {
 
+    /**
+     * Type string. 
+     */
     private String _type; 
     
+    /**
+     * Constructs the type.
+     * @param aType Type. 
+     */
     public PageType(String aType) { 
         _type = aType; 
     }
     
+    /**
+     * Gets the type. 
+     * @return Type.
+     */
     public String getType() { 
         return _type; 
     }
@@ -38,4 +50,15 @@ public class PageType {
     public String toString() {
         return "PageType(type='" + _type + "')";
     }
+    
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof PageType)) { 
+            return false; 
+        }
+        return toString().equals(obj.toString());
+    }
 }