net.corda.core.crypto

## Class CompositeKey.Node

- net.corda.core.crypto.CompositeKey
- - net.corda.core.crypto.CompositeKey.Node

- Enclosing class:
    CompositeKey

      public static class CompositeKey.Node
      extends CompositeKey

  Represents a node in the key tree. It maintains a list of child nodes – sub-trees, and associated weights carried by child node signatures.

  The threshold specifies the minimum total weight required (in the simple case – the minimum number of child signatures required) to satisfy the sub-tree rooted at this node.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.corda.core.crypto.CompositeKey

      `CompositeKey.Builder, CompositeKey.Companion, CompositeKey.Leaf, CompositeKey.Node`

  - ### Field Summary

    - ### Fields inherited from class net.corda.core.crypto.CompositeKey

      `Companion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Node(int threshold, java.util.List<? extends net.corda.core.crypto.CompositeKey> children, java.util.List<java.lang.Integer> weights)` Represents a node in the key tree. It maintains a list of child nodes – sub-trees, and associated weights carried by child node signatures.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object other)`
    `java.util.List<net.corda.core.crypto.CompositeKey>` | `getChildren()`
    `java.util.Set<java.security.PublicKey>` | `getKeys()` Returns all PublicKeys contained within the tree leaves
    `int` | `getThreshold()`
    `java.util.List<java.lang.Integer>` | `getWeights()`
    `int` | `hashCode()`
    `boolean` | `isFulfilledBy(java.lang.Iterable<? extends java.security.PublicKey> keys)` Checks whether keys match a sufficient amount of leaf nodes
    `java.lang.String` | `toString()`

    - ### Methods inherited from class net.corda.core.crypto.CompositeKey

      `containsAny, getKeys, getSingleKey, isFulfilledBy, isFulfilledBy, toBase58String`

- - ### Constructor Detail

    - #### Node

          public Node(int threshold,
                      java.util.List<? extends net.corda.core.crypto.CompositeKey> children,
                      java.util.List<java.lang.Integer> weights)

      Represents a node in the key tree. It maintains a list of child nodes – sub-trees, and associated weights carried by child node signatures.

      The threshold specifies the minimum total weight required (in the simple case – the minimum number of child signatures required) to satisfy the sub-tree rooted at this node.

  - ### Method Detail

    - #### isFulfilledBy

          public boolean isFulfilledBy(java.lang.Iterable<? extends java.security.PublicKey> keys)

      Checks whether keys match a sufficient amount of leaf nodes

    - #### getKeys

          public java.util.Set<java.security.PublicKey> getKeys()

      Returns all PublicKeys contained within the tree leaves

      See Also:
        PublicKey

    - #### equals

          public boolean equals(java.lang.Object other)

    - #### hashCode

          public int hashCode()

    - #### toString

          public java.lang.String toString()

    - #### getThreshold

          public int getThreshold()

    - #### getChildren

          public java.util.List<net.corda.core.crypto.CompositeKey> getChildren()

    - #### getWeights

          public java.util.List<java.lang.Integer> getWeights()