1 7 8 package com.sun.security.auth; 9 10 16 17 public class NTNumericCredential { 18 19 private long impersonationToken; 20 21 29 public NTNumericCredential(long token) { 30 this.impersonationToken = token; 31 } 32 33 42 public long getToken() { 43 return impersonationToken; 44 } 45 46 53 public String toString() { 54 java.text.MessageFormat form = new java.text.MessageFormat 55 (sun.security.util.ResourcesMgr.getString 56 ("NTNumericCredential: name", 57 "sun.security.util.AuthResources")); 58 Object [] source = {Long.toString(impersonationToken)}; 59 return form.format(source); 60 } 61 62 76 public boolean equals(Object o) { 77 if (o == null) 78 return false; 79 80 if (this == o) 81 return true; 82 83 if (!(o instanceof NTNumericCredential)) 84 return false; 85 NTNumericCredential that = (NTNumericCredential)o; 86 87 if (impersonationToken == that.getToken()) 88 return true; 89 return false; 90 } 91 92 99 public int hashCode() { 100 return (int)this.impersonationToken; 101 } 102 } 103 | Popular Tags |