shared
Class Item
java.lang.Object
shared.Item
- All Implemented Interfaces:
- java.io.Serializable
public class Item
- extends java.lang.Object
- implements java.io.Serializable
- See Also:
- Serialized Form
|
Constructor Summary |
Item(java.lang.String name,
java.net.URL adress,
long votes,
long itemId)
constructor to instantiate the class Item |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Item
public Item(java.lang.String name,
java.net.URL adress,
long votes,
long itemId)
- constructor to instantiate the class Item
- Parameters:
name - adress - votes -
getName
public java.lang.String getName()
- Returns:
- the name of the item example: beer, hamburger,...
getAdress
public java.net.URL getAdress()
- Returns:
- the URI (URL) from an item
getCount
public static int getCount()
- Returns:
- how often this class has been instantiated
getVotes
public long getVotes()
- Returns:
- the number of votes for an item
getItemId
public long getItemId()
- Returns:
- the unique id for this item
toString
public java.lang.String toString()
- for selectbox issues
- Overrides:
toString in class java.lang.Object
- Returns:
- the item name