org.expasy.jpl.commons.collection.symbol.seq
Class SequenceSymbolCounter<T>

java.lang.Object
  extended by org.expasy.jpl.commons.collection.symbol.seq.SequenceSymbolCounter<T>

public final class SequenceSymbolCounter<T>
extends Object

This object calculates the number of symbols in SymbolSequence[s].

Version:
1.0
Author:
nikitin

Method Summary
 List<Integer> getIndices(Set<Symbol<T>> symbols)
           
 List<Integer> getIndices(Symbol<T> symbol)
          Return the list of indices of specified symbol
 int getSymbolNumber()
           
 int getSymbolNumber(Set<Symbol<T>> symbols)
           
 int getSymbolNumber(Symbol<T> symbol)
          Return the number of occurrences for the specified symbol.
 Set<Symbol<T>> getSymbols()
           
 boolean hasSymbol(Symbol<T> symbol)
           
static
<T> SequenceSymbolCounter<T>
newInstance()
           
 void process(List<SymbolSequence<T>> sequences)
          Compute all the occurrences of symbol for a list of symbol sequences
 void process(SymbolSequence<T>... sequences)
           
 void process(SymbolSequence<T> sequence)
          Compute all the occurrences of a sequence of symbols.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

newInstance

public static <T> SequenceSymbolCounter<T> newInstance()

process

public void process(SymbolSequence<T> sequence)
Compute all the occurrences of a sequence of symbols.


process

public void process(List<SymbolSequence<T>> sequences)
Compute all the occurrences of symbol for a list of symbol sequences


process

public void process(SymbolSequence<T>... sequences)

getIndices

public final List<Integer> getIndices(Symbol<T> symbol)
Return the list of indices of specified symbol

Parameters:
symbol - the symbol to look for positions on.
Returns:
a list of indices for aaByte.

getIndices

public final List<Integer> getIndices(Set<Symbol<T>> symbols)

getSymbolNumber

public int getSymbolNumber()

getSymbolNumber

public final int getSymbolNumber(Set<Symbol<T>> symbols)

getSymbolNumber

public final int getSymbolNumber(Symbol<T> symbol)
Return the number of occurrences for the specified symbol.

Parameters:
symbol - the symbol to look for occurrences on.
Returns:
a number of occurrence for the given symbol.

getSymbols

public Set<Symbol<T>> getSymbols()

hasSymbol

public final boolean hasSymbol(Symbol<T> symbol)

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2012 Swiss Institute of Bioinformatics. All rights reserved.