Class CVCPrincipal

    • Constructor Detail

      • CVCPrincipal

        public CVCPrincipal​(String name)
        Constructs a principal.
        Parameters:
        name - a name with format Country (2F) | Mnemonic (9V) | SeqNum (5F).
      • CVCPrincipal

        public CVCPrincipal​(net.sf.scuba.data.Country country,
                            String mnemonic,
                            String seqNumber)
        Constructs a principal.
        Parameters:
        country - the country
        mnemonic - the mnemonic
        seqNumber - the sequence number
    • Method Detail

      • getName

        public String getName()
        Consists of the concatenation of country code (length 2), mnemonic (length < 9) and sequence number (length 5).
        Specified by:
        getName in interface Principal
        Returns:
        the name of the principal
      • toString

        public String toString()
        Gets a textual representation of this principal.
        Specified by:
        toString in interface Principal
        Overrides:
        toString in class Object
        Returns:
        a textual representation of this principal
      • getCountry

        public net.sf.scuba.data.Country getCountry()
        Gets the country.
        Returns:
        the country
      • getMnemonic

        public String getMnemonic()
        Gets the mnemonic.
        Returns:
        the mnemonic
      • getSeqNumber

        public String getSeqNumber()
        Gets the sequence number.
        Returns:
        the seqNumber
      • equals

        public boolean equals​(Object otherObj)
        Tests for equality with respect to another object.
        Specified by:
        equals in interface Principal
        Overrides:
        equals in class Object
        Parameters:
        otherObj - another object
        Returns:
        whether this principal equals the other object
      • hashCode

        public int hashCode()
        Gets a hash code of this object.
        Specified by:
        hashCode in interface Principal
        Overrides:
        hashCode in class Object
        Returns:
        the hash code