📄 range.html
字号:
<PRE>public <B>Range</B>(java.lang.String rangeList)</PRE><DL><DD>Constructor to set initial range.<DD><DL><DT><B>Parameters:</B><DD><CODE>rangeList</CODE> - the initial range<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the range list is invalid</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setUpper(int)"><!-- --></A><H3>setUpper</H3><PRE>public void <B>setUpper</B>(int newUpper)</PRE><DL><DD>Sets the value of "last".<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newUpper</CODE> - the value of "last"</DL></DD></DL><HR><A NAME="getInvert()"><!-- --></A><H3>getInvert</H3><PRE>public boolean <B>getInvert</B>()</PRE><DL><DD>Gets whether the range sense is inverted, i.e. all <i>except</i> the values included by the range string are selected.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>whether the matching sense is inverted</DL></DD></DL><HR><A NAME="setInvert(boolean)"><!-- --></A><H3>setInvert</H3><PRE>public void <B>setInvert</B>(boolean newSetting)</PRE><DL><DD>Sets whether the range sense is inverted, i.e. all <i>except</i> the values included by the range string are selected.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newSetting</CODE> - true if the matching sense is inverted</DL></DD></DL><HR><A NAME="getRanges()"><!-- --></A><H3>getRanges</H3><PRE>public java.lang.String <B>getRanges</B>()</PRE><DL><DD>Gets the string representing the selected range of values<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the range selection string</DL></DD></DL><HR><A NAME="setRanges(java.lang.String)"><!-- --></A><H3>setRanges</H3><PRE>public void <B>setRanges</B>(java.lang.String rangeList)</PRE><DL><DD>Sets the ranges from a string representation.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rangeList</CODE> - the comma separated list of ranges. The empty string sets the range to empty.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the rangeList was not well formed</DL></DD></DL><HR><A NAME="isInRange(int)"><!-- --></A><H3>isInRange</H3><PRE>public boolean <B>isInRange</B>(int index)</PRE><DL><DD>Gets whether the supplied cardinal number is included in the current range.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the number of interest<DT><B>Returns:</B><DD>true if index is in the current range<DT><B>Throws:</B><DD><CODE>java.lang.RuntimeException</CODE> - if the upper limit of the range hasn't been defined</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Constructs a representation of the current range. Being a string representation, the numbers are based from 1.<DD><DL><DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the string representation of the current range</DL></DD></DL><HR><A NAME="getSelection()"><!-- --></A><H3>getSelection</H3><PRE>public int[] <B>getSelection</B>()</PRE><DL><DD>Gets an array containing all the selected values, in the order that they were selected (or ascending order if range inversion is on)<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the array of selected values<DT><B>Throws:</B><DD><CODE>java.lang.RuntimeException</CODE> - if the upper limit of the range hasn't been defined</DL></DD></DL><HR><A NAME="indicesToRangeList(int[])"><!-- --></A><H3>indicesToRangeList</H3><PRE>public static java.lang.String <B>indicesToRangeList</B>(int[] indices)</PRE><DL><DD>Creates a string representation of the indices in the supplied array.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>indices</CODE> - an array containing indices to select. Since the array will typically come from a program, indices are assumed from 0, and thus will have 1 added in the String representation.</DL></DD></DL><HR><A NAME="setFlags()"><!-- --></A><H3>setFlags</H3><PRE>protected void <B>setFlags</B>()</PRE><DL><DD>Sets the flags array.<DD><DL></DL></DD></DL><HR><A NAME="rangeSingle(java.lang.String)"><!-- --></A><H3>rangeSingle</H3><PRE>protected int <B>rangeSingle</B>(java.lang.String single)</PRE><DL><DD>Translates a single string selection into it's internal 0-based equivalent<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>single</CODE> - the string representing the selection (eg: 1 first last)<DT><B>Returns:</B><DD>the number corresponding to the selected value</DL></DD></DL><HR><A NAME="rangeLower(java.lang.String)"><!-- --></A><H3>rangeLower</H3><PRE>protected int <B>rangeLower</B>(java.lang.String range)</PRE><DL><DD>Translates a range into it's lower index.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>range</CODE> - the string representation of the range<DT><B>Returns:</B><DD>the lower index of the range</DL></DD></DL><HR><A NAME="rangeUpper(java.lang.String)"><!-- --></A><H3>rangeUpper</H3><PRE>protected int <B>rangeUpper</B>(java.lang.String range)</PRE><DL><DD>Translates a range into it's upper index. Must only be called once setUpper has been called.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>range</CODE> - the string representation of the range<DT><B>Returns:</B><DD>the upper index of the range</DL></DD></DL><HR><A NAME="isValidRange(java.lang.String)"><!-- --></A><H3>isValidRange</H3><PRE>protected boolean <B>isValidRange</B>(java.lang.String range)</PRE><DL><DD>Determines if a string represents a valid index or simple range. Examples: <code>first last 2 first-last first-4 4-last</code> Doesn't check that a < b for a-b<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>range</CODE> - <DT><B>Returns:</B><DD>true if the range is valid</DL></DD></DL><HR><A NAME="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</B>(java.lang.String[] argv)</PRE><DL><DD>Main method for testing this class.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>argv</CODE> - one parameter: a test range specification</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../weka/core/Queue.QueueNode.html"><B>PREV CLASS</B></A> <A HREF="../../weka/core/SelectedTag.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Range.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -