Class DuplicateInfo.Fragment

  • Enclosing class:
    DuplicateInfo

    public static class DuplicateInfo.Fragment
    extends java.lang.Object
    Duplicating code fragment. Encapsulates a particular piece of code in some file.
    • Constructor Detail

      • Fragment

        public Fragment​(int hash,
                        @NotNull
                        java.lang.String file,
                        int startLine,
                        @NotNull
                        DuplicateInfo.FragmentOffset offset)
        Constructor for duplicate fragment
        Parameters:
        hash - fragment hash
        file - file path
        startLine - start line of the fragment (positive number > 0)
        offset - fragment offset information
    • Method Detail

      • getHash

        public int getHash()
      • getFile

        @NotNull
        public java.lang.String getFile()
      • getStartLine

        public int getStartLine()
      • getOffsetInfo

        @NotNull
        public java.lang.String getOffsetInfo()
        Returns serialized offset information
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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