1 16 17 package org.apache.naming.core; 18 19 import javax.naming.directory.Attributes ; 20 21 28 public class NamingEntry { 29 30 31 33 34 public static final int ENTRY = 0; 35 public static final int LINK_REF = 1; 36 public static final int REFERENCE = 2; 37 38 public static final int CONTEXT = 10; 39 40 41 43 44 public NamingEntry(String name, Object value, Attributes atts, int type) { 45 this.name = name; 46 this.value = value; 47 this.type = type; 48 this.attributes=atts; 49 } 50 51 52 54 55 59 public int type; 60 public String name; 61 public Object value; 62 63 public Attributes attributes; 64 65 private boolean hasIntValue=false; 67 private boolean hasBoolValue=false; 68 private boolean hasLongValue=false; 69 70 private int intValue; 71 private boolean boolValue; 72 private long longValue; 73 74 76 public void recycle() { 77 } 78 79 public boolean equals(Object obj) { 80 if ((obj != null) && (obj instanceof NamingEntry)) { 81 return name.equals(((NamingEntry) obj).name); 82 } else { 83 return false; 84 } 85 } 86 87 public int hashCode() { 88 return name.hashCode(); 89 } 90 91 } 92 | Popular Tags |