EMap of EMaps [message #403406] |
Wed, 06 September 2006 19:09 |
Eclipse User |
|
|
|
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 |
Ed Merks 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/
|
|
|
Powered by
FUDForum. Page generated in 0.02979 seconds