Package com._1c.g5.v8.dt.moxel.ui.editor
Class RowPositionCache
- java.lang.Object
-
- com._1c.g5.v8.dt.moxel.ui.editor.RowPositionCache
-
- All Implemented Interfaces:
IRowPositionCache
public class RowPositionCache extends Object implements IRowPositionCache
Simple implementation of rows positions cache
-
-
Constructor Summary
Constructors Constructor Description RowPositionCache()
Creates new instance ofRowPositionCache
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clear cache of rows positionsvoid
clearCacheFromRow(int row)
Clear cache of rows positions after specified rowInteger
floorIndex(int rowIndex)
Get maximal cached row index, less than specifiedInteger
getRowPositionCache(int row)
Get position of specified row from cacheCollection<Integer>
getSortedKeysCollection()
Get sorted collection of cached positionsInteger
highIndex(int rowIndex)
Get minimal cached row index, greater than specifiedvoid
setRowPositionCache(int row, int position)
Put position of specified row to cache
-
-
-
Constructor Detail
-
RowPositionCache
public RowPositionCache()
Creates new instance ofRowPositionCache
-
-
Method Detail
-
setRowPositionCache
public void setRowPositionCache(int row, int position)
Description copied from interface:IRowPositionCache
Put position of specified row to cache- Specified by:
setRowPositionCache
in interfaceIRowPositionCache
- Parameters:
row
- - row indexposition
- - row position (in units)
-
getRowPositionCache
public Integer getRowPositionCache(int row)
Description copied from interface:IRowPositionCache
Get position of specified row from cache- Specified by:
getRowPositionCache
in interfaceIRowPositionCache
- Parameters:
row
- - row index- Returns:
- position of specified row (in units)
-
clearCacheFromRow
public void clearCacheFromRow(int row)
Description copied from interface:IRowPositionCache
Clear cache of rows positions after specified row- Specified by:
clearCacheFromRow
in interfaceIRowPositionCache
- Parameters:
row
- - row index
-
clearCache
public void clearCache()
Description copied from interface:IRowPositionCache
Clear cache of rows positions- Specified by:
clearCache
in interfaceIRowPositionCache
-
getSortedKeysCollection
public Collection<Integer> getSortedKeysCollection()
Description copied from interface:IRowPositionCache
Get sorted collection of cached positions- Specified by:
getSortedKeysCollection
in interfaceIRowPositionCache
- Returns:
- sorted collection of cached positions (in units)
-
floorIndex
public Integer floorIndex(int rowIndex)
Description copied from interface:IRowPositionCache
Get maximal cached row index, less than specified- Specified by:
floorIndex
in interfaceIRowPositionCache
- Parameters:
rowIndex
- - row index- Returns:
- maximal cached row index, less than specified or null if no index found
-
highIndex
public Integer highIndex(int rowIndex)
Description copied from interface:IRowPositionCache
Get minimal cached row index, greater than specified- Specified by:
highIndex
in interfaceIRowPositionCache
- Parameters:
rowIndex
- - row index- Returns:
- minimal cached row index, greater than specified or null if no index found
-
-