org.andromda.core.mapping
Class Mapping

java.lang.Object
  extended by org.andromda.core.mapping.Mapping

public class Mapping
extends Object

A single child mapping instance belonging to a Mappings instance. It doesn't make sense to instantiate this class by itself.

Author:
Chad Brandon, Wouter Zoons
See Also:
Mappings

Constructor Summary
Mapping()
           
 
Method Summary
 void addFrom(String from)
          Adds the from type to the mapping.
 void addPath(String path)
          Adds the path to the listof paths.
 Collection<String> getFroms()
          Return the Collection of froms.
 String getTo()
          Returns the to type for this mapping.
(package private)  void setMappings(Mappings mappings)
          Sets the mappings to which this Mapping instance belongs.
 void setTo(String to)
          Sets the type for this mapping.
 String toString()
          Returns a String representation of this mapping in the form of from1, from2, from3 --> to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Mapping

public Mapping()
Method Detail

addFrom

public void addFrom(String from)
Adds the from type to the mapping.

Parameters:
from - the type that we are mapping from.

getFroms

public Collection<String> getFroms()
Return the Collection of froms.

Returns:
Collection

getTo

public String getTo()
Returns the to type for this mapping.

Returns:
String the to type

addPath

public void addPath(String path)
Adds the path to the listof paths.

Parameters:
path -

setTo

public void setTo(String to)
Sets the type for this mapping.

Parameters:
to - the value to which the from values are mapped.

setMappings

final void setMappings(Mappings mappings)
Sets the mappings to which this Mapping instance belongs.

Parameters:
mappings - the owning mappings.

toString

public String toString()
Returns a String representation of this mapping in the form of from1, from2, from3 --> to.

Overrides:
toString in class Object
Returns:
a String representing the mapping instance


Copyright © 2003-2012 AndroMDA.org. All Rights Reserved.