T
- the type of an executable for which this limit is defined.public class Limit<T>
extends java.lang.Object
LimitsManager
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
isDefault |
private java.lang.String |
preset |
private int |
seqLength |
private int |
seqNumber |
Modifier | Constructor and Description |
---|---|
private |
Limit() |
|
Limit(int seqNumber,
int seqLength,
java.lang.String preset)
Instantiate the limit
|
|
Limit(int seqNumber,
int seqLength,
java.lang.String preset,
boolean isDefault) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getAvgSeqLength() |
static int |
getAvgSequenceLength(java.util.List<FastaSequence> data)
Calculates an average sequence length of the dataset
|
java.lang.String |
getPreset() |
int |
getSeqNumber() |
int |
hashCode() |
boolean |
isDefault() |
boolean |
isExceeded(java.util.List<FastaSequence> data)
Checks if the number of sequences or their average length in the dataset
exceeds this limit.
|
(package private) long |
numberOfLetters() |
java.lang.String |
toString() |
(package private) void |
validate() |
private java.lang.String preset
private int seqNumber
private int seqLength
boolean isDefault
private Limit()
public Limit(int seqNumber, int seqLength, java.lang.String preset)
seqNumber
- the maximum number of sequences allowed for calculation.
RequiredseqLength
- the average length of the sequence, optionalpreset
- the name of preset if any, optionaljava.lang.IllegalArgumentException
- if the seqNumber is not supplied or the seqLength is negativepublic Limit(int seqNumber, int seqLength, java.lang.String preset, boolean isDefault)
public java.lang.String getPreset()
public int getAvgSeqLength()
public int getSeqNumber()
public boolean isDefault()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
long numberOfLetters()
public boolean isExceeded(java.util.List<FastaSequence> data)
data
- the dataset to measurepublic static int getAvgSequenceLength(java.util.List<FastaSequence> data)
data
- void validate()