org.eclipse.emf.emfstore.internal.server.conflictDetection
Class FeatureNameReservationMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<String,V>
              extended by org.eclipse.emf.emfstore.internal.server.conflictDetection.LinkedHashMapWithConflictBucketCandidate<OppositeReservationMap>
                  extended by org.eclipse.emf.emfstore.internal.server.conflictDetection.FeatureNameReservationMap
All Implemented Interfaces:
Serializable, Cloneable, Map<String,OppositeReservationMap>

public class FeatureNameReservationMap
extends LinkedHashMapWithConflictBucketCandidate<OppositeReservationMap>

Tracks any reservation based an a feature name.

Author:
mkoegel, emueller
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
static String CONTAINER_FEATURE
          The name of the container feature.
static String EXISTENCE_FEATURE
          The name of the existence feature.
 
Constructor Summary
FeatureNameReservationMap()
          Default constructor that does not make a reservation for all feature.
FeatureNameReservationMap(boolean isAllFeatures)
          Constructor.
 
Method Summary
 Set<ConflictBucketCandidate> getAllConflictBucketCandidates()
          Returns all ConflictBucketCandidates.
 Set<ConflictBucketCandidate> getConflictBucketCandidates(String featureName)
          Returns the ConflictBucketCandidates for a given feature name.
 Set<ConflictBucketCandidate> getConflictBucketCandidates(String featureName, String oppositeModelElement)
          Returns the ConflictBucketCandidates for the combination of a feature name and an opposite.
 boolean hasExistenceFeature()
          Whether this reservation map holds a reservation for an existence feature.
 boolean isAllFeatures()
          Whether this reservation map has a reservation for all features.
 
Methods inherited from class org.eclipse.emf.emfstore.internal.server.conflictDetection.LinkedHashMapWithConflictBucketCandidate
getConflictBucketCandidate, setConflictBucketCandidate
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

EXISTENCE_FEATURE

public static final String EXISTENCE_FEATURE
The name of the existence feature.

See Also:
Constant Field Values

CONTAINER_FEATURE

public static final String CONTAINER_FEATURE
The name of the container feature.

See Also:
Constant Field Values
Constructor Detail

FeatureNameReservationMap

public FeatureNameReservationMap(boolean isAllFeatures)
Constructor.

Parameters:
isAllFeatures - whether to make a reservation for all feature

FeatureNameReservationMap

public FeatureNameReservationMap()
Default constructor that does not make a reservation for all feature.

Method Detail

getAllConflictBucketCandidates

public Set<ConflictBucketCandidate> getAllConflictBucketCandidates()
Description copied from class: LinkedHashMapWithConflictBucketCandidate
Returns all ConflictBucketCandidates.

Specified by:
getAllConflictBucketCandidates in class LinkedHashMapWithConflictBucketCandidate<OppositeReservationMap>
Returns:
a set of candidates.

hasExistenceFeature

public boolean hasExistenceFeature()
Whether this reservation map holds a reservation for an existence feature.

Returns:
true, if this reservation holds a reservation for an existence feature, false otherwise

isAllFeatures

public boolean isAllFeatures()
Whether this reservation map has a reservation for all features.

Returns:
true, if this reservation map has a reservation for all features false otherwise

getConflictBucketCandidates

public Set<ConflictBucketCandidate> getConflictBucketCandidates(String featureName)
Returns the ConflictBucketCandidates for a given feature name.

Parameters:
featureName - a feature name
Returns:
a set of ConflictBucketCandidates for the given feature name

getConflictBucketCandidates

public Set<ConflictBucketCandidate> getConflictBucketCandidates(String featureName,
                                                                String oppositeModelElement)
Returns the ConflictBucketCandidates for the combination of a feature name and an opposite.

Parameters:
featureName - a feature name
oppositeModelElement - an additional opposite model element
Returns:
a set of ConflictBucketCandidates


Copyright © 2015. All Rights Reserved.