<!--NewPage-->\r
<HTML>\r
<HEAD>\r
-<!-- Generated by javadoc (build 1.6.0_14) on Wed Feb 17 16:46:50 GMT 2010 -->\r
+<!-- Generated by javadoc (build 1.6.0_24) on Wed Dec 07 12:30:41 GMT 2011 -->\r
<TITLE>\r
Limit\r
</TITLE>\r
\r
-<META NAME="date" CONTENT="2010-02-17">\r
+<META NAME="date" CONTENT="2011-12-07">\r
\r
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">\r
\r
<BR>\r
Class Limit<T></H2>\r
<PRE>\r
-java.lang.Object\r
+<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>\r
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>compbio.metadata.Limit<T></B>\r
</PRE>\r
<DL>\r
<DT><DT><B>Type Parameters:</B><DD><CODE>T</CODE> - the type of an executable for which this limit is defined.</DL>\r
<HR>\r
<DL>\r
-<DT><PRE>public class <B>Limit<T></B><DT>extends java.lang.Object</DL>\r
+<DT><PRE>public class <B>Limit<T></B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>\r
</PRE>\r
\r
<P>\r
A value object containing a maximum number of sequences and a maximum average
- sequence length for a preset.\r
+ sequence length for a preset. Also contains static method for determining the
+ number of sequence and their average length in the List<FastaSequence>\r
<P>\r
\r
<P>\r
<DL>\r
+<DT><B>Version:</B></DT>\r
+ <DD>1.0 January 2010</DD>\r
<DT><B>Author:</B></DT>\r
- <DD>pvtroshin
-
- Date January 2010</DD>\r
+ <DD>pvtroshin</DD>\r
<DT><B>See Also:</B><DD><A HREF="../../compbio/metadata/LimitsManager.html" title="class in compbio.metadata"><CODE>LimitsManager</CODE></A></DL>\r
<HR>\r
\r
<TR BGCOLOR="white" CLASS="TableRowColor">\r
<TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#Limit(int, int, java.lang.String)">Limit</A></B>(int seqNumber,\r
int seqLength,\r
- java.lang.String preset)</CODE>\r
+ <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> preset)</CODE>\r
\r
<BR>\r
- </TD>\r
+ Instantiate the limit</TD>\r
</TR>\r
<TR BGCOLOR="white" CLASS="TableRowColor">\r
<TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#Limit(int, int, java.lang.String, boolean)">Limit</A></B>(int seqNumber,\r
int seqLength,\r
- java.lang.String preset,\r
+ <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> preset,\r
boolean isDefault)</CODE>\r
\r
<BR>\r
<TR BGCOLOR="white" CLASS="TableRowColor">\r
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
<CODE> boolean</CODE></FONT></TD>\r
-<TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object obj)</CODE>\r
+<TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> obj)</CODE>\r
\r
<BR>\r
</TD>\r
<TR BGCOLOR="white" CLASS="TableRowColor">\r
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
<CODE>static int</CODE></FONT></TD>\r
-<TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#getAvgSequenceLength(java.util.List)">getAvgSequenceLength</A></B>(java.util.List<<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</CODE>\r
+<TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#getAvgSequenceLength(java.util.List)">getAvgSequenceLength</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</CODE>\r
\r
<BR>\r
Calculates an average sequence length of the dataset</TD>\r
</TR>\r
<TR BGCOLOR="white" CLASS="TableRowColor">\r
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
-<CODE> java.lang.String</CODE></FONT></TD>\r
+<CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>\r
<TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#getPreset()">getPreset</A></B>()</CODE>\r
\r
<BR>\r
<TR BGCOLOR="white" CLASS="TableRowColor">\r
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
<CODE> boolean</CODE></FONT></TD>\r
-<TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#isExceeded(java.util.List)">isExceeded</A></B>(java.util.List<<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</CODE>\r
+<TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#isExceeded(java.util.List)">isExceeded</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</CODE>\r
\r
<BR>\r
Checks if the number of sequences or their average length in the dataset
- exceeds limits the values defined by this Limit</TD>\r
+ exceeds this limit.</TD>\r
</TR>\r
<TR BGCOLOR="white" CLASS="TableRowColor">\r
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">\r
-<CODE> java.lang.String</CODE></FONT></TD>\r
+<CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>\r
<TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#toString()">toString</A></B>()</CODE>\r
\r
<BR>\r
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>\r
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">\r
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">\r
-<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>\r
+<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>\r
</TR>\r
<TR BGCOLOR="white" CLASS="TableRowColor">\r
-<TD><CODE>getClass, notify, notifyAll, wait, wait, wait</CODE></TD>\r
+<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>\r
</TR>\r
</TABLE>\r
\r
<PRE>\r
public <B>Limit</B>(int seqNumber,\r
int seqLength,\r
- java.lang.String preset)</PRE>\r
+ <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> preset)</PRE>\r
+<DL>\r
+<DD>Instantiate the limit\r
+<P>\r
<DL>\r
+<DT><B>Parameters:</B><DD><CODE>seqNumber</CODE> - the maximum number of sequences allowed for calculation.
+ Required<DD><CODE>seqLength</CODE> - the average length of the sequence, optional<DD><CODE>preset</CODE> - the name of preset if any, optional\r
+<DT><B>Throws:</B>\r
+<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the seqNumber is not supplied or the seqLength is negative</DL>\r
</DL>\r
<HR>\r
\r
<PRE>\r
public <B>Limit</B>(int seqNumber,\r
int seqLength,\r
- java.lang.String preset,\r
+ <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> preset,\r
boolean isDefault)</PRE>\r
<DL>\r
</DL>\r
<A NAME="getPreset()"><!-- --></A><H3>\r
getPreset</H3>\r
<PRE>\r
-public java.lang.String <B>getPreset</B>()</PRE>\r
+public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getPreset</B>()</PRE>\r
<DL>\r
<DD><DL>\r
</DL>\r
public int <B>getAvgSeqLength</B>()</PRE>\r
<DL>\r
<DD><DL>\r
-</DL>\r
+\r
+<DT><B>Returns:</B><DD>the allowed average sequence length</DL>\r
</DD>\r
</DL>\r
<HR>\r
public int <B>getSeqNumber</B>()</PRE>\r
<DL>\r
<DD><DL>\r
-</DL>\r
+\r
+<DT><B>Returns:</B><DD>the maximum number of sequences allowed</DL>\r
</DD>\r
</DL>\r
<HR>\r
public boolean <B>isDefault</B>()</PRE>\r
<DL>\r
<DD><DL>\r
-</DL>\r
+\r
+<DT><B>Returns:</B><DD>true is this is a default limit to be used, false otherwise</DL>\r
</DD>\r
</DL>\r
<HR>\r
public int <B>hashCode</B>()</PRE>\r
<DL>\r
<DD><DL>\r
-<DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL>\r
+<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>\r
</DD>\r
<DD><DL>\r
</DL>\r
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>\r
equals</H3>\r
<PRE>\r
-public boolean <B>equals</B>(java.lang.Object obj)</PRE>\r
+public boolean <B>equals</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> obj)</PRE>\r
<DL>\r
<DD><DL>\r
-<DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL>\r
+<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>\r
</DD>\r
<DD><DL>\r
</DL>\r
<A NAME="toString()"><!-- --></A><H3>\r
toString</H3>\r
<PRE>\r
-public java.lang.String <B>toString</B>()</PRE>\r
+public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE>\r
<DL>\r
<DD><DL>\r
-<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>\r
+<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>\r
</DD>\r
<DD><DL>\r
</DL>\r
<A NAME="isExceeded(java.util.List)"><!-- --></A><H3>\r
isExceeded</H3>\r
<PRE>\r
-public boolean <B>isExceeded</B>(java.util.List<<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</PRE>\r
+public boolean <B>isExceeded</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</PRE>\r
<DL>\r
<DD>Checks if the number of sequences or their average length in the dataset
- exceeds limits the values defined by this Limit\r
+ exceeds this limit.\r
<P>\r
<DD><DL>\r
-<DT><B>Parameters:</B><DD><CODE>data</CODE> - \r
+<DT><B>Parameters:</B><DD><CODE>data</CODE> - the dataset to measure\r
<DT><B>Returns:</B><DD>true if a limit is exceeded (what is the dataset is larger then
- the limit), false otherwise.</DL>\r
+ the limit), false otherwise. First check the number of sequences
+ in the dataset and if it exceeds the limit return true
+ irrespective of the average length. If the number of sequences in
+ the dataset is less than the limit and average length is defined,
+ then check whether the total number of letters (number of
+ sequence multiplied by the average sequence length) is greater
+ then the total number of letters in the dataset. Returns true if
+ the total number of letters in the dataset is greater than the
+ limit, false otherwise.</DL>\r
</DD>\r
</DL>\r
<HR>\r
<A NAME="getAvgSequenceLength(java.util.List)"><!-- --></A><H3>\r
getAvgSequenceLength</H3>\r
<PRE>\r
-public static int <B>getAvgSequenceLength</B>(java.util.List<<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</PRE>\r
+public static int <B>getAvgSequenceLength</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</PRE>\r
<DL>\r
<DD>Calculates an average sequence length of the dataset\r
<P>\r