org.deckfour.xes.model.impl
Class XAttributeDiscreteImpl

java.lang.Object
  extended by org.deckfour.xes.model.impl.XAttributeImpl
      extended by org.deckfour.xes.model.impl.XAttributeDiscreteImpl
All Implemented Interfaces:
Cloneable, Comparable<XAttribute>, XAttributable, XAttribute, XAttributeDiscrete

public class XAttributeDiscreteImpl
extends XAttributeImpl
implements XAttributeDiscrete

This class implements discrete type attributes.

Author:
Christian W. Guenther (christian@deckfour.org)

Constructor Summary
XAttributeDiscreteImpl(String key, long value)
          Creates a new instance.
XAttributeDiscreteImpl(String key, long value, XExtension extension)
          Creates a new instance.
 
Method Summary
 Object clone()
          Attributes must be cloneable.
 long getValue()
          Retrieves the discrete value of this attribute.
 void setValue(long value)
          Assigns the discrete value of this attribute.
 String toString()
           
 
Methods inherited from class org.deckfour.xes.model.impl.XAttributeImpl
compareTo, equals, getAttributes, getExtension, getExtensions, getKey, hashCode, setAttributes
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deckfour.xes.model.XAttribute
getExtension, getKey
 
Methods inherited from interface org.deckfour.xes.model.XAttributable
getAttributes, getExtensions, setAttributes
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

XAttributeDiscreteImpl

public XAttributeDiscreteImpl(String key,
                              long value)
Creates a new instance.

Parameters:
key - The key of the attribute.
value - Value of the attribute.

XAttributeDiscreteImpl

public XAttributeDiscreteImpl(String key,
                              long value,
                              XExtension extension)
Creates a new instance.

Parameters:
key - The key of the attribute.
value - Value of the attribute.
extension - The extension of the attribute.
Method Detail

getValue

public long getValue()
Description copied from interface: XAttributeDiscrete
Retrieves the discrete value of this attribute.

Specified by:
getValue in interface XAttributeDiscrete
Returns:
Value of this attribute.

setValue

public void setValue(long value)
Description copied from interface: XAttributeDiscrete
Assigns the discrete value of this attribute.

Specified by:
setValue in interface XAttributeDiscrete
Parameters:
value - Value of the attribute.

toString

public String toString()
Overrides:
toString in class Object

clone

public Object clone()
Description copied from interface: XAttribute
Attributes must be cloneable.

Specified by:
clone in interface XAttribute
Overrides:
clone in class XAttributeImpl
Returns:
A clone of this attribute.