001package com.nimbusds.common.id;
002
003
004/**
005 * Represents a secure immutable session identifier (SID).
006 */
007public final class SID extends BaseIdentifier {
008
009
010        /**
011         * Creates a new unique session identifier (SID) based on a secure 
012         * randomly generated 256-bit number, Base64URL-encoded.
013         */
014        public SID() {
015        
016                super();
017        }
018        
019        
020        /**
021         * Creates a new session identifier (SID) from the specified string.
022         *
023         * @param value The session identifier (SID) value.
024         */
025        public SID(final String value) {
026        
027                super(value);
028        }
029        
030        
031        /**
032         * Overrides {@code Object.equals()}.
033         *
034         * @param object The object to compare to.
035         *
036         * @return {@code true} if the objects have the same value, otherwise
037         *         {@code false}.
038         */
039        @Override
040        public boolean equals(final Object object) {
041        
042                return object instanceof SID && this.toString().equals(object.toString());
043        }
044}