1 package com.calipso.reportgenerator.common; 2 3 import java.util.HashMap ; 4 import java.util.ArrayList ; 5 6 12 public class Rol implements Comparable { 13 14 private String rol; 15 private String description; 16 20 public Rol(String id){ 21 this.rol = id; 22 } 23 28 public Rol(String id,String description){ 29 this.rol = id; 30 this.description = description; 31 } 32 36 public String getDescription() { 37 return description; 38 } 39 43 public String getId(){ 44 return this.rol; 45 } 46 50 public String toString(){ 51 return getId(); 52 } 53 61 public int compareTo(Object o) { 62 Rol rol = (Rol) o; 63 return getId().compareTo((rol.getId())); 64 } 65 71 public boolean equals(Object o){ 72 return ((Rol)o).getId().equals(getId()); 73 } 74 78 public int hashCode(){ 79 return getId().hashCode(); 80 } 81 } 82 | Popular Tags |