Class 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 Detail

      • 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 Detail

      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode 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