eu.xtreemos.xosd.localallocmgr.attributes
Class IAttribute<T>

java.lang.Object
  extended by eu.xtreemos.xosd.localallocmgr.attributes.IAttribute<T>
Type Parameters:
T -
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CurrentAmount, EndTime, MaxAmount, OwnersInfoAttr, Sharing, StartTime

public abstract class IAttribute<T>
extends java.lang.Object
implements java.io.Serializable

Used to store values and to enforce semantics on these values. Each attribute must be represented by its own class. Also, for any attribute that is added to the TTElm, one needs to register the handler and also write a handler for the attribute. Registration goes into "AttributeHandlerStorageFactory"

Author:
urosjovanovic
See Also:
Serialized Form

Field Summary
protected  T value
           
 
Constructor Summary
IAttribute(T val)
           
 
Method Summary
abstract  IAttribute<T> clone()
          needed for copying while making new time table elements from the old ones
 boolean equals(IAttribute<T> attr)
           
 boolean equals(java.lang.Object oattr)
           
 T getValue()
           
 boolean isBasic()
          the basic attributes are only the ones that hold the information about the start and end of the TTElm and the type of sharing (the attributes created by the TTElmFactory object).
abstract  boolean isEmpty()
          returns the information of whether this attribute has a value, that can be disregarded.
 void setValue(T value)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected T value
Constructor Detail

IAttribute

public IAttribute(T val)
Method Detail

getValue

public T getValue()

setValue

public void setValue(T value)

clone

public abstract IAttribute<T> clone()
needed for copying while making new time table elements from the old ones

Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object oattr)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(IAttribute<T> attr)

isEmpty

public abstract boolean isEmpty()
returns the information of whether this attribute has a value, that can be disregarded. This method is called when an element is removed by the attributes - when calling remove request.

Returns:

isBasic

public boolean isBasic()
the basic attributes are only the ones that hold the information about the start and end of the TTElm and the type of sharing (the attributes created by the TTElmFactory object).

Returns: