1 46 47 package org.mr.kernel.security.authorization; 48 49 import java.net.InetAddress ; 50 51 60 public class WhiteListKeyEntry implements ACLKeyEntry { 61 private InetAddress _ip; 62 63 69 public WhiteListKeyEntry(InetAddress ip){ 70 _ip = ip; 71 } 72 73 80 81 89 public boolean equals(Object obj){ 90 if (!(obj instanceof WhiteListKeyEntry)) 91 return false; 92 WhiteListKeyEntry other = (WhiteListKeyEntry) obj; 93 return (_ip.equals(other._ip)); 94 } 95 96 102 public int hashCode(){ 103 return _ip.hashCode(); 104 } 105 106 112 public InetAddress getIP(){ 113 return _ip; 114 } 115 116 121 public String toString(){ 122 return _ip.toString(); 123 } 124 } 125 | Popular Tags |