RSLM-DevOps 1.0.0
Chargement...
Recherche...
Aucune correspondance
Fonctions membres publiques | Fonctions membres privées | Attributs privés | Liste de tous les membres
Référence du modèle de la classe org.example.DataFrame< H, T extends Number >

Data manipulation library. Plus de détails...

Fonctions membres publiques

 DataFrame (Path path, Character csvDelimiter, Class< H > classParameterH, Class< T > classParameterT) throws IOException
 Read CSV file for a given file path.
 
 DataFrame (Path path, Class< H > classParameterH, Class< T > classParameterT) throws IOException
 Read CSV file for a given file path.
 
 DataFrame (List< H > header, List< List< T > > rows, Class< H > classParameterH, Class< T > classParameterT)
 Build a DataFrame from header and rows.
 
 DataFrame (HashMap< H, List< T > > content, Integer[] indexes, Class< H > classParameterH, Class< T > classParameterT)
 Build a DataFrame from content Map and indexes.
 
 DataFrame (HashMap< H, List< T > > content, Class< H > classParameterH, Class< T > classParameterT)
 Build a DataFrame from content Map.
 
Integer[] getIndexes ()
 Getter for the DataFrame index array.
 
void setIndexes (Integer[] indexes)
 Setter for the DataFrame index array.
 
HashMap< H, List< T > > getContent ()
 Getter for the DataFrame content map.
 
void setContent (HashMap< H, List< T > > content)
 Setter for the DataFrame Content map.
 
DataFrame< H, T > selectDataFrameByIndex (Integer[] indexes) throws Exception
 Select a part of the current DataFrame by using indexes and return a new DataFrame.
 
DataFrame< H, T > selectDataFrameByColumn (List< H > columns) throws Exception
 Select a part of the current DataFrame by using columns and return a new DataFrame.
 
String toStringDisplay ()
 Display the DataFrame in a well-aligned table format, including predefined indices if available.
 
String toStringDisplayByIndex (Integer[] indexes) throws Exception
 Display in a table the given dataframe for the given indexes.
 
String toStringDisplayByHeader (List< H > columnFilter) throws Exception
 Display in a table the given dataframe for the given indexes.
 
String toStringPartialDisplay (int nbLines, boolean mode)
 Display in a table the given dataframe.
 
boolean hasIndex ()
 Check if the current DataFrame index are initialised.
 
double sum (H header)
 Calculate sum of a column.
 
double average (H header)
 Calculate average of a column.
 
min (H header, Comparator< T > comparator)
 Find minimum value in a column.
 
max (H header, Comparator< T > comparator)
 Find maximum value in a column.
 
DataFrame< H, T > selectAdvanced (Map< H, Predicate< T > > criteria) throws Exception
 Advanced selection based on custom predicates per column that filters entire rows.
 

Fonctions membres privées

void buildTableDelimiter (StringBuilder builder, Map< H, Integer > columnWidths, int indexWidth, boolean hasIndex)
 Builds the delimiter line for the table based on column widths, including index if exists.
 
int getIndexWidth ()
 Retrieve max the String length of the current index.
 
void checkIndexInput (Integer[] indexes) throws Exception
 Run a checklist to verify the array of index compare to the saved index array.
 
void checkHeaderInput (List< H > header) throws Exception
 Run a checklist to verify the list of header compare to the saved header.
 
Integer retrieveIndexWhenAtDataFramePosition (Integer[] indexes, int i)
 Get index at referenced position.
 
convertValueT (String input)
 
convertValueH (String input)
 

Attributs privés

final Class< T > classParameterT
 
final Class< H > classParameterH
 
Integer[] indexes
 
HashMap< H, List< T > > content = new HashMap<>()
 

Description détaillée

Data manipulation library.

Paramètres
<H>Column header type
<T>Content type

Documentation des constructeurs et destructeur

◆ DataFrame() [1/5]

org.example.DataFrame< H, T extends Number >.DataFrame ( Path path,
Character csvDelimiter,
Class< H > classParameterH,
Class< T > classParameterT ) throws IOException
inline

Read CSV file for a given file path.

Paramètres
pathfile path
Exceptions
IOExceptionIf unable to open the file

Note: csv default delimiter character is ;

