cz.cuni.amis.pogamut.ut2004.communication.messages
Class ItemType

Package class diagram package ItemType
java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType
All Implemented Interfaces:
Serializable, Comparable<ItemType>
Direct Known Subclasses:
UT2004ItemType

public abstract class ItemType
extends Object
implements Serializable, Comparable<ItemType>

Abastract Type of the item.

Note: Items of the same type might have different names in UT engine. Always use equals(Object) to safely compare two ItemTypes.

Use getCategory() to obtain basic categorization of items.

Use getGroup() to obtain detailed group info of items.

Comparable according to getName().

Author:
Juraj 'Loque' Simlovic, Jimmy
See Also:
Serialized Form

Nested Class Summary
static class ItemType.Category
           
static interface ItemType.Group
           
 
Field Summary
static cz.cuni.amis.utils.maps.HashMapSet<ItemType.Category,ItemType> CATEGORIES
          Contains item types that belongs to their categories.
 
Constructor Summary
ItemType()
           
 
Method Summary
abstract  boolean equals(Object obj)
          Indicates whether some other ItemType is "equal to" this one.
abstract  ItemType.Category getCategory()
          Retrieves category of the item type.
abstract  ItemType.Group getGroup()
          Retrieves group of the item type.
abstract  String getName()
           
abstract  int hashCode()
          Returns a hash code value for the object.
abstract  String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

CATEGORIES

public static final cz.cuni.amis.utils.maps.HashMapSet<ItemType.Category,ItemType> CATEGORIES
Contains item types that belongs to their categories.

Constructor Detail

ItemType

public ItemType()
Method Detail

toString

public abstract String toString()
Overrides:
toString in class Object

getCategory

public abstract ItemType.Category getCategory()
Retrieves category of the item type.

Returns:
String representing the category of the item.

getGroup

public abstract ItemType.Group getGroup()
Retrieves group of the item type.

Returns:
String representing the group of the item.

equals

public abstract boolean equals(Object obj)
Indicates whether some other ItemType is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - Object to be compared with.
Returns:
True, if the objects are equal.

hashCode

public abstract int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object
Returns:
A hash code value for this object.

getName

public abstract String getName()


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.