Package com._1c.g5.v8.dt.moxel.ui.editor
Class RowColPositionCache
- java.lang.Object
-
- com._1c.g5.v8.dt.moxel.ui.editor.RowColPositionCache
-
public class RowColPositionCache extends Object
Simple positions cache
-
-
Constructor Summary
Constructors Constructor Description RowColPositionCache()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clear cachevoid
clearCacheFromRowCol(int rowCol)
Clear positions cache from specified row/column indexInteger
floorIndex(int rowColIndex)
Get maximal cached row/column index less than specified row/column indexInteger
getMaxIndex()
Get max cached row/column indexInteger
getMinIndex()
Get min cached row/column indexInteger
getRowColPositionCache(int rowCol)
Get position of specified row/column from cacheCollection<Integer>
getSortedKeysCollection()
Get sorted collection of cached values' keysInteger
highIndex(int rowColIndex)
Get minimal cached row/column index greater than specified row/column indexvoid
setRowColPositionCache(int rowCol, int position)
Put position of specified row/column to cache
-
-
-
Method Detail
-
getMaxIndex
public Integer getMaxIndex()
Get max cached row/column index- Returns:
- max cached row/column index
-
getMinIndex
public Integer getMinIndex()
Get min cached row/column index- Returns:
- min cached row/column index
-
setRowColPositionCache
public void setRowColPositionCache(int rowCol, int position)
Put position of specified row/column to cache- Parameters:
rowCol
- - row/column indexposition
- - row/column begin position
-
getRowColPositionCache
public Integer getRowColPositionCache(int rowCol)
Get position of specified row/column from cache- Parameters:
rowCol
- - row/column index- Returns:
- position of specified row/column or null if not cached yet
-
clearCacheFromRowCol
public void clearCacheFromRowCol(int rowCol)
Clear positions cache from specified row/column index- Parameters:
rowCol
- = row/column index
-
clearCache
public void clearCache()
Clear cache
-
getSortedKeysCollection
public Collection<Integer> getSortedKeysCollection()
Get sorted collection of cached values' keys- Returns:
- sorted collection of cached values' keys
-
floorIndex
public Integer floorIndex(int rowColIndex)
Get maximal cached row/column index less than specified row/column index- Parameters:
rowColIndex
- - row/column index- Returns:
- maximal cached row/column index less than specified row/column index or null if not found
-
highIndex
public Integer highIndex(int rowColIndex)
Get minimal cached row/column index greater than specified row/column index- Parameters:
rowColIndex
- - row/column index- Returns:
- maximal cached row/column index less than specified row/column index or null if not found
-
-