org.ximtec.igesture.core.composite
Class ConcurrencyConstraint
java.lang.Object
org.ximtec.igesture.core.DefaultPropertyChangeNotifier
org.ximtec.igesture.core.DefaultDataObject
org.ximtec.igesture.core.composite.DefaultConstraint
org.ximtec.igesture.core.composite.ConcurrencyConstraint
- All Implemented Interfaces:
- Serializable, Constraint, DataObject, PropertyChangeNotifier
- Direct Known Subclasses:
- ProximityConcurrencyConstraint
public class ConcurrencyConstraint
- extends DefaultConstraint
This class represents a concurrency constraint, all gestures must be performed in parallel. This means all gestures must
have an overlapping time interval in common.
- Author:
- Bjorn Puype, bpuype@gmail.com
- See Also:
- Serialized Form
| Methods inherited from class org.ximtec.igesture.core.composite.DefaultConstraint |
addGestureClass, addGestureClass, addGestureClass, addGestureClass, getDistinctGestureClasses, getGestureClasses, getGestureEntries, getGestureTime, getNumberOfGestures, getParameter, getParameters, getTimeStamp, removeAllGestureClasses, removeGestureClass, setGestureTime, setParameter |
ConcurrencyConstraint
public ConcurrencyConstraint()
determineTimeWindows
public Map<String,Calendar> determineTimeWindows()
- Description copied from interface:
Constraint
- Determine the time window for each composing gesture.
- Specified by:
determineTimeWindows in interface Constraint- Specified by:
determineTimeWindows in class DefaultConstraint
- Returns:
- Mapping between the gesture name and the corresponding time window.
generatePatterns
public Set<String> generatePatterns(Map<String,String> charMapping)
- Description copied from interface:
Constraint
- Generate all possible string patterns that represent the composite gesture.
- Specified by:
generatePatterns in interface Constraint- Specified by:
generatePatterns in class DefaultConstraint
- Parameters:
charMapping - Mapping between the gesture class name and the character representation
validateConditions
public boolean validateConditions(List<Gesture<?>> gestures,
IDeviceManager manager)
- Description copied from interface:
Constraint
- Validate the constraint conditions.
- Specified by:
validateConditions in interface Constraint- Overrides:
validateConditions in class DefaultConstraint
- Parameters:
gestures - Gestures that possibly compose the composite gesture.manager - Device manager to check the associated users.
- Returns:
toString
public String toString()
- Specified by:
toString in interface Constraint- Overrides:
toString in class DefaultConstraint
Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.