Here you can find the source of isAbsolutePath(String path)
Parameter | Description |
---|---|
path | the path expression. |
true
if specified path expression is an absolute path, otherwise false
.
public static boolean isAbsolutePath(String path)
//package com.java2s; /*/*w w w .j a v a 2 s . co m*/ * Copyright (c) 2012. betterFORM Project - http://www.betterform.de * Licensed under the terms of BSD License */ public class Main { /** * Start of an instance() function expression. */ public static final String INSTANCE_FUNCTION = "instance("; /** * Checks wether the specified path expression is an absolute path. * * @param path the path expression. * @return <code>true</code> if specified path expression is an absolute * path, otherwise <code>false</code>. */ public static boolean isAbsolutePath(String path) { return path != null && (path.startsWith("/") || path.startsWith(INSTANCE_FUNCTION)); } }