public class CachedIListPage extends Object
| Constructor and Description |
|---|
CachedIListPage(int capacity,
long id)
Constructor for the CachedIListPage object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCachedIListItem(CachedIListItem item)
Adds a new item to the page.
|
long |
capacity()
Returns the capacity of the page.
|
long |
getId()
Gets the page id.
|
CachedIListItem |
getIListItem(int id)
Gets an item on the requested position.
|
boolean |
isFull()
Checks whether the page is full.
|
long |
maxId()
Returns the ID of last stored item or -1 if the page is empty.
|
long |
size()
Returns the number of items in the page.
|
public CachedIListPage(int capacity,
long id)
capacity - capacity of the pageid - id of the pagepublic boolean addCachedIListItem(CachedIListItem item)
item - item to add to page.public CachedIListItem getIListItem(int id)
id - position of the requested itempublic long getId()
public boolean isFull()
public long size()
public long capacity()
public long maxId()
Copyright © 2016 Egothor. All Rights Reserved.