Package cdc.issues.locations
Class WorkbookLocation
- java.lang.Object
-
- cdc.issues.locations.AbstractLocation
-
- cdc.issues.locations.WorkbookLocation
-
- All Implemented Interfaces:
Location,Comparable<Location>
public class WorkbookLocation extends AbstractLocation
Implementation of Location dedicated to workbooks.It can be used to designate:
- A workbook: (systemId),
- A sheet: (systemId, sheetName),
- A column: (systemId, sheetName, columnName),
- A row: (systemId, sheetName, rowNumber) or (systemId, sheetName, rowId),
- Or a cell: (systemId, sheetName, columnName, rowNumber) or (systemId, sheetName, columnName, rowId).
Note: A valid row number is> 0.- Author:
- Damien Carbonne
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWorkbookLocation.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protectedWorkbookLocation(String systemId, String sheetName, int rowNumber, String rowId, String columnName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WorkbookLocation.Builderbuilder()static WorkbookLocationcreate(String systemId, String anchor)booleanequals(Object object)StringgetAnchor()StringgetColumnName()StringgetPath()StringgetRowId()intgetRowNumber()StringgetSheetName()StringgetSystemId()StringgetTag()booleanhasColumnData()inthashCode()booleanhasRowData()booleanhasRowIdData()booleanhasRowNumberData()booleanhasSheetData()booleanisCellLocation()booleanisColumnLocation()booleanisRowLocation()booleanisSheetLocation()booleanisWorkbookLocation()-
Methods inherited from class cdc.issues.locations.AbstractLocation
toString
-
-
-
-
Field Detail
-
TAG
public static final String TAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static WorkbookLocation create(String systemId, String anchor)
-
getTag
public String getTag()
- Returns:
- The string used to identify the implementation of this interface. It is used in serialization.
- See Also:
Locations
-
getPath
public String getPath()
- Returns:
- The external part of the location, the path of the designated resource.
It is typically a file name, an URI, a kind of 'absolute' identifier.
-
getAnchor
public String getAnchor()
- Returns:
- The internal part of the location, inside the resource.
It may be
null.
-
getSystemId
public String getSystemId()
- Returns:
- The system id of this location.
-
getSheetName
public String getSheetName()
- Returns:
- The sheet name, possibly
null, of this location.
-
getRowNumber
public int getRowNumber()
- Returns:
- The row number, possibly
<= 0, of this location.
-
getRowId
public String getRowId()
- Returns:
- The row id, possibly
null, of this location.
-
getColumnName
public String getColumnName()
- Returns:
- The column name, possibly
null, of this location.
-
hasSheetData
public boolean hasSheetData()
- Returns:
trueif this location contains sheet data.
-
hasRowNumberData
public boolean hasRowNumberData()
- Returns:
trueif this location contains row number data.
-
hasRowIdData
public boolean hasRowIdData()
- Returns:
trueif this location contains row id data.
-
hasRowData
public boolean hasRowData()
- Returns:
trueif this location contains row data.
-
hasColumnData
public boolean hasColumnData()
- Returns:
trueif this location contains column data.
-
isWorkbookLocation
public boolean isWorkbookLocation()
- Returns:
trueif this location designates a workbook.
-
isSheetLocation
public boolean isSheetLocation()
- Returns:
trueif this location designates a sheet.
-
isColumnLocation
public boolean isColumnLocation()
- Returns:
trueif this location designates a column.
-
isRowLocation
public boolean isRowLocation()
- Returns:
trueif this location designates a row.
-
isCellLocation
public boolean isCellLocation()
- Returns:
trueif this location designates a cell.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractLocation
-
equals
public boolean equals(Object object)
- Overrides:
equalsin classAbstractLocation
-
builder
public static WorkbookLocation.Builder builder()
-
-