org.sonar.duplications.index
Class MemoryCloneIndex

java.lang.Object
  extended by org.sonar.duplications.index.MemoryCloneIndex
All Implemented Interfaces:
CloneIndex

public class MemoryCloneIndex
extends Object
implements CloneIndex


Constructor Summary
MemoryCloneIndex()
           
 
Method Summary
 boolean containsResourceId(String resourceId)
           
 Collection<String> getAllUniqueResourceId()
           
 Collection<Block> getByResourceId(String fileName)
          Performs search of blocks for specified resource.
 Collection<Block> getBySequenceHash(ByteArray sequenceHash)
          Performs search of blocks for specified hash value.
 void insert(Block tuple)
          Adds specified block into index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryCloneIndex

public MemoryCloneIndex()
Method Detail

getAllUniqueResourceId

public Collection<String> getAllUniqueResourceId()

containsResourceId

public boolean containsResourceId(String resourceId)

getByResourceId

public Collection<Block> getByResourceId(String fileName)
Description copied from interface: CloneIndex
Performs search of blocks for specified resource.

Specified by:
getByResourceId in interface CloneIndex
Returns:
collection of blocks from index for specified resource and empty collection if nothing found

getBySequenceHash

public Collection<Block> getBySequenceHash(ByteArray sequenceHash)
Description copied from interface: CloneIndex
Performs search of blocks for specified hash value.

Specified by:
getBySequenceHash in interface CloneIndex
Returns:
collection of blocks from index with specified hash and empty collection if nothing found

insert

public void insert(Block tuple)
Description copied from interface: CloneIndex
Adds specified block into index.

Specified by:
insert in interface CloneIndex


Copyright © 2009-2011 SonarSource. All Rights Reserved.