Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.landawn.abacus.DataSet Maven / Gradle / Ivy
/*
* Copyright (c) 2015, Haiyang Li.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.landawn.abacus;
import java.io.File;
import java.io.OutputStream;
import java.io.Writer;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import com.landawn.abacus.util.ImmutableIterator;
import com.landawn.abacus.util.ListMultimap;
import com.landawn.abacus.util.Multimap;
import com.landawn.abacus.util.Optional;
import com.landawn.abacus.util.Properties;
import com.landawn.abacus.util.Sheet;
import com.landawn.abacus.util.Try;
import com.landawn.abacus.util.function.Function;
import com.landawn.abacus.util.function.IntFunction;
import com.landawn.abacus.util.stream.Collector;
import com.landawn.abacus.util.stream.Stream;
/**
*
* @since 0.8
*
* @author Haiyang Li
*
* @see com.landawn.abacus.util.DataSetUtil
* @see com.landawn.abacus.util.JdbcUtil
* @see com.landawn.abacus.util.CSVUtil
* @see com.landawn.abacus.util.function.IntFunction
* @see com.landawn.abacus.util.Fn.Factory
* @see com.landawn.abacus.util.Clazz
*
*/
public interface DataSet {
// /**
// * Returns the entity name associated with the query.
// *
// * @return
// */
// String entityName();
//
// /**
// * Returns the target entity class associated with the query.
// *
// * @return
// */
// Class entityClass();
/**
* Return the column name list in this DataSet.
*/
List columnNameList();
/**
* Return the column name list filtered by specified filter
.
*
* @param filter
*/
List columnNames(Try.Predicate filter) throws E;
/**
* Method getColumnName.
*
* @param columnIndex
* @return
*/
String getColumnName(int columnIndex);
/**
* Method getColumnIndex.
*
* @param columnName
* @return -1 if the specified columnName
is not found
*/
int getColumnIndex(String columnName);
/**
* -1 is set to the element in the returned array if the mapping column name is not included in this DataSet
*
* @param columnNames
* @return
*/
int[] getColumnIndex(Collection columnNames);
/**
*
* @param columnName
* @return
*/
boolean containsColumn(String columnName);
/**
* Check if this DataSet
contains all the specified columns.
*
* @param columnNames
* @return true
if all the specified columns are included in the this DataSet
*/
boolean containsColumnAll(Collection columnNames);
/**
*
* @param columnName
* @param newColumnName
*/
void renameColumn(String columnName, String newColumnName);
/**
*
* @param oldNewNames
*/
void renameColumn(Map oldNewNames);
/**
*
* @param columnName
* @param func
*/
void renameColumn(String columnName, Try.Function func) throws E;
/**
*
* @param columnNames
* @param func
*/
void renameColumn(Collection columnNames, Try.Function func) throws E;
void moveColumn(String columnName, int newPosition);
void moveColumn(Map columnNameNewPositionMap);
/**
* Swap the positions of the two specified columns.
*
* @param columnNameA
* @param columnNameB
*/
void swapColumn(String columnNameA, String columnNameB);
/**
* Move the specified row to the new position.
*
* @param rowIndex
* @param newRowIndex
*/
void moveRow(int rowIndex, int newRowIndex);
/**
* Swap the positions of the two specified rows.
*
* @param columnNameA
* @param columnNameB
*/
void swapRow(int rowIndexA, int rowIndexB);
/**
*
* @param rowIndex
* @param columnIndex
* @return
*/
T get(int rowIndex, int columnIndex);
/**
* @param targetClass
* @param rowIndex
* @param columnIndex
* @return
*/
T get(Class targetClass, int rowIndex, int columnIndex);
/**
*
* @param rowIndex
* @param columnIndex
* @param element
*/
void set(int rowIndex, int columnIndex, Object element);
/**
*
* @param rowIndex
* @param columnIndex
* @return
*/
boolean isNull(int rowIndex, int columnIndex);
/**
*
* @param columnIndex
* @return
*/
T get(int columnIndex);
/**
*
* @param targetClass
* @param columnIndex
* @return
*/
T get(Class targetClass, int columnIndex);
/**
*
* @param columnName
* @return
*/
T get(String columnName);
/**
*
* @param targetClass
* @param columnName
* @return
*/
T get(Class targetClass, String columnName);
/**
* Returns the value from the current row and specified column if the specified {@code columnIndex} is equal or bigger than zero,
* or the specified {@code defaultValue} otherwise.
*
* @param columnIndex
* @param defaultValue
* @return
*/
T getOrDefault(int columnIndex, T defaultValue);
/**
* Returns the value from the current row and specified column if the specified {@code columnName} exists,
* or the specified {@code defaultValue} otherwise.
*
* @param columnName
* @param defaultValue
* @return
*/
T getOrDefault(String columnName, T defaultValue);
/**
* Return default value (false) if the property is null.
*
* @param columnIndex
* @return
*/
boolean getBoolean(int columnIndex);
/**
* Return default value (false) if the property is null.
*
* @param columnName
* @return
*/
boolean getBoolean(String columnName);
/**
* Return default value (0) if the property is null.
*
* @param columnIndex
* @return
*/
char getChar(int columnIndex);
/**
* Return default value (0) if the property is null.
*
* @param columnName
* @return
*/
char getChar(String columnName);
/**
* Return default value (0) if the property is null. Return Number.byteValue() otherwise.
*
* @param columnIndex
* @return
*/
byte getByte(int columnIndex);
/**
* Return default value (0) if the property is null. Return Number.byteValue() otherwise.
*
* @param columnName
* @return
*/
byte getByte(String columnName);
/**
* Return default value (0) if the property is null. Return Number.shortValue() otherwise.
*
* @param columnIndex
* @return
*/
short getShort(int columnIndex);
/**
* Return default value (0) if the property is null. Return Number.shortValue() otherwise.
*
* @param columnName
* @return
*/
short getShort(String columnName);
/**
* Return default value (0) if the property is null. Return Number.intValue() otherwise.
*
* @param columnIndex
* @return
*/
int getInt(int columnIndex);
/**
* Return default value (0) if the property is null. Return Number.intValue() otherwise.
*
* @param columnName
* @return
*/
int getInt(String columnName);
/**
* Return default value (0) if the property is null. Return Number.longValue() otherwise.
*
* @param columnIndex
* @return
*/
long getLong(int columnIndex);
/**
* Return default value (0) if the property is null. Return Number.longValue() otherwise.
*
* @param columnName
* @return
*/
long getLong(String columnName);
/**
* Return default value (0f) if the property is null. Return Number.floatValue() otherwise.
*
* @param columnIndex
* @return
*/
float getFloat(int columnIndex);
/**
* Return default value (0f) if the property is null. Return Number.floatValue() otherwise.
*
* @param columnName
* @return
*/
float getFloat(String columnName);
/**
* Return default value (0d) if the property is null. Return Number.doubleValue() otherwise.
*
* @param columnIndex
* @return
*/
double getDouble(int columnIndex);
/**
* Return default value (0d) if the property is null. Return Number.doubleValue() otherwise.
*
* @param columnName
* @return
*/
double getDouble(String columnName);
/**
*
* @param columnIndex
* @return
*/
boolean isNull(int columnIndex);
/**
*
* @param columnName
* @return
*/
boolean isNull(String columnName);
/**
* Method set.
*
* @param columnIndex
* @param value
*/
void set(int columnIndex, Object value);
/**
* Method set.
*
* @param columnName
* @param value
*/
void set(String columnName, Object value);
/**
* Must NOT modify the returned list.
*
* @param columnIndex
* @return
*/
List getColumn(int columnIndex);
/**
* Must NOT modify the returned list.
*
* @param columnName
* @return
*/
List getColumn(String columnName);
/**
* Method addColumn.
*
* @param columnName
* @param column
*/
void addColumn(String columnName, List> column);
/**
* Method addColumn.
*
* @param columnIndex position to add.
* @param columnName
* @param column
*/
void addColumn(int columnIndex, String columnName, List> column);
/**
* Generate the new column values from the specified column by the specified Function
.
* @param newColumnName
* @param fromColumnName
* @param func
*/
void addColumn(String newColumnName, String fromColumnName, Try.Function func) throws E;
/**
* Generate the new column values from the specified column by the specified Function
.
*
* @param columnIndex
* @param newColumnName
* @param fromColumnName
* @param func
*/
void addColumn(int columnIndex, String newColumnName, String fromColumnName, Try.Function func) throws E;
/**
* Generate the new column values from the specified columns by the specified Function
.
* @param newColumnName
* @param fromColumnNames
* @param func
*/
void addColumn(String newColumnName, Collection fromColumnNames, Try.Function super Object[], ?, E> func) throws E;
/**
* Generate the new column values from the specified columns by the specified Function
.
*
* @param columnIndex
* @param newColumnName
* @param fromColumnNames
* @param func
*/
void addColumn(int columnIndex, String newColumnName, Collection fromColumnNames, Try.Function super Object[], ?, E> func)
throws E;
/**
* Remove the column with the specified columnName from this DataSet.
*
* @param columnName
*/
void removeColumn(String columnName);
/**
* Remove the column(s) with the specified columnNames from this DataSet.
*
* @param columnNames
*/
void removeColumnAll(Collection columnNames);
/**
* Update the values of the specified column by the specified function.
*
* @param columnName
* @param func
*/
void updateColumn(String columnName, Try.Function func) throws E;
/**
* Update the values of the specified columns one by one with the specified function.
*
* @param columnNames
* @param func
*/
void updateColumn(Collection columnNames, Try.Function, ?, E> func) throws E;
/**
* Convert the specified column to target type.
*
* @param columnName
* @param targetType
*/
void convertColumn(String columnName, Class> targetType);
/**
* Convert the specified columns to target types.
*
* @param columnTargetTypes
*/
void convertColumn(Map> columnTargetTypes);
//
// /**
// * convert the specified columns to target types.
// *
// * @param targetColumnTypes fill the element with null
if don't wan to convert the target column.
// */
// void convertColumn(Class>[] targetColumnTypes);
//
/**
*
* @param columnNames
* @param newColumnName
* @param newColumnClass it can be Object[]/List/Set/Map/Entity
* @return
*/
void combineColumn(Collection columnNames, String newColumnName, Class> newColumnClass);
void combineColumn(Collection columnNames, String newColumnName, Try.Function super Object[], ?, E> combineFunc) throws E;
void combineColumn(Try.Predicate columnNameFilter, String newColumnName, Class> newColumnClass) throws E;
void combineColumn(Try.Predicate columnNameFilter, String newColumnName,
Try.Function super Object[], ?, E2> combineFunc) throws E, E2;
void divideColumn(String columnName, Collection newColumnNames, Try.Function, E> divideFunc) throws E;
/**
*
* @param row can be Object[]/List/Map/Entity with getter/setter methods
*/
void addRow(Object row);
/**
*
* @param row can be Object[]/List/Map/Entity with getter/setter methods
*/
void addRow(int rowIndex, Object row);
/**
*
* @param rowIndex
*/
void removeRow(int rowIndex);
/**
*
* @param indices
*/
void removeRowAll(int... indices);
/**
*
* @param inclusiveFromRowIndex
* @param exclusiveToRowIndex
*/
void removeRowRange(int inclusiveFromRowIndex, int exclusiveToRowIndex);
/**
* Update the values in the specified row with the specified function.
*
* @param rowIndex
* @param func
*/
void updateRow(int rowIndex, Try.Function, ?, E> func) throws E;
/**
* Update the values in the specified rows one by one with the specified function.
*
* @param indices
* @param func
*/
void updateRow(int[] indices, Try.Function, ?, E> func) throws E;
/**
* Update all the values in this DataSet with the specified function.
*
* @param func
*/
void updateAll(Try.Function, ?, E> func) throws E;
/**
* Replace all the values in this DataSet with the specified new value if it matches the specified condition.
*
* @param func
* @param newValue
*/
void replaceIf(Try.Predicate, E> func, Object newValue) throws E;
/**
* Returns the current row number.
*
* @return
*/
int currentRowNum();
/**
* Move the cursor to the specified row.
*
* @param rowNum
* @return this object itself.
*/
DataSet absolute(int rowNum);
/**
*
* @param rowNum
* @return
*/
Object[] getRow(int rowNum);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param rowNum
* @return
*/
T getRow(Class extends T> rowClass, int rowNum);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param columnNames
* @param rowNum
* @return
*/
T getRow(Class extends T> rowClass, Collection columnNames, int rowNum);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param rowNum
* @return
*/
T getRow(IntFunction extends T> rowSupplier, int rowNum);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param columnNames
* @param rowNum
* @return
*/
T getRow(IntFunction extends T> rowSupplier, Collection columnNames, int rowNum);
/**
*
* @return {@code Optional}
*/
Optional firstRow();
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @return {@code Optional}
*/
Optional firstRow(Class extends T> rowClass);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param columnNames
* @return {@code Optional}
*/
Optional firstRow(Class extends T> rowClass, Collection columnNames);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @return {@code Optional}
*/
Optional firstRow(IntFunction extends T> rowSupplier);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param columnNames
* @return {@code Optional}
*/
Optional firstRow(IntFunction extends T> rowSupplier, Collection columnNames);
/**
*
* @return {@code Optional}
*/
Optional lastRow();
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @return {@code Optional}
*/
Optional lastRow(Class extends T> rowClass);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* which can be object array/list/set/map/entity.
* @param columnNames
* @return {@code Optional}
*/
Optional lastRow(Class extends T> rowClass, Collection columnNames);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @return {@code Optional}
*/
Optional lastRow(IntFunction extends T> rowSupplier);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param columnNames
* @return {@code Optional}
*/
Optional lastRow(IntFunction extends T> rowSupplier, Collection columnNames);
// /**
// * It's for faster iteration without creating new row object for each row.
// *
// * @param output
// * which can be an instance of object array/list/set/map/entity.
// * @param rowNum
// */
// void row(Object output, int rowNum);
//
// /**
// * It's for faster iteration without creating new row object for each row.
// *
// * @param output
// * which can be an instance of object array/list/set/map/entity.
// * @param columnIndexes
// * @param rowNum
// */
// void row(Object output, int[] columnIndexes, int rowNum);
/**
* Performs the given action for each row of the {@code DataSet}
* until all rows have been processed or the action throws an
* exception.
*
* @param action
*/
void forEach(Try.Consumer super Object[], E> action) throws E;
/**
* Performs the given action for each row of the {@code DataSet}
* until all rows have been processed or the action throws an
* exception.
* @param action
* @param shareRowArray the same object array will be reset for each row during the iteration if it's true
.
* It can be set to true
to improve the performance if the action
only read each row object array once, don't modify it or save it in collection.
* The default value is false.
*/
void forEach(Try.Consumer super Object[], E> action, boolean shareRowArray) throws E;
/**
* Performs the given action for each row of the {@code DataSet}
* until all rows have been processed or the action throws an
* exception.
*
* @param columnNames
* @param action
*/
void forEach(Collection columnNames, Try.Consumer super Object[], E> action) throws E;
/**
* Performs the given action for each row of the {@code DataSet}
* until all rows have been processed or the action throws an
* exception.
*
* @param columnNames
* @param action
* @param shareRowArray the same object array will be reset for each row during the iteration if it's true
.
* It can be set to true
to improve the performance if the action
only read each row object array once, don't modify it or save it in collection.
* The default value is false.
*/
void forEach(Collection columnNames, Try.Consumer super Object[], E> action, boolean shareRowArray) throws E;
/**
* Performs the given action for each row of the {@code DataSet}
* until all rows have been processed or the action throws an
* exception.
*
* @param fromRowIndex
* @param toRowIndex
* @param action
*/
void forEach(int fromRowIndex, int toRowIndex, Try.Consumer super Object[], E> action) throws E;
/**
* Performs the given action for each row of the {@code DataSet}
* until all rows have been processed or the action throws an
* exception.
*
* @param fromRowIndex
* @param toRowIndex
* @param action
* @param shareRowArray the same object array will be reset for each row during the iteration if it's true
.
* It can be set to true
to improve the performance if the action
only read each row object array once, don't modify it or save it in collection.
* The default value is false.
*/
void forEach(int fromRowIndex, int toRowIndex, Try.Consumer super Object[], E> action, boolean shareRowArray) throws E;
/**
* Performs the given action for each row of the {@code DataSet}
* until all rows have been processed or the action throws an
* exception.
*
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
* @param action
*/
void forEach(Collection columnNames, int fromRowIndex, int toRowIndex, Try.Consumer super Object[], E> action) throws E;
/**
* Performs the given action for each row of the {@code DataSet}
* until all rows have been processed or the action throws an
* exception.
*
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
* @param action
* @param shareRowArray the same object array will be reset for each row during the iteration if it's true
.
* It can be set to true
to improve the performance if the action
only read each row object array once, don't modify it or save it in collection.
* The default value is false.
*/
void forEach(Collection columnNames, int fromRowIndex, int toRowIndex, Try.Consumer super Object[], E> action,
boolean shareRowArray) throws E;
R forEach(R seed, Try.BiFunction accumulator,
Try.BiPredicate super R, ? super Object[], E2> conditionToBreak) throws E, E2;
R forEach(R seed, Try.BiFunction accumulator,
Try.BiPredicate super R, ? super Object[], E2> conditionToBreak, boolean shareRowArray) throws E, E2;
R forEach(Collection columnNames, R seed, Try.BiFunction accumulator,
Try.BiPredicate super R, ? super Object[], E2> conditionToBreak) throws E, E2;
/**
* Execute accumulator
on each element till true
is returned by conditionToBreak
*
* @param columnNames
* @param seed The seed element is both the initial value of the reduction and the default result if there are no elements.
* @param accumulator
* @param conditionToBreak break if true
is return.
* @param shareRowArray
* @return
*/
R forEach(Collection columnNames, R seed, Try.BiFunction accumulator,
Try.BiPredicate super R, ? super Object[], E2> conditionToBreak, boolean shareRowArray) throws E, E2;
R forEach(int fromRowIndex, int toRowIndex, R seed, Try.BiFunction accumulator,
Try.BiPredicate super R, ? super Object[], E2> conditionToBreak) throws E, E2;
R forEach(int fromRowIndex, int toRowIndex, R seed, Try.BiFunction accumulator,
Try.BiPredicate super R, ? super Object[], E2> conditionToBreak, boolean shareRowArray) throws E, E2;
R forEach(Collection columnNames, int fromRowIndex, int toRowIndex, R seed,
Try.BiFunction accumulator, Try.BiPredicate super R, ? super Object[], E2> conditionToBreak) throws E, E2;
/**
* Execute accumulator
on each element till true
is returned by conditionToBreak
*
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
* @param seed The seed element is both the initial value of the reduction and the default result if there are no elements.
* @param accumulator
* @param conditionToBreak break if true
is return.
* @param shareRowArray
* @return
*/
R forEach(Collection columnNames, int fromRowIndex, int toRowIndex, R seed,
Try.BiFunction accumulator, Try.BiPredicate super R, ? super Object[], E2> conditionToBreak, boolean shareRowArray)
throws E, E2;
// /**
// *
// * @return
// */
// Object[][] toArray();
//
// /**
// *
// * @param fromRowIndex
// * @param toRowIndex
// * @return
// */
// Object[][] toArray(int fromRowIndex, int toRowIndex);
//
// /**
// *
// * @param rowClass it can be Object[]/List/Set/Map/Entity
// * @return
// */
// T[] toArray(Class extends T> rowClass);
//
// /**
// *
// * @param rowClass it can be Object[]/List/Set/Map/Entity the class for the row value.
// * @param fromRowIndex
// * @param toRowIndex
// * @return
// */
// T[] toArray(Class extends T> rowClass, int fromRowIndex, int toRowIndex);
//
// /**
// *
// * @param rowClass it can be Object[]/List/Set/Map/Entity the class for the row value.
// * @param columnNames
// * @param fromRowIndex
// * @param toRowIndex
// * @return
// */
// T[] toArray(Class extends T> rowClass, Collection columnNames);
//
// /**
// *
// * @param rowClass it can be Object[]/List/Set/Map/Entity the class for the row value.
// * @param columnNames
// * @param fromRowIndex
// * @param toRowIndex
// * @return
// */
// T[] toArray(Class extends T> rowClass, Collection columnNames, int fromRowIndex, int toRowIndex);
//
// /**
// *
// * @param rowSupplier it can be Object[]/List/Set/Map/Entity the class for the row value.
// * @return
// */
// T[] toArray(IntFunction extends T> rowSupplier);
//
// /**
// *
// * @param rowSupplier it can be Object[]/List/Set/Map/Entity the class for the row value.
// * @param fromRowIndex
// * @param toRowIndex
// * @return
// */
// T[] toArray(IntFunction extends T> rowSupplier, int fromRowIndex, int toRowIndex);
//
// /**
// *
// * @param rowSupplier it can be Object[]/List/Set/Map/Entity the class for the row value.
// * @param columnNames
// * @param fromRowIndex
// * @param toRowIndex
// * @return
// */
// T[] toArray(IntFunction extends T> rowSupplier, Collection columnNames);
//
// /**
// *
// * @param rowSupplier it can be Object[]/List/Set/Map/Entity the class for the row value.
// * @param columnNames
// * @param fromRowIndex
// * @param toRowIndex
// * @return
// */
// T[] toArray(IntFunction extends T> rowSupplier, Collection columnNames, int fromRowIndex, int toRowIndex);
/**
*
* @return
*/
List toList();
/**
*
* @param fromRowIndex
* @param toRowIndex
* @return
*/
List toList(int fromRowIndex, int toRowIndex);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @return
*/
List toList(Class extends T> rowClass);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param fromRowIndex
* @param toRowIndex
* @return
*/
List toList(Class extends T> rowClass, int fromRowIndex, int toRowIndex);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param fromRowIndex
* @param toRowIndex
* @return
*/
List toList(Class extends T> rowClass, Collection columnNames);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param fromRowIndex
* @param toRowIndex
* @return
*/
List toList(Class extends T> rowClass, Collection columnNames, int fromRowIndex, int toRowIndex);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @return
*/
List toList(IntFunction extends T> rowSupplier);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param fromRowIndex
* @param toRowIndex
* @return
*/
List toList(IntFunction extends T> rowSupplier, int fromRowIndex, int toRowIndex);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param fromRowIndex
* @param toRowIndex
* @return
*/
List toList(IntFunction extends T> rowSupplier, Collection columnNames);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param fromRowIndex
* @param toRowIndex
* @return
*/
List toList(IntFunction extends T> rowSupplier, Collection columnNames, int fromRowIndex, int toRowIndex);
/**
*
* @param keyColumnName
* @param valueColumnName
* @return
*/
Map toMap(String keyColumnName, String valueColumnName);
/**
*
* @param keyColumnName
* @param valueColumnName
* @param fromRowIndex
* @param toRowIndex
* @return
*/
Map toMap(String keyColumnName, String valueColumnName, int fromRowIndex, int toRowIndex);
/**
*
* @param keyColumnName
* @param valueColumnName
* @param fromRowIndex
* @param toRowIndex
* @param supplier
* @return
*/
> M toMap(String keyColumnName, String valueColumnName, int fromRowIndex, int toRowIndex, IntFunction supplier);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @return
*/
Map toMap(Class extends V> rowClass, String keyColumnName, Collection valueColumnNames);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @param fromRowIndex
* @param toRowIndex
* @return
*/
Map toMap(Class extends V> rowClass, String keyColumnName, Collection valueColumnNames, int fromRowIndex, int toRowIndex);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @param fromRowIndex
* @param toRowIndex
* @param supplier
* @return
*/
> M toMap(Class extends V> rowClass, String keyColumnName, Collection valueColumnNames, int fromRowIndex,
int toRowIndex, IntFunction supplier);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @return
*/
Map toMap(IntFunction extends V> rowSupplier, String keyColumnName, Collection valueColumnNames);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @param fromRowIndex
* @param toRowIndex
* @return
*/
Map toMap(IntFunction extends V> rowSupplier, String keyColumnName, Collection valueColumnNames, int fromRowIndex, int toRowIndex);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @param fromRowIndex
* @param toRowIndex
* @param supplier
* @return
*/
> M toMap(IntFunction extends V> rowSupplier, String keyColumnName, Collection valueColumnNames, int fromRowIndex,
int toRowIndex, IntFunction supplier);
/**
*
* @param keyColumnName
* @param valueColumnName
* @return
*/
ListMultimap toMultimap(String keyColumnName, String valueColumnName);
/**
*
* @param keyColumnName
* @param valueColumnName
* @param fromRowIndex
* @param toRowIndex
* @return
*/
ListMultimap toMultimap(String keyColumnName, String valueColumnName, int fromRowIndex, int toRowIndex);
/**
*
* @param keyColumnName
* @param valueColumnName
* @param fromRowIndex
* @param toRowIndex
* @param supplier
* @return
*/
, M extends Multimap> M toMultimap(String keyColumnName, String valueColumnName, int fromRowIndex, int toRowIndex,
IntFunction supplier);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @return
*/
ListMultimap toMultimap(Class extends E> rowClass, String keyColumnName, Collection valueColumnNames);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @param fromRowIndex
* @param toRowIndex
* @return
*/
ListMultimap toMultimap(Class extends E> rowClass, String keyColumnName, Collection valueColumnNames, int fromRowIndex,
int toRowIndex);
/**
*
* @param rowClass it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @param fromRowIndex
* @param toRowIndex
* @param supplier
* @return
*/
, M extends Multimap> M toMultimap(Class extends E> rowClass, String keyColumnName,
Collection valueColumnNames, int fromRowIndex, int toRowIndex, IntFunction supplier);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @return
*/
ListMultimap toMultimap(IntFunction extends E> rowSupplier, String keyColumnName, Collection valueColumnNames);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @param fromRowIndex
* @param toRowIndex
* @return
*/
ListMultimap toMultimap(IntFunction extends E> rowSupplier, String keyColumnName, Collection valueColumnNames, int fromRowIndex,
int toRowIndex);
/**
*
* @param rowSupplier it can be Object[]/List/Set/Map/Entity
* @param keyColumnName
* @param valueColumnNames
* @param fromRowIndex
* @param toRowIndex
* @param supplier
* @return
*/
, M extends Multimap> M toMultimap(IntFunction extends E> rowSupplier, String keyColumnName,
Collection valueColumnNames, int fromRowIndex, int toRowIndex, IntFunction supplier);
// /**
// *
// * @param columnName
// * @return
// */
// Multiset toMultiset(String columnName);
//
// /**
// *
// * @param columnName
// * @param fromRowIndex
// * @param toRowIndex
// * @return
// */
// Multiset toMultiset(String columnName, int fromRowIndex, int toRowIndex);
//
// /**
// *
// * @param columnName
// * @param fromRowIndex
// * @param toRowIndex
// * @param supplier create Multiset
by new Multiset(ArrayHashMap.class)
or Multiset(LinkedArrayHashMap.class)
if the element is array.
// * @return
// */
// Multiset toMultiset(String columnName, int fromRowIndex, int toRowIndex, IntFunction> supplier);
//
// /**
// *
// * @param rowClass it can be Object[]/List/Set/Map/Entity
// * @param columnNames
// * @return
// */
// Multiset toMultiset(Class extends T> rowClass, Collection columnNames);
//
// /**
// *
// * @param rowClass it can be Object[]/List/Set/Map/Entity
// * @param columnNames
// * @param fromRowIndex
// * @param toRowIndex
// * @return
// */
// Multiset toMultiset(Class extends T> rowClass, Collection columnNames, int fromRowIndex, int toRowIndex);
//
// /**
// *
// * @param rowClass it can be Object[]/List/Set/Map/Entity
// * @param columnNames
// * @param fromRowIndex
// * @param toRowIndex
// * @param supplier create Multiset
by new Multiset(ArrayHashMap.class)
or Multiset(LinkedArrayHashMap.class)
if rowClass
is array.
// * @return
// */
// Multiset toMultiset(Class extends T> rowClass, Collection columnNames, int fromRowIndex, int toRowIndex,
// IntFunction> supplier);
//
// /**
// *
// * @param rowSupplier it can be Object[]/List/Set/Map/Entity
// * @param columnNames
// * @return
// */
// Multiset toMultiset(IntFunction extends T> rowSupplier, Collection columnNames);
//
// /**
// *
// * @param rowSupplier it can be Object[]/List/Set/Map/Entity
// * @param columnNames
// * @param fromRowIndex
// * @param toRowIndex
// * @return
// */
// Multiset toMultiset(IntFunction extends T> rowSupplier, Collection columnNames, int fromRowIndex, int toRowIndex);
//
// /**
// *
// * @param rowSupplier it can be Object[]/List/Set/Map/Entity
// * @param columnNames
// * @param fromRowIndex
// * @param toRowIndex
// * @param supplier create Multiset
by new Multiset(ArrayHashMap.class)
or Multiset(LinkedArrayHashMap.class)
if rowClass
is array.
// * @return
// */
// Multiset toMultiset(IntFunction extends T> rowSupplier, Collection columnNames, int fromRowIndex, int toRowIndex,
// IntFunction> supplier);
/**
*
* @return
*/
String toJSON();
/**
*
* @param fromRowIndex
* @param toRowIndex
* @return
*/
String toJSON(int fromRowIndex, int toRowIndex);
/**
*
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
* @return
*/
String toJSON(Collection columnNames, int fromRowIndex, int toRowIndex);
/**
*
* @param out
*/
void toJSON(File out);
/**
*
* @param out
* @param fromRowIndex
* @param toRowIndex
*/
void toJSON(File out, int fromRowIndex, int toRowIndex);
/**
*
* @param out
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
*/
void toJSON(File out, Collection columnNames, int fromRowIndex, int toRowIndex);
/**
*
* @param os
*/
void toJSON(OutputStream out);
/**
*
* @param os
* @param fromRowIndex
* @param toRowIndex
*/
void toJSON(OutputStream out, int fromRowIndex, int toRowIndex);
/**
*
* @param os
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
*/
void toJSON(OutputStream out, Collection columnNames, int fromRowIndex, int toRowIndex);
/**
*
* @param os
*/
void toJSON(Writer out);
/**
*
* @param os
* @param fromRowIndex
* @param toRowIndex
*/
void toJSON(Writer out, int fromRowIndex, int toRowIndex);
/**
*
* @param os
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
*/
void toJSON(Writer out, Collection columnNames, int fromRowIndex, int toRowIndex);
/**
*
* @return
*/
String toXML();
/**
* @param rowElementName
* @return
*/
String toXML(String rowElementName);
/**
*
* @param fromRowIndex
* @param toRowIndex
* @return
*/
String toXML(int fromRowIndex, int toRowIndex);
/**
* @param rowElementName
* @param fromRowIndex
* @param toRowIndex
* @return
*/
String toXML(String rowElementName, int fromRowIndex, int toRowIndex);
/**
*
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
* @return
*/
String toXML(Collection columnNames, int fromRowIndex, int toRowIndex);
/**
* @param rowElementName
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
* @return
*/
String toXML(String rowElementName, Collection columnNames, int fromRowIndex, int toRowIndex);
/**
* @param out
*/
void toXML(File out);
/**
* @param out
* @param rowElementName
*/
void toXML(File out, String rowElementName);
/**
*
* @param out
* @param fromRowIndex
* @param toRowIndex
*/
void toXML(File out, int fromRowIndex, int toRowIndex);
/**
* @param out
* @param rowElementName
* @param fromRowIndex
* @param toRowIndex
*/
void toXML(File out, String rowElementName, int fromRowIndex, int toRowIndex);
/**
*
* @param out
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
*/
void toXML(File out, Collection columnNames, int fromRowIndex, int toRowIndex);
/**
* @param out
* @param rowElementName
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
*/
void toXML(File out, String rowElementName, Collection columnNames, int fromRowIndex, int toRowIndex);
/**
* @param out
*/
void toXML(OutputStream out);
/**
* @param out
* @param rowElementName
*/
void toXML(OutputStream out, String rowElementName);
/**
*
* @param out
* @param fromRowIndex
* @param toRowIndex
*/
void toXML(OutputStream out, int fromRowIndex, int toRowIndex);
/**
* @param out
* @param rowElementName
* @param fromRowIndex
* @param toRowIndex
*/
void toXML(OutputStream out, String rowElementName, int fromRowIndex, int toRowIndex);
/**
*
* @param out
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
*/
void toXML(OutputStream out, Collection columnNames, int fromRowIndex, int toRowIndex);
/**
* @param out
* @param rowElementName
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
*/
void toXML(OutputStream out, String rowElementName, Collection columnNames, int fromRowIndex, int toRowIndex);
/**
* @param out
*/
void toXML(Writer out);
/**
* @param out
* @param rowElementName
*/
void toXML(Writer out, String rowElementName);
/**
*
* @param out
* @param fromRowIndex
* @param toRowIndex
*/
void toXML(Writer out, int fromRowIndex, int toRowIndex);
/**
* @param out
* @param rowElementName
* @param fromRowIndex
* @param toRowIndex
*/
void toXML(Writer out, String rowElementName, int fromRowIndex, int toRowIndex);
/**
*
* @param out
* @param columnNames
* @param fromRowIndex
* @param toRowIndex
*/
void toXML(Writer out, Collection