org.modeshape.jcr.cache

## Class ChildReferences.NoChanges

- java.lang.Object
- - org.modeshape.jcr.cache.ChildReferences.NoChanges

- All Implemented Interfaces:
    ChildReferences.Changes
  Enclosing interface:
    ChildReferences

      @Immutable
      public static final class ChildReferences.NoChanges
      extends Object
      implements ChildReferences.Changes

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static Iterator<ChildReferences.ChildInsertions>` | `NO_INSERTIONS_ITERATOR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChildReferences.NoChanges()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ChildReference` | `inserted(NodeKey key)` Get the child reference for the inserted node with the supplied key.
    `int` | `insertionCount()` Get the number of child references that were inserted.
    `int` | `insertionCount(Name name)` Get the number of child references that were inserted with the given name.
    `Iterator<ChildReferences.ChildInsertions>` | `insertions(Name name)` Get the references to the children with the supplied name that were inserted.
    `ChildReferences.ChildInsertions` | `insertionsBefore(ChildReference key)` Get the set of child references that were inserted before the node with the supplied key.
    `boolean` | `isEmpty()` Determine if this set of changes is empty.
    `boolean` | `isRemoved(ChildReference key)` Determine whether the supplied child reference was removed.
    `boolean` | `isRenamed(ChildReference ref)` Determine whether the supplied child reference was renamed.
    `boolean` | `isRenamed(Name newName)` Determine whether any of the child references were renamed to the supplied name.
    `int` | `removalCount()` Get the number of child references that were removed.
    `int` | `renameCount()` Get the number of child references that were renamed.
    `Name` | `renamed(NodeKey key)` Return the new name for the child node with the supplied key.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NO_INSERTIONS_ITERATOR

          protected static final Iterator<ChildReferences.ChildInsertions> NO_INSERTIONS_ITERATOR

  - ### Constructor Detail

    - #### ChildReferences.NoChanges

          public ChildReferences.NoChanges()

  - ### Method Detail

    - #### isEmpty

          public boolean isEmpty()

      Description copied from interface: `ChildReferences.Changes`
      Determine if this set of changes is empty.
      Specified by:
        `isEmpty` in interface `ChildReferences.Changes`
      Returns:
        true if there are no effective changes, or false if there is at least one effective change

    - #### insertionCount

          public int insertionCount()

      Description copied from interface: `ChildReferences.Changes`
      Get the number of child references that were inserted.
      Specified by:
        `insertionCount` in interface `ChildReferences.Changes`
      Returns:
        the number of inserted child references; never negative

    - #### insertionCount

          public int insertionCount(Name name)

      Description copied from interface: `ChildReferences.Changes`
      Get the number of child references that were inserted with the given name.
      Specified by:
        `insertionCount` in interface `ChildReferences.Changes`
      Parameters:
        `name` - the `Name` of a child, never `null`
      Returns:
        the number of inserted child references which have the given name; never negative

    - #### removalCount

          public int removalCount()

      Description copied from interface: `ChildReferences.Changes`
      Get the number of child references that were removed.
      Specified by:
        `removalCount` in interface `ChildReferences.Changes`
      Returns:
        the number of removed child references; never negative

    - #### renameCount

          public int renameCount()

      Description copied from interface: `ChildReferences.Changes`
      Get the number of child references that were renamed.
      Specified by:
        `renameCount` in interface `ChildReferences.Changes`
      Returns:
        the number of renamed child references; never negative

    - #### renamed

          public Name renamed(NodeKey key)

      Description copied from interface: `ChildReferences.Changes`
      Return the new name for the child node with the supplied key.
      Specified by:
        `renamed` in interface `ChildReferences.Changes`
      Parameters:
        `key` - the child node's key; may not be null
      Returns:
        the new name, or null if the node is not a child or was not renamed

    - #### insertions

          public Iterator<ChildReferences.ChildInsertions> insertions(Name name)

      Description copied from interface: `ChildReferences.Changes`
      Get the references to the children with the supplied name that were inserted.
      Specified by:
        `insertions` in interface `ChildReferences.Changes`
      Parameters:
        `name` - the name; may not be null
      Returns:
        the iterator over the insertions; never null but possibly empty

    - #### inserted

          public ChildReference inserted(NodeKey key)

      Description copied from interface: `ChildReferences.Changes`
      Get the child reference for the inserted node with the supplied key.
      Specified by:
        `inserted` in interface `ChildReferences.Changes`
      Parameters:
        `key` - the node key for the inserted node; may not be null
      Returns:
        the child reference, or null if no node was inserted with the supplied key

    - #### insertionsBefore

          public ChildReferences.ChildInsertions insertionsBefore(ChildReference key)

      Description copied from interface: `ChildReferences.Changes`
      Get the set of child references that were inserted before the node with the supplied key.
      Specified by:
        `insertionsBefore` in interface `ChildReferences.Changes`
      Parameters:
        `key` - the node key for the node before which the inserted nodes are to be returned; may not be null
      Returns:
        the nodes that were inserted before the node with the supplied key

    - #### isRemoved

          public boolean isRemoved(ChildReference key)

      Description copied from interface: `ChildReferences.Changes`
      Determine whether the supplied child reference was removed.
      Specified by:
        `isRemoved` in interface `ChildReferences.Changes`
      Parameters:
        `key` - the reference; may not be null
      Returns:
        true if the child reference was removed, or false otherwise

    - #### isRenamed

          public boolean isRenamed(ChildReference ref)

      Description copied from interface: `ChildReferences.Changes`
      Determine whether the supplied child reference was renamed.
      Specified by:
        `isRenamed` in interface `ChildReferences.Changes`
      Parameters:
        `ref` - the reference; may not be null
      Returns:
        true if the child reference was renamed, or false otherwise

    - #### isRenamed

          public boolean isRenamed(Name newName)

      Description copied from interface: `ChildReferences.Changes`
      Determine whether any of the child references were renamed to the supplied name.
      Specified by:
        `isRenamed` in interface `ChildReferences.Changes`
      Parameters:
        `newName` - the new name; may not be null
      Returns:
        true if at least one child reference was renamed to the supplied name, or false otherwise

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