Class ConnectionKey


  • public class ConnectionKey
    extends Object
    A Key to retrieve Connection in cache.
    • Field Detail

      • name

        private String name
        the name of user.
      • pass

        private String pass
        the password of user.
    • Constructor Detail

      • ConnectionKey

        public ConnectionKey​(String name,
                             String pass)
        Creates a new ConnectionKey object for user's name and password.
        Parameters:
        name - the name of user.
        pass - the password of user.
    • Method Detail

      • hashCode

        public int hashCode()
        Returns a hash code value for the object.
        Overrides:
        hashCode in class Object
        Returns:
        returns the hash code value of the name attribute.
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(Object obj)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class Object
        Returns:
        returns true if the specified object is a ConnectionKey and if name and password are equals.
        See Also:
        Object.hashCode()