net.sourceforge.javadpkg.plugin.io.Path Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dpkg-maven-plugin Show documentation
Show all versions of dpkg-maven-plugin Show documentation
The plugin for creating Debian Packages during a Maven build process.
The newest version!
/*
* dpkg - Debian Package library and the Debian Package Maven plugin
* (c) Copyright 2016 Gerrit Hohl
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package net.sourceforge.javadpkg.plugin.io;
/**
*
* A path.
*
*
* @author Gerrit Hohl ([email protected])
* @version 1.0, 10.05.2016 by Gerrit Hohl
*/
public interface Path {
/**
*
* Returns the path of the parent.
*
*
* If this path is /usr/local
this method will return the path
* /usr
.
*
*
* @return The path or null
, if the path doesn't have a parent.
*/
Path getParentPath();
/**
*
* Returns the path of the child.
*
*
* If this path is /usr/local
this method will return the path
* /local.
*
*
* @return The path or null
, if the path doesn't have a child.
*/
Path getChildPath();
/**
*
* Creates the specified child for this path and returns it as a new path.
*
*
* If this path is /usr
and the name of the child is
* local
the returned new path will be /usr/local
.
*
*
* @param name
* The name of the child.
* @return The new path.
* @throws IllegalArgumentException
* If the name is null
.
*/
Path createChild(String name);
/**
*
* Returns the first element of the path.
*
*
* @return The first element or null
, if this path represents
* the root path.
*/
String getFirstElement();
/**
*
* Returns the last element of the path.
*
*
* @return The last element or null
, if this path represents
* the root path.
*/
String getLastElement();
/**
*
* Returns the path as string.
*
*
* @return The path.
*/
String getAbsolutePath();
}