Package com.usatiuk.dhfs.jkleppmanntree.structs

# Record Class JKleppmannTreeNode

java.lang.Object
java.lang.Record
com.usatiuk.dhfs.jkleppmanntree.structs.JKleppmannTreeNode

All Implemented Interfaces:
  `TreeNode<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>`, `Serializable`

public record JKleppmannTreeNode(JObjectKey key, JObjectKey parent, OpMove<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey> lastEffectiveOp, @Nullable JKleppmannTreeNodeMeta meta, org.pcollections.PMap<String,JObjectKey> children) extends Record implements TreeNode<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>, Serializable

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`JKleppmannTreeNode(JObjectKey id, JObjectKey parent, JKleppmannTreeNodeMeta meta)`
`JKleppmannTreeNode(JObjectKey key, JObjectKey parent, OpMove<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey> lastEffectiveOp, JKleppmannTreeNodeMeta meta, org.pcollections.PMap<String,JObjectKey> children)`
Creates an instance of a `JKleppmannTreeNode` record class.

## Method Summary

Modifier and Type
Method
Description
`org.pcollections.PMap<String,JObjectKey>`
`children()`
Returns the value of the `children` record component.
`Collection<JObjectKey>`
`collectRefsTo()`
`final boolean`
`equals(Object o)`
Indicates whether some other object is "equal to" this one.
`int`
`estimateSize()`
`final int`
`hashCode()`
Returns a hash code value for this object.
`JObjectKey`
`key()`
Returns the value of the `key` record component.
`OpMove<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>`
`lastEffectiveOp()`
Returns the value of the `lastEffectiveOp` record component.
`JKleppmannTreeNodeMeta`
`meta()`
Returns the value of the `meta` record component.
`JObjectKey`
`parent()`
Returns the value of the `parent` record component.
`final String`
`toString()`
Returns a string representation of this record class.
`JKleppmannTreeNode`
`withChildren(org.pcollections.PMap<String,JObjectKey> children)`
`JKleppmannTreeNode`
`withLastEffectiveOp(OpMove<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey> lastEffectiveOp)`
`JKleppmannTreeNode`
`withMeta(JKleppmannTreeNodeMeta meta)`
`JKleppmannTreeNode`
`withParent(JObjectKey parent)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface com.usatiuk.kleppmanntree.TreeNode

`name`

## Constructor Details

### JKleppmannTreeNode

public JKleppmannTreeNode(JObjectKey id, JObjectKey parent, JKleppmannTreeNodeMeta meta)

### JKleppmannTreeNode

public JKleppmannTreeNode(JObjectKey key, JObjectKey parent, OpMove<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey> lastEffectiveOp, @Nullable JKleppmannTreeNodeMeta meta, org.pcollections.PMap<String,JObjectKey> children)
Creates an instance of a `JKleppmannTreeNode` record class.

Parameters:
  `key` - the value for the `key` record component
  `parent` - the value for the `parent` record component
  `lastEffectiveOp` - the value for the `lastEffectiveOp` record component
  `meta` - the value for the `meta` record component
  `children` - the value for the `children` record component

## Method Details

### withParent

public JKleppmannTreeNode withParent(JObjectKey parent)

Specified by:
  `withParent` in interface `TreeNode<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>`

### withLastEffectiveOp

public JKleppmannTreeNode withLastEffectiveOp(OpMove<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey> lastEffectiveOp)

Specified by:
  `withLastEffectiveOp` in interface `TreeNode<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>`

### withMeta

public JKleppmannTreeNode withMeta(JKleppmannTreeNodeMeta meta)

Specified by:
  `withMeta` in interface `TreeNode<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>`

### withChildren

public JKleppmannTreeNode withChildren(org.pcollections.PMap<String,JObjectKey> children)

Specified by:
  `withChildren` in interface `TreeNode<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>`

### collectRefsTo

public Collection<JObjectKey> collectRefsTo()

### estimateSize

public int estimateSize()

### 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.

### key

public JObjectKey key()
Returns the value of the `key` record component.

Specified by:
  `key` in interface `TreeNode<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>`
Returns:
  the value of the `key` record component

### parent

public JObjectKey parent()
Returns the value of the `parent` record component.

Specified by:
  `parent` in interface `TreeNode<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>`
Returns:
  the value of the `parent` record component

### lastEffectiveOp

public OpMove<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey> lastEffectiveOp()
Returns the value of the `lastEffectiveOp` record component.

Specified by:
  `lastEffectiveOp` in interface `TreeNode<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>`
Returns:
  the value of the `lastEffectiveOp` record component

### meta

@Nullable public JKleppmannTreeNodeMeta meta()
Returns the value of the `meta` record component.

Specified by:
  `meta` in interface `TreeNode<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>`
Returns:
  the value of the `meta` record component

### children

public org.pcollections.PMap<String,JObjectKey> children()
Returns the value of the `children` record component.

Specified by:
  `children` in interface `TreeNode<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>`
Returns:
  the value of the `children` record component