Class PathEntry

  • All Implemented Interfaces:
    Comparable

    public class PathEntry
    extends java.lang.Object
    implements Comparable
    This is a class that defines a path and also if its a directory or a file.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DIR
      Defines that this PathEntry is a directory.
      static int FILE
      Defines that this PathEntry is a file.
      int type
      The type of this PathEntry
      java.lang.String value
      The path of this PathEntry
    • Constructor Summary

      Constructors 
      Constructor Description
      PathEntry​(java.lang.String value, boolean isDir)
      Constructs a new PathEntry based on the given parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(java.lang.Object arg0)
      Must return > 0 if this object is greater than the other one, < 0 if its smaller, and 0 if they are equal.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DIR

        public static final int DIR
        Defines that this PathEntry is a directory.
        See Also:
        Constant Field Values
      • FILE

        public static final int FILE
        Defines that this PathEntry is a file.
        See Also:
        Constant Field Values
      • value

        public java.lang.String value
        The path of this PathEntry
      • type

        public int type
        The type of this PathEntry
    • Constructor Detail

      • PathEntry

        public PathEntry​(java.lang.String value,
                         boolean isDir)
        Constructs a new PathEntry based on the given parameters.
        Parameters:
        value - the path value
        isDir - true if the path is a directory
    • Method Detail

      • compareTo

        public int compareTo​(java.lang.Object arg0)
        Description copied from interface: Comparable
        Must return > 0 if this object is greater than the other one, < 0 if its smaller, and 0 if they are equal.
        Specified by:
        compareTo in interface Comparable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object