1 23 package com.sun.enterprise.repository; 24 25 import java.util.Hashtable ; 26 27 32 public class RawResourceInfo { 33 34 private String resourceType_; 35 private int index_; 36 private Hashtable attributes_; 37 private Hashtable properties_; 38 39 public RawResourceInfo(String resourceType, int index) { 40 resourceType_ = resourceType; 41 index_ = index; 42 attributes_ = new Hashtable (); 43 properties_ = new Hashtable (); 44 } 45 46 public String getResourceType() { 47 return resourceType_; 48 } 49 50 public int getIndex() { 51 return index_; 52 } 53 54 public Hashtable getAttributes() { 55 return attributes_; 56 } 57 58 public Hashtable getProperties() { 59 return properties_; 60 } 61 62 public int hashCode() { 63 return resourceType_.hashCode(); 64 } 65 66 public boolean equals(Object o) { 67 if( o instanceof RawResourceInfo ) { 68 RawResourceInfo other = (RawResourceInfo) o; 69 return other.resourceType_.equals(resourceType_) && 70 (other.index_ == index_); 71 } else { 72 return false; 73 } 74 } 75 76 public String toString() { 77 return "< Raw resource info : " + getResourceType() + " , " + 78 getIndex() + " , " + getAttributes() + " , " + 79 getProperties() + " >"; 80 } 81 } 82 | Popular Tags |