1 20 package org.enhydra.barracuda.plankton.data; 21 22 import javax.servlet.*; 23 import javax.servlet.http.*; 24 25 29 public class Param { 30 31 String key = null; 32 String value = null; 33 34 37 public Param() { 38 this(null, null); 39 } 40 41 47 public Param(String ikey, String ivalue) { 48 setKey(ikey); 49 setValue(ivalue); 50 } 51 52 57 public void setKey(String ikey) { 58 key = ikey; 59 } 60 61 66 public String getKey() { 67 return key; 68 } 69 70 75 public void setValue(String ivalue) { 76 value = ivalue; 77 } 78 79 84 public String getValue() { 85 return value; 86 } 87 88 94 public boolean equals(Object o) { 95 if (o==null) return false; 96 if (o instanceof Param) { 97 Param p = (Param) o; 98 if (key==null && p.key!=null) return false; 99 if (value==null && p.value!=null) return false; 100 else return (key.equals(p.key) && value.equals(p.value)); 101 } else { 102 return false; 103 } 104 } 105 106 109 public String toString() { 110 return "Param {k:"+key+" v:"+value+"}"; 111 } 112 } 113 | Popular Tags |