Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.infinispan.schematic.internal.document
Class Paths.MultiSegmentPath

    java.lang.Object
      org.infinispan.schematic.internal.document.Paths.MultiSegmentPath

All Implemented Interfaces:
  Comparable<Path>, Iterable<String>, Path

Enclosing class:
  Paths

    @Immutable
    @SerializeWith(value=Paths.Externalizer.class)
    protected static final class Paths.MultiSegmentPath

extends Object
implements Path

Constructor Summary
`protected` | `Paths.MultiSegmentPath(List<String> fieldNames)`

Method Summary
`int` | `compareTo(Path that)`
`boolean` | `equals(Object obj)`
`String` | `get(int index)` Get a particular segment within this path.
`String` | `getFirst()` Get the first segment in the path.
`String` | `getLast()` Get the last segment in the path.
`int` | `hashCode()`
`Iterator<String>` | `iterator()`
`Path` | `parent()` Get the parent path, which may be an empty path.
`int` | `size()` Get the number of segments in this path.
`boolean` | `startsWith(Path other)` Determine if the first segments of this path are equal to the segments in the supplied path.
`String` | `toString()`
`Path` | `with(String fieldName)` Obtain a path that has this path as the parent and which has as the last segment the supplied field name.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Paths.MultiSegmentPath

    protected Paths.MultiSegmentPath(List<String> fieldNames)

Method Detail

### iterator

    public Iterator<String> iterator()

  Specified by:
    `iterator` in interface `Iterable<String>`

### get

    public String get(int index)

  Description copied from interface: `Path`
  Get a particular segment within this path.

  Specified by:
    `get` in interface `Path`
  Parameters:
    `index` - the 0-based index of the segment in this path
  Returns:
    the segment; never null

### getLast

    public String getLast()

  Description copied from interface: `Path`
  Get the last segment in the path.

  Specified by:
    `getLast` in interface `Path`
  Returns:
    the field name in the last segment of this path, or null if this is the empty path

### getFirst

    public String getFirst()

  Description copied from interface: `Path`
  Get the first segment in the path.

  Specified by:
    `getFirst` in interface `Path`
  Returns:
    the field name in the first segment of this path, or null if this is the empty path

### size

    public int size()

  Description copied from interface: `Path`
  Get the number of segments in this path. An empty path with have a size of '0'.

  Specified by:
    `size` in interface `Path`
  Returns:
    the size of this path; never negative

### startsWith

    public boolean startsWith(Path other)

  Description copied from interface: `Path`
  Determine if the first segments of this path are equal to the segments in the supplied path. This method returns true if the two paths are equal, or if the supplied path is an ancestor of this path.

  Specified by:
    `startsWith` in interface `Path`
  Parameters:
    `other` - the other path; may not be null
  Returns:
    true if the other path is equal to or an ancestor of this path, or false otherwise

### with

    public Path with(String fieldName)

  Description copied from interface: `Path`
  Obtain a path that has this path as the parent and which has as the last segment the supplied field name.

  Specified by:
    `with` in interface `Path`
  Parameters:
    `fieldName` - the field name for the last segment in the new path; may be null
  Returns:
    the new path, or this path if the `fieldName` parameter is null; never null

### parent

    public Path parent()

  Description copied from interface: `Path`
  Get the parent path, which may be an empty path.

  Specified by:
    `parent` in interface `Path`
  Returns:
    the parent path; never null

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### compareTo

    public int compareTo(Path that)

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

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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