org.eclipse.emf.ecp.internal.core.util
Class Properties
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.emf.ecp.internal.core.util.Registry<Map.Entry<String,String>,ECPPropertiesObserver>
org.eclipse.emf.ecp.internal.core.util.Properties
- All Implemented Interfaces:
- ECPProperties, ECPDisposable.DisposeListener, org.eclipse.net4j.util.event.INotifier, org.eclipse.net4j.util.lifecycle.ILifecycle, org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation
public class Properties
- extends Registry<Map.Entry<String,String>,ECPPropertiesObserver>
- implements ECPProperties
- Author:
- Eike Stepper
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle |
org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation |
Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle |
USE_LABEL |
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle |
activate, deactivate, getLifecycleState, isActive, isDeferredActivation, toString |
Methods inherited from class org.eclipse.net4j.util.event.Notifier |
addListener, fireEvent, fireEvent, fireEvent, getListeners, hasListeners, removeListener |
Methods inherited from interface org.eclipse.net4j.util.event.INotifier |
addListener, getListeners, hasListeners, removeListener |
Properties
public Properties()
- Default constructor.
Properties
public Properties(ObjectInput in)
throws IOException
- Throws:
IOException
write
public void write(ObjectOutput out)
throws IOException
- Throws:
IOException
addProperty
public void addProperty(String key,
String value)
- Adds a key-value-pair.
- Specified by:
addProperty
in interface ECPProperties
- Parameters:
key
- the key of the propertyvalue
- the value of the property
removeProperty
public void removeProperty(String key)
- Removes a property.
- Specified by:
removeProperty
in interface ECPProperties
- Parameters:
key
- of the property to remove
getValue
public String getValue(String name)
- Get the value of a property identified by this key.
- Specified by:
getValue
in interface ECPProperties
- Parameters:
name
- the key of the property to find
- Returns:
- the value of the property identified by the key or null
getKeys
public Set<String> getKeys()
- All stored keys.
- Specified by:
getKeys
in interface ECPProperties
- Returns:
- an array of all keys
getProperties
public Collection<Map.Entry<String,String>> getProperties()
- All Properties.
- Specified by:
getProperties
in interface ECPProperties
- Returns:
- an array of Key-Value-Pairs
hasProperties
public boolean hasProperties()
- Whether any properties are stored.
- Specified by:
hasProperties
in interface ECPProperties
- Returns:
- true if at least 1 property was added, false otherwise
copy
public ECPProperties copy()
- Creates a copy of the current set of properties.
- Specified by:
copy
in interface ECPProperties
- Returns:
- the copy of the current properties
Copyright © 2015. All Rights Reserved.