Class PrometheusSheetCellAddress
java.lang.Object
io.github.tonywasher.joceanus.prometheus.service.sheet.PrometheusSheetCellAddress
Utility class to parse/format CellAddresses.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final charColon character.(package private) static final charPeriod character. -
Constructor Summary
ConstructorsConstructorDescriptionPrometheusSheetCellAddress(String pAddress) Constructor.PrometheusSheetCellAddress(String pSheetName, PrometheusSheetCellPosition pPosition) Constructor.PrometheusSheetCellAddress(String pSheetName, String pAddress) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringescapeApostrophes(String pSource) Escape apostrophes in a string.(package private) voidformatPosition(StringBuilder pBuilder) Obtain the column name.intObtain the Column.Obtain the Location.intgetRow()Obtain the Row.Obtain the SheetName.toString()
-
Field Details
-
CHAR_COLON
static final char CHAR_COLONColon character.- See Also:
-
CHAR_PERIOD
static final char CHAR_PERIODPeriod character.- See Also:
-
-
Constructor Details
-
PrometheusSheetCellAddress
Constructor.- Parameters:
pSheetName- the sheet namepPosition- the cell location
-
PrometheusSheetCellAddress
PrometheusSheetCellAddress(String pAddress) Constructor.- Parameters:
pAddress- the cell address
-
PrometheusSheetCellAddress
Constructor.- Parameters:
pSheetName- the sheet namepAddress- the cell address
-
-
Method Details
-
getSheetName
Obtain the SheetName.- Returns:
- the name
-
getPosition
Obtain the Location.- Returns:
- the location
-
getColumn
public int getColumn()Obtain the Column.- Returns:
- the column
-
getRow
public int getRow()Obtain the Row.- Returns:
- the row
-
toString
-
formatPosition
Obtain the column name.- Parameters:
pBuilder- the string builder
-
escapeApostrophes
Escape apostrophes in a string.- Parameters:
pSource- the string to escape- Returns:
- the escaped string
-