java.lang.Object
com.atlassian.jira.issue.attachment.Path
All Implemented Interfaces:
Serializable, Comparable<Path>

public class Path extends Object implements Serializable, Comparable<Path>
Copied from FECRU

./java/com/cenqua/fisheye/Path.java r54145

See Also:
  • Constructor Details

    • Path

      public Path()
    • Path

      public Path(CharSequence path)
    • Path

      public Path(CharSequence path, boolean allowSloshes)
    • Path

      public Path(Path path)
    • Path

      public Path(Path aParent, String aPath)
    • Path

      public Path(Path aParent, Path aPath)
    • Path

      public Path(Path aParent, String aPath, boolean allowSloshes)
    • Path

      public Path(String aParent, Path aPath)
  • Method Details

    • getParent

      public Path getParent()
    • getPath

      public String getPath()
      Returns:
      the string representation of the path
    • getComponents

      public String[] getComponents()
    • getName

      public String getName()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • join

      public static String join(String str1, String str2)
      Intelligently Put a "/" between two strings.
    • isRoot

      public boolean isRoot()
    • compareTo

      public int compareTo(Path o)
      Specified by:
      compareTo in interface Comparable<Path>
    • abbreviate

      public Path abbreviate(int maxLength)
      abbreviate a path by removing path components from the middle until the length of the path (as via .getPath()) is not greater then maxLength.

      The first and last path component are always in the returned path.

      If any path components were removed, an ellipsis ("...") will appear in the middle

      The returned path may in some cases still be greater.

    • getPath

      public String getPath(boolean caseSensitive)
    • toLowerCase

      public void toLowerCase()
    • getExtension

      public String getExtension()
      Returns:
      the file extension of the path (with no .), or null if there is no file extension