1 19 20 package com.sslexplorer.policyframework; 21 22 import java.io.Serializable ; 23 24 35 36 public class Permission implements Comparable , Serializable { 37 38 private int id; 39 private String bundle; 40 41 47 public Permission(int id, String bundle) { 48 this.id = id; 49 this.bundle = bundle; 50 } 51 52 56 public String getBundle() { 57 return bundle; 58 } 59 60 65 public int getId() { 66 return id; 67 } 68 69 72 public boolean equals(Object o) { 73 return o instanceof Permission && 74 getId() == ((Permission)o).getId(); 75 } 76 77 82 public int compareTo(Object o) { 83 return o instanceof Permission ? new Integer (getId()).compareTo(new Integer (((Permission)o).getId())) : 1; 84 } 85 } | Popular Tags |