Example usage for org.apache.commons.csv CSVFormat getDelimiter

List of usage examples for org.apache.commons.csv CSVFormat getDelimiter

Introduction

In this page you can find the example usage for org.apache.commons.csv CSVFormat getDelimiter.

Prototype

public char getDelimiter() 

Source Link

Document

Returns the character delimiting the values (typically ';', ',' or '\t').

Usage

From source file:org.wso2.carbon.notebook.core.util.MLUtils.java

/**
 * Get the number of features in the lines
 *
 * @param line   Lines of the table//ww  w . j ava 2  s  .c o m
 * @param format Data format of the lines
 * @return Number of features
 */
public static int getFeatureSize(String line, CSVFormat format) {
    String[] values = line.split("" + format.getDelimiter());
    return values.length;
}