Package org.apache.jmeter.report.core
Class SampleMetadata
java.lang.Object
org.apache.jmeter.report.core.SampleMetadata
Describe samples structure by holding sample column names and theirs matching indexes.
- Since:
- 3.0
-
Constructor Summary
ConstructorDescriptionSampleMetadata
(char separator, String... columns) Builds metadata from separator character and a list of column namesSampleMetadata
(SampleSaveConfiguration saveConfig) Construct SampleMetaData fromSampleSaveConfiguration
. -
Method Summary
Modifier and TypeMethodDescriptionint
ensureIndexOf
(String col) Returns the index of the column with the specified name.int
getColumnName
(int i) Gets the name of the ith column in this metadataGets the name of the ith column in this metadatachar
int
Returns the index of the column with the specified name.toString()
-
Constructor Details
-
SampleMetadata
Builds metadata from separator character and a list of column names- Parameters:
separator
- The character used for column separationcolumns
- The list of columns names (must not benull
)
-
SampleMetadata
Construct SampleMetaData fromSampleSaveConfiguration
.- Parameters:
saveConfig
- config from which metadata gets extracted (must not benull
)
-
-
Method Details
-
getSeparator
public char getSeparator()- Returns:
- the character used for separating columns
-
getColumnCount
public int getColumnCount()- Returns:
- the number of columns in the metadata
-
getColumnName
Gets the name of the ith column in this metadata- Parameters:
i
- The index of the column for which the name is requested (zero based)- Returns:
- The column name of the ith column
- Throws:
IndexOutOfBoundsException
- If the requested column does not exist (< 0 or >getColumnCount()
)
-
getColumnName
Gets the name of the ith column in this metadata- Parameters:
i
- The index of the column for which the name is requested (zero based)- Returns:
- The column name of the ith column
- Throws:
IndexOutOfBoundsException
- If the requested columln does not exist (< 0 or >getColumnCount()
)
-
indexOf
Returns the index of the column with the specified name.- Parameters:
col
- the column name for which the index is requested- Returns:
- The index of the requested column or -1 if the requested column does not exist in this metadata
-
ensureIndexOf
Returns the index of the column with the specified name.- Parameters:
col
- the column name for which the index is requested- Returns:
- The index of the requested column
- Throws:
SampleException
- when the column with the specified name is not found
-
toString
-