org.apache.poi.ss.util
Class Region
- java.lang.Object
-
- org.apache.poi.ss.util.Region
-
- All Implemented Interfaces:
- java.lang.Comparable<Region>
- Direct Known Subclasses:
- Region
Deprecated.(Aug-2008) useCellRangeAddress
public class Region extends java.lang.Object implements java.lang.Comparable<Region>
Represents a from/to row/col square. This is a object primitive that can be used to represent row,col - row,col just as one would use String to represent a string of characters. Its really only useful for HSSF though.
-
-
Constructor Summary
Constructors Constructor and Description Region()Deprecated.Creates a new instance of Region (0,0 - 0,0)Region(int rowFrom, short colFrom, int rowTo, short colTo)Deprecated.Region(java.lang.String ref)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description intcompareTo(Region r)Deprecated.Compares that the given region is the same less than or greater than this region.booleancontains(int row, short col)Deprecated.Answers: "is the row/column inside this range?"static Region[]convertCellRangesToRegions(CellRangeAddress[] cellRanges)Deprecated.Convert a List of CellRange objects to an array of regionsstatic CellRangeAddress[]convertRegionsToCellRanges(Region[] regions)Deprecated.static CellRangeAddressconvertToCellRangeAddress(Region r)Deprecated.booleanequals(Region r)Deprecated.intgetArea()Deprecated.shortgetColumnFrom()Deprecated.get the upper left hand corner column numbershortgetColumnTo()Deprecated.get the lower right hand corner column numberjava.lang.StringgetRegionRef()Deprecated.intgetRowFrom()Deprecated.get the upper left hand corner row numberintgetRowTo()Deprecated.get the lower right hand corner row numberinthashCode()Deprecated.voidsetColumnFrom(short colFrom)Deprecated.set the upper left hand corner column numbervoidsetColumnTo(short colTo)Deprecated.set the lower right hand corner column numbervoidsetRowFrom(int rowFrom)Deprecated.set the upper left hand corner row numbervoidsetRowTo(int rowTo)Deprecated.get the lower right hand corner row number
-
-
-
Constructor Detail
-
Region
public Region()
Deprecated.Creates a new instance of Region (0,0 - 0,0)
-
Region
public Region(int rowFrom, short colFrom, int rowTo, short colTo)Deprecated.
-
Region
public Region(java.lang.String ref)
Deprecated.
-
-
Method Detail
-
getColumnFrom
public short getColumnFrom()
Deprecated.get the upper left hand corner column number- Returns:
- column number for the upper left hand corner
-
getRowFrom
public int getRowFrom()
Deprecated.get the upper left hand corner row number- Returns:
- row number for the upper left hand corner
-
getColumnTo
public short getColumnTo()
Deprecated.get the lower right hand corner column number- Returns:
- column number for the lower right hand corner
-
getRowTo
public int getRowTo()
Deprecated.get the lower right hand corner row number- Returns:
- row number for the lower right hand corner
-
setColumnFrom
public void setColumnFrom(short colFrom)
Deprecated.set the upper left hand corner column number- Parameters:
colFrom- column number for the upper left hand corner
-
setRowFrom
public void setRowFrom(int rowFrom)
Deprecated.set the upper left hand corner row number- Parameters:
rowFrom- row number for the upper left hand corner
-
setColumnTo
public void setColumnTo(short colTo)
Deprecated.set the lower right hand corner column number- Parameters:
colTo- column number for the lower right hand corner
-
setRowTo
public void setRowTo(int rowTo)
Deprecated.get the lower right hand corner row number- Parameters:
rowTo- row number for the lower right hand corner
-
contains
public boolean contains(int row, short col)Deprecated.Answers: "is the row/column inside this range?"- Returns:
trueif the cell is in the range andfalseif it is not
-
equals
public boolean equals(Region r)
Deprecated.
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(Region r)
Deprecated.Compares that the given region is the same less than or greater than this region. If any regional coordiant passed in is less than this regions coordinants then a positive integer is returned. Otherwise a negative integer is returned.- Specified by:
compareToin interfacejava.lang.Comparable<Region>- Parameters:
r- region- See Also:
Comparable.compareTo(Object)
-
getArea
public int getArea()
Deprecated.- Returns:
- the size of the region (number of cells in the area).
-
convertCellRangesToRegions
public static Region[] convertCellRangesToRegions(CellRangeAddress[] cellRanges)
Deprecated.Convert a List of CellRange objects to an array of regions- Parameters:
cellRanges- list of CellRange objects- Returns:
- regions
-
convertRegionsToCellRanges
public static CellRangeAddress[] convertRegionsToCellRanges(Region[] regions)
Deprecated.
-
convertToCellRangeAddress
public static CellRangeAddress convertToCellRangeAddress(Region r)
Deprecated.
-
getRegionRef
public java.lang.String getRegionRef()
Deprecated.- Returns:
- the string reference for this region
-
-
DataMelt 3.0 © DataMelt by jWork.ORG