◆ DataFrame() [2/5]

org.example.DataFrame< H, T extends Number >.DataFrame ( Path path,
Class< H > classParameterH,
Class< T > classParameterT ) throws IOException
inline

Read CSV file for a given file path.

Paramètres
pathfile path
Exceptions
IOExceptionIf unable to open the file

Note: csv default delimiter character is ;

◆ DataFrame() [3/5]

org.example.DataFrame< H, T extends Number >.DataFrame ( List< H > header,
List< List< T > > rows,
Class< H > classParameterH,
Class< T > classParameterT )
inline

Build a DataFrame from header and rows.

Paramètres
headerlist of header to declare
rowslist of rows to declare

◆ DataFrame() [4/5]

org.example.DataFrame< H, T extends Number >.DataFrame ( HashMap< H, List< T > > content,
Integer[] indexes,
Class< H > classParameterH,
Class< T > classParameterT )
inline

Build a DataFrame from content Map and indexes.

Paramètres
contentData frame content shaped has a map
indexesData frame indexes

◆ DataFrame() [5/5]

org.example.DataFrame< H, T extends Number >.DataFrame ( HashMap< H, List< T > > content,
Class< H > classParameterH,
Class< T > classParameterT )
inline

Build a DataFrame from content Map.

Paramètres
contentData frame content shaped has a map

Documentation des fonctions membres

◆ average()

double org.example.DataFrame< H, T extends Number >.average ( H header)
inline

Calculate average of a column.

Paramètres
headerselected column

◆ buildTableDelimiter()

void org.example.DataFrame< H, T extends Number >.buildTableDelimiter ( StringBuilder builder,
Map< H, Integer > columnWidths,
int indexWidth,
boolean hasIndex )
inlineprivate

Builds the delimiter line for the table based on column widths, including index if exists.

Paramètres
builderStringBuilder to which the delimiter line is appended.
columnWidthsMap with the widths for each column.
indexWidthWidth of the index column, if indices are used.
hasIndexBoolean indicating if indices are present.

◆ checkHeaderInput()

void org.example.DataFrame< H, T extends Number >.checkHeaderInput ( List< H > header) throws Exception
inlineprivate

Run a checklist to verify the list of header compare to the saved header.

Paramètres
headerlist to check
Exceptions
Exceptioncheck failed with reason

◆ checkIndexInput()

void org.example.DataFrame< H, T extends Number >.checkIndexInput ( Integer[] indexes) throws Exception
inlineprivate

Run a checklist to verify the array of index compare to the saved index array.

Paramètres
indexesarray to check
Exceptions
Exceptioncheck failed with reason

◆ convertValueH()

H org.example.DataFrame< H, T extends Number >.convertValueH ( String input)
inlineprivate

◆ convertValueT()

T org.example.DataFrame< H, T extends Number >.convertValueT ( String input)
inlineprivate

◆ getContent()

HashMap< H, List< T > > org.example.DataFrame< H, T extends Number >.getContent ( )
inline

Getter for the DataFrame content map.

Renvoie
map of element by column header

◆ getIndexes()

Integer[] org.example.DataFrame< H, T extends Number >.getIndexes ( )
inline

Getter for the DataFrame index array.

Renvoie
indexes array

◆ getIndexWidth()

int org.example.DataFrame< H, T extends Number >.getIndexWidth ( )
inlineprivate

Retrieve max the String length of the current index.

Renvoie
max index string length

◆ hasIndex()

boolean org.example.DataFrame< H, T extends Number >.hasIndex ( )
inline

Check if the current DataFrame index are initialised.

Renvoie
true if the index array isn't null nor empty

◆ max()

T org.example.DataFrame< H, T extends Number >.max ( H header,
Comparator< T > comparator )
inline

Find maximum value in a column.

Paramètres
headerselected column

◆ min()

T org.example.DataFrame< H, T extends Number >.min ( H header,
Comparator< T > comparator )
inline

Find minimum value in a column.

Paramètres
headerselected column

◆ retrieveIndexWhenAtDataFramePosition()

Integer org.example.DataFrame< H, T extends Number >.retrieveIndexWhenAtDataFramePosition ( Integer[] indexes,
int i )
inlineprivate

