001    package dk.i1.sctp;
002    
003    /**Encapsulates the ID of an association.
004     * Association ID are guaranteed to be unique for a SCTPSocket for the lifetime of the association.
005     * An association ID may be reused after the association has been shut down.
006     * An association ID is not unique across multiple SCTPSockets
007     */
008    public final class AssociationId {
009            long id;
010            AssociationId(long id_) {
011                    this.id = id_;
012            }
013            public int hashCode() { return (int)id; }
014            public boolean equals(Object o) { return ((AssociationId)o).id==id; }
015            public String toString() { return String.valueOf(id); }
016            
017            /**The default association.
018             *Only used in special circumstances. It is best to read the SCPT socket API draft for details
019             *(Yes, this is the sctp_assoc_t '0')
020             */
021            public static AssociationId default_ = new AssociationId(0);
022    };