Package ch.rabanti.picoxlsx4j
Class Range
- java.lang.Object
-
- ch.rabanti.picoxlsx4j.Range
-
public class Range extends Object
Class representing a cell range (no getters and setters to simplify handling)- Author:
- Raphael Stoeckli
-
-
Field Summary
Fields Modifier and Type Field Description Address
EndAddress
End address of the rangeAddress
StartAddress
Start address of the range
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Range
buildRange(int startColumn, int startRow, int endColumn, int endRow)
Method to build a range object from zwo column and two row numbers.static Range
buildRange(Address startAddress, Address endAddress)
Method to build a range object from two addresses.boolean
equals(Object o)
Overwritten equals methodString
toString()
Overwritten toString method
-
-
-
Constructor Detail
-
Range
public Range(Address start, Address end)
Constructor with with addresses as arguments- Parameters:
start
- Start address of the rangeend
- End address of the range- Throws:
RangeException
- Thrown if the end address is smaller than the start address
-
Range
public Range(String range)
Constructor with a range string as argument- Parameters:
range
- Address range (e.g. 'A1:B12')- Throws:
RangeException
- Thrown if the end address is smaller than the start address
-
-
Method Detail
-
toString
public String toString()
Overwritten toString method
-
equals
public boolean equals(Object o)
Overwritten equals method
-
buildRange
public static Range buildRange(Address startAddress, Address endAddress)
Method to build a range object from two addresses. The appropriate start and end address will be determined automatically- Parameters:
startAddress
- Proposed start addressendAddress
- Proposed end address- Returns:
- Resolved Range
-
buildRange
public static Range buildRange(int startColumn, int startRow, int endColumn, int endRow)
Method to build a range object from zwo column and two row numbers. The appropriate start and end address will be determined automatically- Parameters:
startColumn
- Proposed start columnstartRow
- Proposed start rowendColumn
- Proposed end columnendRow
- Proposed end row- Returns:
- Resolved Range
-
-