Class SBPath

java.lang.Object
com.io7m.sunburst.model.SBPath
All Implemented Interfaces:
Comparable<SBPath>, Iterable<String>

public final class SBPath extends Object implements Iterable<String>, Comparable<SBPath>
A normalized path within a package.
  • Method Details

    • root

      public static SBPath root()
      Returns:
      The root path
    • parse

      public static SBPath parse(String path)
      Parse a string as a path.
      Parameters:
      path - The path
      Returns:
      A parsed path
    • equals

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

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

      public SBPath plus(String file)
      Add an element to a path.
      Parameters:
      file - The element to add to the current path
      Returns:
      The path
    • toString

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

      public Iterator<String> iterator()
      Specified by:
      iterator in interface Iterable<String>
    • elements

      public List<String> elements()
      Returns:
      The path elements
    • compareTo

      public int compareTo(SBPath other)
      Specified by:
      compareTo in interface Comparable<SBPath>