当前位置: 首页>>代码示例>>Java>>正文


Java CommentMatcher类代码示例

本文整理汇总了Java中org.supercsv.comment.CommentMatcher的典型用法代码示例。如果您正苦于以下问题:Java CommentMatcher类的具体用法?Java CommentMatcher怎么用?Java CommentMatcher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CommentMatcher类属于org.supercsv.comment包,在下文中一共展示了CommentMatcher类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parse

import org.supercsv.comment.CommentMatcher; //导入依赖的package包/类
@Override
public SuperCsvParser parse (InputStream input) throws DatasetBuilderException {
  return new SuperCsvParser (new CsvListReader (new InputStreamReader (input),
                                                new Builder (quoteChar,
                                                             separatorChar,
                                                             endOfLineSymbols).skipComments (new CommentMatcher () {

                                                  @Override
                                                  public boolean isComment (String line) {
                                                    for (Pattern pattern : commentRegExpressions)
                                                      if (pattern.matcher (line).matches ())
                                                        return true;
                                                    return false;
                                                  }
                                                }).build ()), rowIdParser);
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:17,代码来源:SuperCsvParserFactory.java

示例2: skipComments

import org.supercsv.comment.CommentMatcher; //导入依赖的package包/类
/**
 * Enables the skipping of comments. You can supply your own comment matcher or use one of the predefined ones:
 * {@link org.supercsv.comment.CommentStartsWith CommentStartsWith} or
 * {@link org.supercsv.comment.CommentMatches CommentMatches}
 * 
 * @since 2.1.0
 * @param commentMatcher
 *            the comment matcher to use
 * @return the updated Builder
 * @throws NullPointerException
 *             if commentMatcher is null
 */
public Builder skipComments(final CommentMatcher commentMatcher) {
	if( commentMatcher == null ) {
		throw new NullPointerException("commentMatcher should not be null");
	}
	this.commentMatcher = commentMatcher;
	return this;
}
 
开发者ID:super-csv,项目名称:super-csv,代码行数:20,代码来源:CsvPreference.java

示例3: skipComments

import org.supercsv.comment.CommentMatcher; //导入依赖的package包/类
/**
 * Sets the comment matcher.
 *
 * @param commentMatcher comment matcher
 */
public void skipComments(CommentMatcher commentMatcher) {
    this.commentMatcher = commentMatcher;
}
 
开发者ID:seedstack,项目名称:io-addon,代码行数:9,代码来源:SuperCsvTemplate.java

示例4: getCommentMatcher

import org.supercsv.comment.CommentMatcher; //导入依赖的package包/类
/**
 * Returns the comment matcher.
 * 
 * @return the comment matcher
 */
public CommentMatcher getCommentMatcher() {
	return commentMatcher;
}
 
开发者ID:super-csv,项目名称:super-csv,代码行数:9,代码来源:CsvPreference.java


注:本文中的org.supercsv.comment.CommentMatcher类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。