org.argouml.model
Class AbstractDataTypesHelperDecorator

java.lang.Object
  extended byorg.argouml.model.AbstractDataTypesHelperDecorator
All Implemented Interfaces:
DataTypesHelper
Direct Known Subclasses:
UndoDataTypesHelperDecorator

public abstract class AbstractDataTypesHelperDecorator
extends Object
implements DataTypesHelper

An abstract Decorator for the DataTypesHelper.


Method Summary
 void copyTaggedValues(Object from, Object to)
           
 boolean equalsBRANCHKind(Object kind)
           
 boolean equalsCHOICEKind(Object kind)
           
 boolean equalsDeepHistoryKind(Object kind)
           
 boolean equalsFORKKind(Object kind)
           
 boolean equalsINITIALKind(Object kind)
           
 boolean equalsJOINKind(Object kind)
           
 boolean equalsJUNCTIONKind(Object kind)
           
 boolean equalsShallowHistoryKind(Object kind)
           
 String getBody(Object handle)
          Gets the body of an expression.
protected  DataTypesHelper getComponent()
          The component we are decorating.
 String getLanguage(Object handle)
          Gets the language of an expression.
 String multiplicityToString(Object multiplicity)
          Converts a Multiplicity to a String.
 Object setBody(Object handle, String body)
          Sets the body of an expression.
 Object setLanguage(Object handle, String language)
          Sets the language of an expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getComponent

protected DataTypesHelper getComponent()
The component we are decorating.

Returns:
Returns the component.

copyTaggedValues

public void copyTaggedValues(Object from,
                             Object to)
Specified by:
copyTaggedValues in interface DataTypesHelper
Parameters:
from - source
to - destination
See Also:
DataTypesHelper.copyTaggedValues( java.lang.Object, java.lang.Object)

equalsINITIALKind

public boolean equalsINITIALKind(Object kind)
Specified by:
equalsINITIALKind in interface DataTypesHelper
Parameters:
kind - the pseudostate kind
Returns:
true if this is a initial kind
See Also:
DataTypesHelper.equalsINITIALKind(java.lang.Object)

equalsDeepHistoryKind

public boolean equalsDeepHistoryKind(Object kind)
Specified by:
equalsDeepHistoryKind in interface DataTypesHelper
Parameters:
kind - the pseudostate kind
Returns:
if this is a history kind
See Also:
DataTypesHelper.equalsDeepHistoryKind(java.lang.Object)

equalsShallowHistoryKind

public boolean equalsShallowHistoryKind(Object kind)
Specified by:
equalsShallowHistoryKind in interface DataTypesHelper
Parameters:
kind - the pseudostate kind
Returns:
if this is a shallow history kind
See Also:
DataTypesHelper.equalsShallowHistoryKind(java.lang.Object)

equalsFORKKind

public boolean equalsFORKKind(Object kind)
Specified by:
equalsFORKKind in interface DataTypesHelper
Parameters:
kind - the pseudostate kind
Returns:
if this is a fork kind
See Also:
DataTypesHelper.equalsFORKKind(java.lang.Object)

equalsJOINKind

public boolean equalsJOINKind(Object kind)
Specified by:
equalsJOINKind in interface DataTypesHelper
Parameters:
kind - the pseudostate kind
Returns:
if this is a join kind
See Also:
DataTypesHelper.equalsJOINKind(java.lang.Object)

equalsBRANCHKind

public boolean equalsBRANCHKind(Object kind)
Specified by:
equalsBRANCHKind in interface DataTypesHelper
Parameters:
kind - the pseudostate kind (Choice)
Returns:
if this is a branch-choice kind
See Also:
DataTypesHelper.equalsBRANCHKind(java.lang.Object)

equalsCHOICEKind

public boolean equalsCHOICEKind(Object kind)
Specified by:
equalsCHOICEKind in interface DataTypesHelper
Parameters:
kind - the pseudostate kind (Choice)
Returns:
if this is a branch-choice kind
See Also:
DataTypesHelper.equalsCHOICEKind(java.lang.Object)

equalsJUNCTIONKind

public boolean equalsJUNCTIONKind(Object kind)
Specified by:
equalsJUNCTIONKind in interface DataTypesHelper
Parameters:
kind - the pseudostate kind
Returns:
if this is a junction kind
See Also:
DataTypesHelper.equalsJUNCTIONKind(java.lang.Object)

multiplicityToString

public String multiplicityToString(Object multiplicity)
Description copied from interface: DataTypesHelper
Converts a Multiplicity to a String.

Specified by:
multiplicityToString in interface DataTypesHelper
Parameters:
multiplicity - The Multiplicity to convert.
Returns:
The String representation of multiplicity.
See Also:
DataTypesHelper.multiplicityToString(java.lang.Object)

setBody

public Object setBody(Object handle,
                      String body)
Description copied from interface: DataTypesHelper
Sets the body of an expression. TODO: This operation is fooling the user in thinking that the body of the object is changed. Instead, a new object is created. There is no other way: a MExpression can not be altered, once created! So, this operation returns a newly created object instead.

Specified by:
setBody in interface DataTypesHelper
Parameters:
handle - The expression to modify.
body - The body to set.
Returns:
The newly created expression.
See Also:
DataTypesHelper.setBody(java.lang.Object, java.lang.String)

getBody

public String getBody(Object handle)
Description copied from interface: DataTypesHelper
Gets the body of an expression.

Specified by:
getBody in interface DataTypesHelper
Parameters:
handle - The expression to get.
Returns:
The body (a String).
See Also:
DataTypesHelper.getBody(java.lang.Object)

setLanguage

public Object setLanguage(Object handle,
                          String language)
Description copied from interface: DataTypesHelper
Sets the language of an expression. TODO: This operation is fooling the user in thinking that the body of the object is changed. Instead, a new object is created. There is no other way: a MExpression can not be altered, once created! So, this operation returns a newly created object instead.

Specified by:
setLanguage in interface DataTypesHelper
Parameters:
handle - The expression.
language - The new language.
Returns:
The newly created Object.
See Also:
DataTypesHelper.setLanguage(java.lang.Object, java.lang.String)

getLanguage

public String getLanguage(Object handle)
Description copied from interface: DataTypesHelper
Gets the language of an expression.

Specified by:
getLanguage in interface DataTypesHelper
Parameters:
handle - The expression to get.
Returns:
The language (a String).
See Also:
DataTypesHelper.getLanguage(java.lang.Object)


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Cookbook