com.sap.netweaver.bc.uwl
Class ItemTypeCount
java.lang.Object
com.sap.netweaver.bc.uwl.ItemTypeCount
- All Implemented Interfaces:
- Serializable, Comparable
public final class ItemTypeCount
- extends Object
- implements Serializable, Comparable
The ItemTypeCount class contains the item's type name and its count.
- See Also:
- Serialized Form
|
Constructor Summary |
ItemTypeCount(String type)
This constructor creates the object with given item's type name and with count equal to 0. |
ItemTypeCount
public ItemTypeCount(String type)
- This constructor creates the object with given item's type name and with count equal to 0.
- Parameters:
type - the type name of the item.
getCount
public int getCount()
- Returns:
- int the number of items of the type specified by this object.
getItemType
public String getItemType()
- Returns:
- String the type name of the item in question.
setCount
public void setCount(int numberOfItems)
- Parameters:
numberOfItems - the count of items of the tipe specified for this object.
add
public void add(int numberOfItems)
- Parameters:
numberOfItems - the number that needs to be added to the count.
compareTo
public int compareTo(Object arg)
- Specified by:
compareTo in interface Comparable
- Parameters:
obj - the object that needs to be compared against "this".
- Returns:
- int 1 if this.count greater than the count of arg -1 if this.count less than the count of arg and 0 in all other cases.
Note that it does not throw ClassCastException if arg is not an instance of
ItemTypeCount. - See Also:
Object.equals(java.lang.Object)
toString
public String toString()
- This method returns the string representation of this class.
- Overrides:
toString in class Object
- Returns:
- String the concatenation of type name and count.
- See Also:
Object.toString()
Copyright 2009 SAP AG Complete Copyright Notice