Get index at referenced position.

Paramètres
indexeslist of index
icurrent position
Renvoie
found index at position, null otherwise

◆ selectAdvanced()

DataFrame< H, T > org.example.DataFrame< H, T extends Number >.selectAdvanced ( Map< H, Predicate< T > > criteria) throws Exception
inline

Advanced selection based on custom predicates per column that filters entire rows.

Paramètres
criteriaMap of headers to their respective predicates for selection.
Renvoie
A new DataFrame with only the rows that match all the criteria for any mentioned column.
Exceptions
ExceptionIf there are issues with the headers.

◆ selectDataFrameByColumn()

DataFrame< H, T > org.example.DataFrame< H, T extends Number >.selectDataFrameByColumn ( List< H > columns) throws Exception
inline

Select a part of the current DataFrame by using columns and return a new DataFrame.

Paramètres
columnsto filter on
Renvoie
selected DataFrame
Exceptions
ExceptionBad column selection

◆ selectDataFrameByIndex()

DataFrame< H, T > org.example.DataFrame< H, T extends Number >.selectDataFrameByIndex ( Integer[] indexes) throws Exception
inline

Select a part of the current DataFrame by using indexes and return a new DataFrame.

Paramètres
indexesto filter on
Renvoie
selected DataFrame
Exceptions
ExceptionBad index selection

◆ setContent()

void org.example.DataFrame< H, T extends Number >.setContent ( HashMap< H, List< T > > content)
inline

Setter for the DataFrame Content map.

Paramètres
contentmap of element by column header

◆ setIndexes()

void org.example.DataFrame< H, T extends Number >.setIndexes ( Integer[] indexes)
inline

Setter for the DataFrame index array.

Paramètres
indexesarray

◆ sum()

double org.example.DataFrame< H, T extends Number >.sum ( H header)
inline

Calculate sum of a column.

Paramètres
headerselected column

◆ toStringDisplay()

String org.example.DataFrame< H, T extends Number >.toStringDisplay ( )
inline

Display the DataFrame in a well-aligned table format, including predefined indices if available.

Renvoie
String representing the DataFrame in a table format.
Example of the result:
+---+----+----+
|   | a  | c  |
+---+----+----+
| 1 | 10 | 30 |
+---+----+----+
| 2 | 15 | 35 |
+---+----+----+

◆ toStringDisplayByHeader()

String org.example.DataFrame< H, T extends Number >.toStringDisplayByHeader ( List< H > columnFilter) throws Exception
inline

Display in a table the given dataframe for the given indexes.

Renvoie
String result to display
Example of result:
+---+----+----+
|   | a  | c  |
+---+----+----+
| 1 | 10 | 30 |
+---+----+----+
| 2 | 15 | 35 |
+---+----+----+

◆ toStringDisplayByIndex()

String org.example.DataFrame< H, T extends Number >.toStringDisplayByIndex ( Integer[] indexes) throws Exception
inline

Display in a table the given dataframe for the given indexes.

Renvoie
String result to display
Example of result:
+---+----+----+
|   | a  | c  |
+---+----+----+
| 1 | 10 | 30 |
+---+----+----+
| 2 | 15 | 35 |
+---+----+----+

◆ toStringPartialDisplay()

String org.example.DataFrame< H, T extends Number >.toStringPartialDisplay ( int nbLines,
boolean mode )
inline

Display in a table the given dataframe.

Paramètres
nbLinesnumber of lines to display
modetrue = first n lines // false = last n lines
Renvoie
String result to display
Example of result:
+---+----+----+
|   | a  | c  |
+---+----+----+
| 1 | 10 | 30 |
+---+----+----+
| 2 | 15 | 35 |
+---+----+----+

Documentation des données membres

◆ classParameterH

final Class<H> org.example.DataFrame< H, T extends Number >.classParameterH
private

◆ classParameterT

final Class<T> org.example.DataFrame< H, T extends Number >.classParameterT
private

◆ content

HashMap<H, List<T> > org.example.DataFrame< H, T extends Number >.content = new HashMap<>()
private

◆ indexes

Integer [] org.example.DataFrame< H, T extends Number >.indexes
private

La documentation de cette classe a été générée à partir du fichier suivant :