@Test public void testGetFirstElement() { Path instance = new Path("/usr/local"); String expResult = "usr"; String result = instance.getFirstElement(); assertEquals(expResult, result); }
public String getFirstElement() { if(pathElements == null) return null; return pathElements[0]; }
Path implements Iterable<Path> { public String getFirstElement() { if(pathElements == null) return null; return pathElements[0]; } }
Path implements Iterable<Path> { public String getFirstElement() { if(pathElements == null) return null; return pathElements[0]; } Path();  Path(String path); private  Path(String[] pathElements); }
Path implements Iterable<Path> { public String getFirstElement() { if(pathElements == null) return null; return pathElements[0]; } Path();  Path(String path); private  Path(String[] pathElements); String[] getPathElements(); String getFirstElement(); String getName(); Path getParent(); Path getNext(); boolean hasNext(); boolean isRoot(); boolean isSelf(); boolean isParent(); boolean isLast(); Path getCanonicalPath(); @Override String toString(); String toString(String pathSep); Path join(Path path); Path join(String path); @Override Iterator<Path> iterator(); String getExtension(); @Override int hashCode(); @Override boolean equals(Object obj); boolean startsWith(Path path); Path leftTrim(Path path); }
Path implements Iterable<Path> { public String getFirstElement() { if(pathElements == null) return null; return pathElements[0]; } Path();  Path(String path); private  Path(String[] pathElements); String[] getPathElements(); String getFirstElement(); String getName(); Path getParent(); Path getNext(); boolean hasNext(); boolean isRoot(); boolean isSelf(); boolean isParent(); boolean isLast(); Path getCanonicalPath(); @Override String toString(); String toString(String pathSep); Path join(Path path); Path join(String path); @Override Iterator<Path> iterator(); String getExtension(); @Override int hashCode(); @Override boolean equals(Object obj); boolean startsWith(Path path); Path leftTrim(Path path);  }