1 24 package org.riotfamily.components; 25 26 32 public class Location { 33 34 private String type; 35 36 private String path; 37 38 private String slot; 39 40 public Location() { 41 } 42 43 public Location(Location location) { 44 type = location.getType(); 45 path = location.getPath(); 46 slot = location.getSlot(); 47 } 48 49 public String getPath() { 50 return this.path; 51 } 52 53 public void setPath(String path) { 54 this.path = path; 55 } 56 57 public String getSlot() { 58 return this.slot; 59 } 60 61 public void setSlot(String slot) { 62 this.slot = slot; 63 } 64 65 public String getType() { 66 return this.type; 67 } 68 69 public void setType(String type) { 70 this.type = type; 71 } 72 73 public boolean equals(Object obj) { 74 if (obj instanceof Location) { 75 return toString().equals(obj.toString()); 76 } 77 return false; 78 } 79 80 public int hashCode() { 81 return toString().hashCode(); 82 } 83 84 public String toString() { 85 return type + "://" + path + '#' + slot; 86 } 87 88 } 89 | Popular Tags |