Record Class GeneralName.OtherName

java.lang.Object
java.lang.Record
zeroecho.pkix.GeneralName.OtherName
Record Components:
typeOid - the type-id OID
derValue - exact DER of the value field
All Implemented Interfaces:
GeneralName
Enclosing interface:
GeneralName

public static record GeneralName.OtherName(String typeOid, byte[] derValue) extends Record implements GeneralName
otherName (tag 0): a type-id OID plus the exact DER of the value.
  • Constructor Details

    • OtherName

      public OtherName(String typeOid, byte[] derValue)
      Canonicalizing constructor.
  • Method Details

    • derValue

      public byte[] derValue()
      Returns the encoded value without exposing the record's internal array.
      Returns:
      a defensive copy of the exact DER value
    • equals

      public boolean equals(Object other)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      other - the object with which to compare
      Returns:
      true if this object is the same as the other argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • typeOid

      public String typeOid()
      Returns the value of the typeOid record component.
      Returns:
      the value of the typeOid record component