📄 tools.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_13) on Mon Jul 14 01:36:50 CEST 2008 --><TITLE>Tools (RapidMiner Class Documentation)</TITLE><META NAME="keywords" CONTENT="com.rapidminer.tools.Tools class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="Tools (RapidMiner Class Documentation)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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="class-use/Tools.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../com/rapidminer/tools/StringProperties.html" title="class in com.rapidminer.tools"><B>PREV CLASS</B></A> <A HREF="../../../com/rapidminer/tools/Tupel.html" title="class in com.rapidminer.tools"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/rapidminer/tools/Tools.html" target="_top"><B>FRAMES</B></A> <A HREF="Tools.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">com.rapidminer.tools</FONT><BR>Class Tools</H2><PRE>java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.rapidminer.tools.Tools</B></PRE><HR><DL><DT><PRE>public class <B>Tools</B><DT>extends java.lang.Object</DL></PRE><P>Tools for RapidMiner.<P><P><DL><DT><B>Version:</B></DT> <DD>$Id: Tools.java,v 1.25 2008/05/25 12:08:44 ingomierswa Exp $</DD><DT><B>Author:</B></DT> <DD>Simon Fischer, Ingo Mierswa</DD></DL><HR><P><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#FALSE_STRINGS">FALSE_STRINGS</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#RESOURCE_PREFIX">RESOURCE_PREFIX</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#TRUE_STRINGS">TRUE_STRINGS</A></B></CODE><BR> </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#Tools()">Tools</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#addResourceSource(com.rapidminer.tools.ResourceSource)">addResourceSource</A></B>(<A HREF="../../../com/rapidminer/tools/ResourceSource.html" title="class in com.rapidminer.tools">ResourceSource</A> source)</CODE><BR> Adds a new resource source.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#booleanValue(java.lang.String, boolean)">booleanValue</A></B>(java.lang.String string, boolean deflt)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.Class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#classForName(java.lang.String)">classForName</A></B>(java.lang.String className)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#classNameWOPackage(java.lang.Class)">classNameWOPackage</A></B>(java.lang.Class c)</CODE><BR> Returns the class name of the given class without the package information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#copy(java.io.File, java.io.File)">copy</A></B>(java.io.File srcPath, java.io.File dstPath)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#delete(java.io.File)">delete</A></B>(java.io.File file)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#escapeXML(java.lang.String)">escapeXML</A></B>(java.lang.String string)</CODE><BR> Replaces angle brackets by html entities.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#findImplementationsInJar(java.lang.ClassLoader, java.util.jar.JarFile, java.lang.Class, java.util.List)">findImplementationsInJar</A></B>(java.lang.ClassLoader loader, java.util.jar.JarFile jar, java.lang.Class<?> superClass, java.util.List<java.lang.String> implementations)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#findImplementationsInJar(java.util.jar.JarFile, java.lang.Class, java.util.List)">findImplementationsInJar</A></B>(java.util.jar.JarFile jar, java.lang.Class superClass, java.util.List<java.lang.String> implementations)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.io.File</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#findSourceFile(java.lang.StackTraceElement)">findSourceFile</A></B>(java.lang.StackTraceElement e)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#formatDate(java.util.Date)">formatDate</A></B>(java.util.Date date)</CODE><BR> Format date as a short time string.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#formatDateTime(java.util.Date)">formatDateTime</A></B>(java.util.Date date)</CODE><BR> Format date as a short time string.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#formatIntegerIfPossible(double)">formatIntegerIfPossible</A></B>(double value)</CODE><BR> Returns a number string with no fraction digits if possible.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#formatIntegerIfPossible(double, int)">formatIntegerIfPossible</A></B>(double value, int numberOfDigits)</CODE><BR> Returns a number string with no fraction digits if possible.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#formatNumber(double)">formatNumber</A></B>(double value)</CODE><BR> Returns a formatted string of the given number (number format with usually three fraction digits).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#formatNumber(double, int)">formatNumber</A></B>(double value, int numberOfDigits)</CODE><BR> Returns a formatted string of the given number (uses the property rapidminer.gui.fractiondigits.numbers if the given number of digits is smaller than 0 (usually 3)).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#formatPercent(double)">formatPercent</A></B>(double value)</CODE><BR> Returns a formatted string of the given number (percent format with two fraction digits).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#formatTime(java.util.Date)">formatTime</A></B>(java.util.Date date)</CODE><BR> Format date as a short time string.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.nio.charset.Charset</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#getDefaultEncoding()">getDefaultEncoding</A></B>()</CODE><BR> This method tries to identify the encoding if a GUI is running and a process is defined.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.io.File</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#getFile(java.io.File, java.lang.String)">getFile</A></B>(java.io.File parent, java.lang.String name)</CODE><BR> Creates a file relative to the given parent if name is not an absolute file name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#getFirstToken(java.io.StreamTokenizer)">getFirstToken</A></B>(java.io.StreamTokenizer tokenizer)</CODE><BR> Delivers the next token and skip empty lines.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#getLastToken(java.io.StreamTokenizer, boolean)">getLastToken</A></B>(java.io.StreamTokenizer tokenizer, boolean endOfFileOk)</CODE><BR> Delivers the next token and checks if its the end of line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/tools/Tools.html#getLineSeparator()">getLineSeparator</A></B>()</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -