Package org.eclipse.emf.cdo.spi.common.branch

## Class CDOBranchUtil

- java.lang.Object
- - org.eclipse.emf.cdo.spi.common.branch.CDOBranchUtil

-     public final class CDOBranchUtil
      extends java.lang.Object

  If the meaning of this type isn't clear, there really should be more of a description here...
  Since:
    3.0
  Author:
    Eike Stepper

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static CDOBranchPoint` | `AUTO_BRANCH_POINT` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static CDOBranch` | `adjustBranch​(CDOBranch branch, CDOBranchManager branchManager)` |
    `static CDOBranchPoint` | `adjustBranchPoint​(CDOBranchPoint branchPoint, CDOBranchManager branchManager)` |
    `static CDOBranchPoint` | `copyBranchPoint​(CDOBranchPoint source)` |
    `static CDOBranchVersion` | `copyBranchVersion​(CDOBranchVersion source)` |
    `static InternalCDOBranchManager` | `createBranchManager()` |
    `static CDOBranchPointRange` | `createRange​(CDOBranchPoint startPoint, CDOBranchPoint endPoint)` |
    `static void` | `forEachBranchInTree​(CDOBranch root, java.util.function.Consumer<CDOBranch> consumer)` |
    `static void` | `forEachBranchPoint​(CDOBranchPoint branchPoint, boolean considerBranchBases, java.util.function.Predicate<CDOBranchPoint> consumer)` |
    `static CDOBranchPoint` | `getAncestor​(CDOBranchPoint point1, CDOBranchPoint point2)` |
    `static CDOBranchPoint[]` | `getPath​(CDOBranchPoint point)` |
    `static boolean` | `isContainedBy​(CDOBranchPoint contained, CDOBranchPoint container)` | Returns `true` if the first given branch point "contained" is reachable from the second given branch point "container" by following the `branch bases` upwards, `false` otherwise.
    `static CDOBranchPoint` | `normalizeBranchPoint​(CDOBranch branch, long timeStamp)` |
    `static CDOBranchPoint` | `normalizeBranchPoint​(CDOBranchPoint branchPoint)` |
    `static CDOBranchPoint` | `readBranchPointOrNull​(CDODataInput in)` |
    `static CDOBranchPointRange` | `readRange​(CDODataInput in)` |
    `static CDOBranchPointRange` | `readRangeOrNull​(CDODataInput in)` |
    `static java.lang.String` | `sanitizePathName​(java.lang.String pathName)` |
    `static void` | `writeBranchPointOrNull​(CDODataOutput out, CDOBranchPoint point)` |
    `static void` | `writeRange​(CDODataOutput out, CDOBranchPointRange range)` |
    `static void` | `writeRangeOrNull​(CDODataOutput out, CDOBranchPointRange range)` |

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

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

- - ### Field Detail

    - #### AUTO_BRANCH_POINT

          public static final CDOBranchPoint AUTO_BRANCH_POINT

      Since:
        4.6

  - ### Method Detail

    - #### createBranchManager

          public static InternalCDOBranchManager createBranchManager()

    - #### createRange

          public static CDOBranchPointRange createRange​(CDOBranchPoint startPoint,
                                                        CDOBranchPoint endPoint)

    - #### writeRange

          public static void writeRange​(CDODataOutput out,
                                        CDOBranchPointRange range)
                                 throws java.io.IOException

      Throws:
        `java.io.IOException`
      Since:
        4.6

    - #### readRange

          public static CDOBranchPointRange readRange​(CDODataInput in)
                                               throws java.io.IOException

      Throws:
        `java.io.IOException`
      Since:
        4.6

    - #### writeRangeOrNull

          public static void writeRangeOrNull​(CDODataOutput out,
                                              CDOBranchPointRange range)
                                       throws java.io.IOException

      Throws:
        `java.io.IOException`
      Since:
        4.6

    - #### readRangeOrNull

          public static CDOBranchPointRange readRangeOrNull​(CDODataInput in)
                                                     throws java.io.IOException

      Throws:
        `java.io.IOException`
      Since:
        4.6

    - #### writeBranchPointOrNull

          public static void writeBranchPointOrNull​(CDODataOutput out,
                                                    CDOBranchPoint point)
                                             throws java.io.IOException

      Throws:
        `java.io.IOException`
      Since:
        4.6

    - #### readBranchPointOrNull

          public static CDOBranchPoint readBranchPointOrNull​(CDODataInput in)
                                                      throws java.io.IOException

      Throws:
        `java.io.IOException`
      Since:
        4.6

    - #### copyBranchPoint

          public static CDOBranchPoint copyBranchPoint​(CDOBranchPoint source)

    - #### copyBranchVersion

          public static CDOBranchVersion copyBranchVersion​(CDOBranchVersion source)

    - #### adjustBranch

          public static CDOBranch adjustBranch​(CDOBranch branch,
                                               CDOBranchManager branchManager)

      Since:
        4.14

    - #### adjustBranchPoint

          public static CDOBranchPoint adjustBranchPoint​(CDOBranchPoint branchPoint,
                                                         CDOBranchManager branchManager)

      Since:
        4.4

    - #### normalizeBranchPoint

          public static CDOBranchPoint normalizeBranchPoint​(CDOBranchPoint branchPoint)

      Since:
        4.4

    - #### normalizeBranchPoint

          public static CDOBranchPoint normalizeBranchPoint​(CDOBranch branch,
                                                            long timeStamp)

      Since:
        4.2

    - #### isContainedBy

          public static boolean isContainedBy​(CDOBranchPoint contained,
                                              CDOBranchPoint container)

      Returns `true` if the first given branch point "contained" is reachable from the second given branch point "container" by following the `branch bases` upwards, `false` otherwise.

    - #### getAncestor

          public static CDOBranchPoint getAncestor​(CDOBranchPoint point1,
                                                   CDOBranchPoint point2)

    - #### forEachBranchPoint

          public static void forEachBranchPoint​(CDOBranchPoint branchPoint,
                                                boolean considerBranchBases,
                                                java.util.function.Predicate<CDOBranchPoint> consumer)

      Since:
        4.15

    - #### forEachBranchInTree

          public static void forEachBranchInTree​(CDOBranch root,
                                                 java.util.function.Consumer<CDOBranch> consumer)

      Since:
        4.15

    - #### getPath

          public static CDOBranchPoint[] getPath​(CDOBranchPoint point)

    - #### sanitizePathName

          public static java.lang.String sanitizePathName​(java.lang.String pathName)

      Since:
        4.12