org.modeshape.jcr.cache

## Class ChildReference

- java.lang.Object
- - org.modeshape.jcr.cache.ChildReference

- All Implemented Interfaces:
    Comparable<ChildReference>

      @Immutable
      public class ChildReference
      extends Object
      implements Comparable<ChildReference>

  An immutable reference to a child node.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChildReference(NodeKey key, Name name, int snsIndex)`
    `ChildReference(NodeKey key, Path.Segment segment)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(ChildReference that)`
    `boolean` | `equals(Object obj)`
    `NodeKey` | `getKey()`
    `Name` | `getName()`
    `Path.Segment` | `getSegment()`
    `String` | `getSegmentAsString(NamespaceRegistry registry)`
    `int` | `getSnsIndex()`
    `int` | `hashCode()`
    `String` | `toString()`
    `String` | `toString(NamespaceRegistry registry)`
    `ChildReference` | `with(int snsIndex)`
    `ChildReference` | `with(Name name, int snsIndex)`

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

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

- - ### Constructor Detail

    - #### ChildReference

          public ChildReference(NodeKey key,
                        Name name,
                        int snsIndex)

    - #### ChildReference

          public ChildReference(NodeKey key,
                        Path.Segment segment)

  - ### Method Detail

    - #### getKey

          public NodeKey getKey()

      Returns:
        key

    - #### getName

          public Name getName()

      Returns:
        name

    - #### getSnsIndex

          public int getSnsIndex()

      Returns:
        snsIndex

    - #### getSegment

          public Path.Segment getSegment()

    - #### compareTo

          public int compareTo(ChildReference that)

      Specified by:
        `compareTo` in interface `Comparable<ChildReference>`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getSegmentAsString

          public String getSegmentAsString(NamespaceRegistry registry)

    - #### toString

          public String toString(NamespaceRegistry registry)

    - #### with

          public ChildReference with(int snsIndex)

    - #### with

          public ChildReference with(Name name,
                            int snsIndex)

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.