Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 31 32 package org.opencms.workplace; 33 34 43 public class CmsWorkplaceView implements Comparable { 44 45 46 private String m_key; 47 48 49 private Float m_order; 50 51 52 private String m_uri; 53 54 61 public CmsWorkplaceView(String key, String uri, Float order) { 62 63 m_key = key; 64 m_uri = uri; 65 m_order = order; 66 } 67 68 71 public int compareTo(Object obj) { 72 73 if (obj == this) { 74 return 0; 75 } 76 if (obj instanceof CmsWorkplaceView) { 77 return m_order.compareTo(((CmsWorkplaceView)obj).getOrder()); 78 } 79 return 0; 80 } 81 82 85 public boolean equals(Object obj) { 86 87 if (obj == this) { 88 return true; 89 } 90 if (obj instanceof CmsWorkplaceView) { 91 return ((CmsWorkplaceView)obj).m_uri.equals(m_uri); 92 } 93 return false; 94 } 95 96 101 public String getKey() { 102 103 return m_key; 104 } 105 106 111 public Float getOrder() { 112 113 return m_order; 114 } 115 116 121 public String getUri() { 122 123 return m_uri; 124 } 125 126 129 public int hashCode() { 130 131 return getUri().hashCode(); 132 } 133 }
| Popular Tags
|