uk.co.ribot.easyadapter
Class PositionInfo

java.lang.Object
  extended by uk.co.ribot.easyadapter.PositionInfo

public class PositionInfo
extends Object

This class holds information about the position of an item in the EasyAdapter


Constructor Summary
PositionInfo()
          Constructs an empty PositionInfo object
PositionInfo(int position, boolean first, boolean last)
          Constructs a PositionInfo with: position, first and last
 
Method Summary
 int getPosition()
           
 boolean isFirst()
           
 boolean isLast()
           
 void setFirst(boolean first)
          Sets whether the item is the first one or not
 void setLast(boolean last)
          Sets whether the item is the last one or not
 void setPosition(int position)
          Sets the position of the item
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionInfo

public PositionInfo()
Constructs an empty PositionInfo object


PositionInfo

public PositionInfo(int position,
                    boolean first,
                    boolean last)
Constructs a PositionInfo with: position, first and last

Parameters:
position - the position of the item
first - true if the item is the first
last - true if the item is the last
Method Detail

getPosition

public int getPosition()
Returns:
position of the item in the EasyAdapter

isFirst

public boolean isFirst()
Returns:
true if the item is the first one in the EasyAdapter

isLast

public boolean isLast()
Returns:
true if the item is the last one in the EasyAdapter

setPosition

public void setPosition(int position)
Sets the position of the item

Parameters:
position - position of the item

setFirst

public void setFirst(boolean first)
Sets whether the item is the first one or not

Parameters:
first - true if the item is the first

setLast

public void setLast(boolean last)
Sets whether the item is the last one or not

Parameters:
last - true if the item is the last