Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMap of EMaps
EMap of EMaps [message #403406] Wed, 06 September 2006 19:09 Go to next message
Eclipse UserFriend
Originally posted by: andrew1.us.ibm.com

Ed - I found an example that you posted on how to create an EMap whose
values are EMaps - back last Nov 2005. One question - you define an
interface X which contains a map. Are the keyType and valueType values
optional in the declaration (see below) since you also specify a mapType
value. I thought one used either mapType or keyType/valueType. I have
the example and can play around with it, but wanted to know what's the
required info in declaring the top level map.

Thanks;

Andy R.


public interface X extends EObject
{
/**
* Returns the value of the '<em><b>Map</b></em>' map.
* The key is of type {@link java.lang.String},
* and the value is of type list of {@link java.util.Map.Entry},
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Map</em>' map isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Map</em>' map.
* @see map.MapPackage#getX_Map()
* @model mapType="map.Y" keyType="java.lang.String"
valueType="java.util.Map.Entry"
* @generated
*/
EMap getMap();

}
Re: EMap of EMaps [message #403409 is a reply to message #403406] Thu, 07 September 2006 12:44 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Andrew,

If the referenced mapType is already defined in the XyzPackage, then the
keyType and the valueType are redundant because they will also be
specified there.


Andrew Roberts wrote:
> Ed - I found an example that you posted on how to create an EMap whose
> values are EMaps - back last Nov 2005. One question - you define an
> interface X which contains a map. Are the keyType and valueType
> values optional in the declaration (see below) since you also specify
> a mapType value. I thought one used either mapType or
> keyType/valueType. I have the example and can play around with it,
> but wanted to know what's the required info in declaring the top level
> map.
>
> Thanks;
>
> Andy R.
>
>
> public interface X extends EObject
> {
> /**
> * Returns the value of the '<em><b>Map</b></em>' map.
> * The key is of type {@link java.lang.String},
> * and the value is of type list of {@link java.util.Map.Entry},
> * <!-- begin-user-doc -->
> * <p>
> * If the meaning of the '<em>Map</em>' map isn't clear,
> * there really should be more of a description here...
> * </p>
> * <!-- end-user-doc -->
> * @return the value of the '<em>Map</em>' map.
> * @see map.MapPackage#getX_Map()
> * @model mapType="map.Y" keyType="java.lang.String"
> valueType="java.util.Map.Entry"
> * @generated
> */
> EMap getMap();
>
> }


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[Announce] EMF 2.2.1 M200608311032 is available
Next Topic:Building EMF
Goto Forum:
  


Current Time: Fri Apr 19 21:35:51 GMT 2024

Powered by FUDForum. Page generated in 0.02979 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top