當前位置: 首頁>>代碼示例>>Java>>正文


Java StrictDecimalFormat類代碼示例

本文整理匯總了Java中com.rapidminer.tools.StrictDecimalFormat的典型用法代碼示例。如果您正苦於以下問題:Java StrictDecimalFormat類的具體用法?Java StrictDecimalFormat怎麽用?Java StrictDecimalFormat使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


StrictDecimalFormat類屬於com.rapidminer.tools包,在下文中一共展示了StrictDecimalFormat類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createReader

import com.rapidminer.tools.StrictDecimalFormat; //導入依賴的package包/類
public CSVFileReader createReader(File file) throws UndefinedParameterError {
	final LineParser parser = new LineParser();
	parser.setTrimLine(getParameterAsBoolean(PARAMETER_TRIM_LINES));
	parser.setSkipComments(getParameterAsBoolean(PARAMETER_SKIP_COMMENTS));
	try {
		parser.setSplitExpression(getParameterAsString(PARAMETER_COLUMN_SEPARATORS));
	} catch (OperatorException e) {
		throw new UndefinedParameterError(e.getMessage());
	}
	parser.setUseQuotes(getParameterAsBoolean(PARAMETER_USE_QUOTES));
	parser.setQuoteCharacter(getParameterAsChar(PARAMETER_QUOTES_CHARACTER));
	parser.setCommentCharacters(getParameterAsString(PARAMETER_COMMENT_CHARS));
	final NumberFormat numberFormat = StrictDecimalFormat.getInstance(this);
	final CSVFileReader reader = new CSVFileReader(file,
			getParameterAsBoolean(PARAMETER_USE_FIRST_ROW_AS_ATTRIBUTE_NAMES), parser, numberFormat);
	return reader;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:18,代碼來源:SimpleExampleSource.java

示例2: createReader

import com.rapidminer.tools.StrictDecimalFormat; //導入依賴的package包/類
public CSVFileReader createReader(File file) throws UndefinedParameterError {
	final LineParser parser = new LineParser();
	parser.setTrimLine(getParameterAsBoolean(PARAMETER_TRIM_LINES));
	parser.setSkipComments(getParameterAsBoolean(PARAMETER_SKIP_COMMENTS));
	try {
		parser.setSplitExpression(getParameterAsString(PARAMETER_COLUMN_SEPARATORS));
	} catch (OperatorException e) {
		throw new UndefinedParameterError(e.getMessage());
	}
	parser.setUseQuotes(getParameterAsBoolean(PARAMETER_USE_QUOTES));
	parser.setQuoteCharacter(getParameterAsChar(PARAMETER_QUOTES_CHARACTER));
	parser.setCommentCharacters(getParameterAsString(PARAMETER_COMMENT_CHARS));
	final NumberFormat numberFormat = StrictDecimalFormat.getInstance(this); 
	final CSVFileReader reader = new CSVFileReader(file, getParameterAsBoolean(PARAMETER_USE_FIRST_ROW_AS_ATTRIBUTE_NAMES), parser, numberFormat);
	return reader;
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:17,代碼來源:SimpleExampleSource.java

示例3: getParameterTypes

import com.rapidminer.tools.StrictDecimalFormat; //導入依賴的package包/類
@Override
	public List<ParameterType> getParameterTypes() {
		List<ParameterType> types = super.getParameterTypes();
		types.addAll(StrictDecimalFormat.getParameterTypes(this));
		// TODO: Replace old parameters by new ones
//		types.add(new ParameterTypeChar(PARAMETER_DECIMAL_POINT_CHARACTER, "Character that is used as decimal point.", '.', false));
//		types.add(new ParameterTypeChar(PARAMETER_GROUP_SEPARATOR, "Character that is used to separate groups (e.g. in 1.000.000 or 1,000,000).", false));
		return types;
	}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:10,代碼來源:NominalNumbers2Numerical.java

示例4: getParameterTypes

import com.rapidminer.tools.StrictDecimalFormat; //導入依賴的package包/類
@Override
public List<ParameterType> getParameterTypes() {
	List<ParameterType> types = new LinkedList<ParameterType>();
	types.add(FileInputPortHandler.makeFileParameterType(this, PARAMETER_DATA_FILE, "Name of the Arff file to read the data from.", "arff", new PortProvider() {
		@Override
		public Port getPort() {			
			return fileInputPort;
		}
	}));
	types.addAll(super.getParameterTypes());
	types.addAll(StrictDecimalFormat.getParameterTypes(this));
	return types;
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:14,代碼來源:ArffExampleSource.java

示例5: getNumberFormat

import com.rapidminer.tools.StrictDecimalFormat; //導入依賴的package包/類
/**
 * @return the number format associated to the configuration
 */
NumberFormat getNumberFormat() {
	return new StrictDecimalFormat(getResultSetConfiguration().getDecimalCharacter());
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:7,代碼來源:CSVDataSource.java

示例6: makeFormat

import com.rapidminer.tools.StrictDecimalFormat; //導入依賴的package包/類
private NumberFormat makeFormat() throws UndefinedParameterError {
	StrictDecimalFormat format = StrictDecimalFormat.getInstance(this);
	return format;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:5,代碼來源:NominalNumbers2Numerical.java

示例7: getNumberFormat

import com.rapidminer.tools.StrictDecimalFormat; //導入依賴的package包/類
@Override
protected NumberFormat getNumberFormat() throws OperatorException {
	return StrictDecimalFormat.getInstance(this, true);
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:5,代碼來源:CSVExampleSource.java

示例8: getNumberFormat

import com.rapidminer.tools.StrictDecimalFormat; //導入依賴的package包/類
@Override
protected NumberFormat getNumberFormat() throws OperatorException {
    return StrictDecimalFormat.getInstance(this, true);
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:5,代碼來源:XMLExampleSource.java

示例9: settingsChanged

import com.rapidminer.tools.StrictDecimalFormat; //導入依賴的package包/類
protected void settingsChanged() {
	reader.setParameter(DateParser.PARAMETER_DATE_FORMAT, getDateFormat());
	reader.setParameter(StrictDecimalFormat.PARAMETER_DECIMAL_CHARACTER, Character.toString(getDecimalPointCharacter()));
	reader.setParameter(StrictDecimalFormat.PARAMETER_GROUPING_CHARACTER, Character.toString(getGroupingSeparator()));
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:6,代碼來源:ParseValueTypesWizardStep.java


注:本文中的com.rapidminer.tools.StrictDecimalFormat類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。