Record Class Capability

java.lang.Object
java.lang.Record
zeroecho.core.Capability
Record Components:
algorithmId - canonical algorithm identifier
family - algorithm family
role - supported key usage
contextType - produced context type
keyType - accepted key type
specType - accepted specification type
defaultSpec - non-null resolved default specification

public record Capability(String algorithmId, AlgorithmFamily family, KeyUsage role, Class<? extends CryptoContext> contextType, Class<? extends Key> keyType, Class<? extends ContextSpec> specType, ContextSpec defaultSpec) extends Record
Immutable value descriptor of one algorithm context capability.

The default specification is resolved once during provider construction. All components therefore have stable value semantics and are safe for concurrent reads.

Since:
1.0
  • Constructor Details

  • Method Details

    • toString

      public final 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
    • hashCode

      public final 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
    • equals

      public final boolean equals(Object o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • algorithmId

      public String algorithmId()
      Returns the value of the algorithmId record component.
      Returns:
      the value of the algorithmId record component
    • family

      public AlgorithmFamily family()
      Returns the value of the family record component.
      Returns:
      the value of the family record component
    • role

      public KeyUsage role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component
    • contextType

      public Class<? extends CryptoContext> contextType()
      Returns the value of the contextType record component.
      Returns:
      the value of the contextType record component
    • keyType

      public Class<? extends Key> keyType()
      Returns the value of the keyType record component.
      Returns:
      the value of the keyType record component
    • specType

      public Class<? extends ContextSpec> specType()
      Returns the value of the specType record component.
      Returns:
      the value of the specType record component
    • defaultSpec

      public ContextSpec defaultSpec()
      Returns the value of the defaultSpec record component.
      Returns:
      the value of the defaultSpec record component