Package java.security

Class Timestamp

    • Constructor Detail

      • Timestamp

        public Timestamp​(Date timestamp,
                         CertPath signerCertPath)
        Constructs a new instance of Timestamp with the specified timestamp and the given certificate path.
        Parameters:
        timestamp - date and time.
        signerCertPath - the certificate path.
        Throws:
        NullPointerException - if timestamp is null or if signerCertPath is null.
    • Method Detail

      • equals

        public boolean equals​(Object obj)
        Compares the specified object with this Timestamp for equality and returns true if the specified object is equal, false otherwise. The given object is equal to this Timestamp, if it is an instance of Timestamp, the two timestamps have an equal date and time and their certificate paths are equal.
        Overrides:
        equals in class Object
        Parameters:
        obj - object to be compared for equality with this Timestamp.
        Returns:
        true if the specified object is equal to this Timestamp, otherwise false.
        See Also:
        hashCode()
      • getSignerCertPath

        public CertPath getSignerCertPath()
        Returns the certificate path of this Timestamp.
        Returns:
        the certificate path of this Timestamp.
      • getTimestamp

        public Date getTimestamp()
        Returns the date and time of this Timestamp.
        Returns:
        the date and time of this Timestamp.
      • hashCode

        public int hashCode()
        Returns the hash code value for this Timestamp. Returns the same hash code for Timestamps that are equal to each other as required by the general contract of Object.hashCode().
        Overrides:
        hashCode in class Object
        Returns:
        the hash code value for this Timestamp.
        See Also:
        Object.equals(Object), equals(Object)
      • toString

        public String toString()
        Returns a string containing a concise, human-readable description of this Timestamp.
        Overrides:
        toString in class Object
        Returns:
        a printable representation for this Timestamp.