Skip to content

Package: VViewModelProperties

VViewModelProperties

Coverage

1: /**
2: * Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Eugen Neufeld - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.model;
15:
16: import org.eclipse.emf.ecore.EObject;
17:
18: /**
19: * <!-- begin-user-doc -->
20: * A representation of the model object '<em><b>Model Properties</b></em>'.
21: *
22: * @since 1.7
23: * <!-- end-user-doc -->
24: *
25: *
26: * @see org.eclipse.emf.ecp.view.spi.model.VViewPackage#getViewModelProperties()
27: * @model interface="true" abstract="true"
28: * @generated
29: */
30: public interface VViewModelProperties extends EObject {
31:
32:         /**
33:          * Creates new {@link VViewModelProperties properties} which inherit the
34:          * {@link #addInheritableProperty(String, Object)
35:          * inheritable properties} of this object.
36:          *
37:          * @return the new properties
38:          */
39:         VViewModelProperties inherit();
40:
41:         /**
42:          * Returns <code>true</code> if there is either an inherited property or a non-inherited property for the given key.
43:          * Returns <code>false</code> otherwise.
44:          *
45:          * @param key the key to check
46:          * @return whether there is a property for the given key
47:          */
48:         boolean containsKey(String key);
49:
50:         /**
51:          * Returns the property value for the given key or <code>null</code> if there is no property for the given key,
52:          *
53:          * @param key the key to get the value for
54:          * @return the value
55:          */
56:         Object get(String key);
57:
58:         /**
59:          * Adds a new inheritable property. Returns the value which has been associated with the given key before the new
60:          * property was added or <code>null</code> if there was no value for the key.
61:          *
62:          * @param key the key to add
63:          * @param value the value to add
64:          * @return the previous value
65:          */
66:         Object addInheritableProperty(String key, Object value);
67:
68:         /**
69:          * Adds a new non-inheritable property. Returns the value which has been associated with the given key before the
70:          * new
71:          * property was added or <code>null</code> if there was no value for the key.
72:          *
73:          * @param key the key to add
74:          * @param value the value to add
75:          * @return the previous value
76:          */
77:         Object addNonInheritableProperty(String key, Object value);
78:
79: } // VViewModelProperties