org.sonar.duplications.detector.suffixtree
Class AbstractText

java.lang.Object
  extended by org.sonar.duplications.detector.suffixtree.AbstractText
All Implemented Interfaces:
Text
Direct Known Subclasses:
TextSet

public abstract class AbstractText
extends Object
implements Text


Field Summary
protected  List<Object> symbols
           
 
Constructor Summary
AbstractText(int size)
           
AbstractText(List<Object> symbols)
           
 
Method Summary
 int length()
           
 List<Object> sequence(int fromIndex, int toIndex)
           
 Object symbolAt(int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

symbols

protected final List<Object> symbols
Constructor Detail

AbstractText

public AbstractText(int size)

AbstractText

public AbstractText(List<Object> symbols)
Method Detail

length

public int length()
Specified by:
length in interface Text
Returns:
length of the sequence of symbols represented by this object

symbolAt

public Object symbolAt(int index)
Specified by:
symbolAt in interface Text
Returns:
symbol at the specified index

sequence

public List<Object> sequence(int fromIndex,
                             int toIndex)
Specified by:
sequence in interface Text


Copyright © 2009-2012 SonarSource. All Rights Reserved.