public abstract class AbstractItem extends AbstractItemHierarchy implements IItem
IItem
and takes care of implementing
methods for ItemHierarchy
for items representing itself.ItemHierarchy.Observer
Constructor and Description |
---|
AbstractItem() |
AbstractItem(Context context,
AttributeSet attrs) |
Modifier and Type | Method and Description |
---|---|
ItemHierarchy |
findItemById(int id)
Find an item hierarchy within this hierarchy which has the given ID.
|
int |
getCount() |
IItem |
getItemAt(int position)
Get the item at position.
|
getId, notifyChanged, registerObserver, setId, unregisterObserver
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLayoutResource, isEnabled, onBindView
public AbstractItem()
public AbstractItem(Context context, AttributeSet attrs)
public int getCount()
getCount
in interface ItemHierarchy
public IItem getItemAt(int position)
ItemHierarchy
getItemAt
in interface ItemHierarchy
position
- An integer from 0 to ItemHierarchy.getCount()
}, which indicates the position in
this item hierarchy to get the child item.position
. Must not be null
.public ItemHierarchy findItemById(int id)
ItemHierarchy
findItemById
in interface ItemHierarchy
id
- An ID to search for in this item hierarchy.