public Path getParent ( ) { if ( ! isAbsolute ( ) ) throw new IllegalStateException ( "path is not absolute: " + toString ( ) ) ; if ( segments . isEmpty ( ) ) return null ; return new Path ( segments . subList ( 0 , segments . size ( ) - 1 ) , true ) ; }
Returns the parent of this path or null if this path is the root path .