Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Compares the specified object with this {@code Timestamp} for equality
and returns {@code true} if the specified object is equal, {@code false}
otherwise. The given object is equal to this {@code Timestamp}, if it is
an instance of {@code Timestamp}, the two timestamps have an equal date
and time and their certificate paths are equal.
if (obj == this) {
return true;
}
if (obj instanceof Timestamp) {
Timestamp that = (Timestamp) obj;
return timestamp.equals(that.timestamp)
&& signerCertPath.equals(that.signerCertPath);
}
return false;
|
public java.security.cert.CertPath | getSignerCertPath()Returns the certificate path of this {@code Timestamp}.
return signerCertPath;
|
public java.util.Date | getTimestamp()Returns the date and time of this {@code Timestamp}.
// BEGIN android-changed
// copied from a newer version of harmony
return (Date) timestamp.clone();
// END android-changed
|
public int | hashCode()Returns the hash code value for this {@code Timestamp}. Returns the same
hash code for {@code Timestamp}s that are equal to each other as
required by the general contract of {@link Object#hashCode}.
if (hash == 0) {
hash = timestamp.hashCode() ^ signerCertPath.hashCode();
}
return hash;
|
public java.lang.String | toString()Returns a string containing a concise, human-readable description of this
{@code Timestamp}.
StringBuffer buf = new StringBuffer(256);
// Dump only the first certificate
buf.append("Timestamp [").append(timestamp).append(" certPath="); //$NON-NLS-1$ //$NON-NLS-2$
buf.append(signerCertPath.getCertificates().get(0)).append("]"); //$NON-NLS-1$
return buf.toString();
|