org.sonar.duplications.index
Class CloneGroup

java.lang.Object
  extended by org.sonar.duplications.index.CloneGroup

public class CloneGroup
extends Object

Groups a set of related CloneParts.


Nested Class Summary
static class CloneGroup.Builder
           
 
Method Summary
static CloneGroup.Builder builder()
           
 boolean equals(Object object)
          Two groups are equal, if they have same length, same origins and contain same parts in same order.
 List<ClonePart> getCloneParts()
           
 int getCloneUnitLength()
           
 int getLengthInUnits()
          Length of duplication measured in original units, e.g.
 ClonePart getOriginPart()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

builder

public static CloneGroup.Builder builder()
Since:
2.14

getOriginPart

public ClonePart getOriginPart()

getLengthInUnits

@Beta
public int getLengthInUnits()
Length of duplication measured in original units, e.g. for token-based detection - in tokens.

Since:
2.14

getCloneUnitLength

public int getCloneUnitLength()
Returns:
clone length in Blocks

getCloneParts

public List<ClonePart> getCloneParts()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object object)
Two groups are equal, if they have same length, same origins and contain same parts in same order.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009-2012 SonarSource. All Rights Reserved.