Class AbstractCompoundSet<C extends Compound>
java.lang.Object
org.biojava3.core.sequence.template.AbstractCompoundSet<C>
- Type Parameters:
C
- The compound this set will contain
- All Implemented Interfaces:
CompoundSet<C>
- Direct Known Subclasses:
AbstractNucleotideCompoundSet
public abstract class AbstractCompoundSet<C extends Compound>
extends Object
implements CompoundSet<C>
- Author:
- Andy Yates
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
compoundsEqual
(C compoundOne, C compoundTwo) boolean
compoundsEquivalent
(C compoundOne, C compoundTwo) boolean
getCompoundForString
(String string) Return null if not recognised.getEquivalentCompounds
(C compound) int
Returns the maximum size of a compound String this set holdsgetStringForCompound
(C compound) boolean
hasCompound
(C compound) int
hashCode()
boolean
boolean
Returns true if all String representations of Compounds are of the same length.void
verifySequence
(Sequence<C> sequence)
-
Constructor Details
-
AbstractCompoundSet
public AbstractCompoundSet()
-
-
Method Details
-
getStringForCompound
- Specified by:
getStringForCompound
in interfaceCompoundSet<C extends Compound>
-
getCompoundForString
Description copied from interface:CompoundSet
Return null if not recognised. Throw IllegalArgumentException if string is longer than maximum allowed byCompoundSet.getStringForCompound(Compound)
.- Specified by:
getCompoundForString
in interfaceCompoundSet<C extends Compound>
-
getMaxSingleCompoundStringLength
public int getMaxSingleCompoundStringLength()Description copied from interface:CompoundSet
Returns the maximum size of a compound String this set holds- Specified by:
getMaxSingleCompoundStringLength
in interfaceCompoundSet<C extends Compound>
-
isCompoundStringLengthEqual
public boolean isCompoundStringLengthEqual()Description copied from interface:CompoundSet
Returns true if all String representations of Compounds are of the same length.- Specified by:
isCompoundStringLengthEqual
in interfaceCompoundSet<C extends Compound>
-
hasCompound
- Specified by:
hasCompound
in interfaceCompoundSet<C extends Compound>
-
compoundsEquivalent
- Specified by:
compoundsEquivalent
in interfaceCompoundSet<C extends Compound>
-
getEquivalentCompounds
- Specified by:
getEquivalentCompounds
in interfaceCompoundSet<C extends Compound>
-
compoundsEqual
-
verifySequence
- Specified by:
verifySequence
in interfaceCompoundSet<C extends Compound>
- Throws:
CompoundNotFoundError
-
getAllCompounds
- Specified by:
getAllCompounds
in interfaceCompoundSet<C extends Compound>
-
isComplementable
public boolean isComplementable()- Specified by:
isComplementable
in interfaceCompoundSet<C extends Compound>
-
hashCode
public int hashCode() -
equals
-