Class UniqueSymlink

java.lang.Object
com._1c.g5.v8.dt.compare.model.UniqueSymlink

public class UniqueSymlink extends Object
Represents unique symlink. Consists of a usual symbolic link and of an index that supposed to be unique for objects with the same symlinks.
  • Constructor Details

    • UniqueSymlink

      public UniqueSymlink(String symlink)
      Creates unique symlink instance with default index. Use it only if the string symbolic link is unique itself.
      Parameters:
      symlink - the symbolic link, cannot be null
    • UniqueSymlink

      public UniqueSymlink(String symlink, int index)
      Creates unique symlink instance.
      Parameters:
      symlink - the symbolic link, cannot be null
      index - the index
  • Method Details

    • fromString

      public static UniqueSymlink fromString(String input)
      Creates unique symlink instance from the specified string constructed earlier by toString() method.
      Parameters:
      input - the input string value, cannot be null or empty
      Returns:
      the UniqueSymlink instance, never null
      Throws:
      IllegalArgumentException - if the input does not match the unique symbolic link
    • toString

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

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getSymlink

      public String getSymlink()
      Gets symbolic link.
      Returns:
      the symbolic link, never null
    • getIndex

      public int getIndex()
      Gets index.
      Returns:
      the index