org.crsh.vfs
Class Path

java.lang.Object
  extended by org.crsh.vfs.Path
All Implemented Interfaces:
Iterable<String>

public final class Path
extends Object
implements Iterable<String>


Field Summary
private  boolean dir
          .
private static String[] EMPTY_STRING
          .
private  String[] names
          .
private  String value
          .
 
Constructor Summary
private Path(boolean dir, String[] names)
           
 
Method Summary
 boolean equals(Object o)
           
static Path get(Path parent, String name, boolean dir)
           
static Path get(String s)
           
 String getName()
           
 int getSize()
           
 String getValue()
          Returns the canonical path value.
 int hashCode()
           
 boolean isChildOf(Path parent)
           
 boolean isDir()
           
 Iterator<String> iterator()
           
private static String[] parseNames(String s, int prev, int end, int count)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_STRING

private static final String[] EMPTY_STRING
.


dir

private final boolean dir
.


names

private final String[] names
.


value

private String value
.

Constructor Detail

Path

private Path(boolean dir,
             String[] names)
Method Detail

get

public static Path get(Path parent,
                       String name,
                       boolean dir)

get

public static Path get(String s)

parseNames

private static String[] parseNames(String s,
                                   int prev,
                                   int end,
                                   int count)

iterator

public Iterator<String> iterator()
Specified by:
iterator in interface Iterable<String>

getSize

public int getSize()

isDir

public boolean isDir()

getName

public String getName()

isChildOf

public boolean isChildOf(Path parent)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getValue

public String getValue()
Returns the canonical path value.

Returns:
the value

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 eXo Platform SAS. All Rights Reserved.