© 2006-2007 ETH Zurich

org.ximtec.igesture.core.composite
Class CardinalityUserConstraint

java.lang.Object
  extended by org.ximtec.igesture.core.DefaultPropertyChangeNotifier
      extended by org.ximtec.igesture.core.DefaultDataObject
          extended by org.ximtec.igesture.core.composite.DefaultConstraint
              extended by org.ximtec.igesture.core.composite.IntervalConstraint
                  extended by org.ximtec.igesture.core.composite.CardinalityDeviceConstraint
                      extended by org.ximtec.igesture.core.composite.CardinalityUserConstraint
All Implemented Interfaces:
Serializable, Constraint, DataObject, PropertyChangeNotifier

public class CardinalityUserConstraint
extends CardinalityDeviceConstraint

This class represents a cardinality constraint. A certain gesture has to be performed between a mimimum and a maximum number of times within a certain time interval. The main example for this kind of constraint is defining a majority. Each user has only one vote.

Author:
Bjorn Puype, bpuype@gmail.com
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.ximtec.igesture.core.composite.CardinalityDeviceConstraint
CardinalityDeviceConstraint.Config
 
Field Summary
 
Fields inherited from class org.ximtec.igesture.core.composite.DefaultConstraint
DEFAULT_CONFIGURATION, df, gestures, gestureTime, processingTime, PROPERTY_GESTURES, setterMapping
 
Fields inherited from class org.ximtec.igesture.core.DefaultDataObject
PROPERTY_ID
 
Fields inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier
propertyChangeSupport
 
Constructor Summary
CardinalityUserConstraint()
           
 
Method Summary
 String toString()
           
 boolean validateConditions(List<Gesture<?>> gestures, IDeviceManager manager)
          Validate the constraint conditions.
 
Methods inherited from class org.ximtec.igesture.core.composite.CardinalityDeviceConstraint
addGestureClass, addGestureClass, addGestureClass, addGestureClass, generatePatterns, getMaximumGestures, getMinimumGestures, setMaximumGestures, setMinimumGestures
 
Methods inherited from class org.ximtec.igesture.core.composite.IntervalConstraint
determineTimeWindows, getDuration, setDuration
 
Methods inherited from class org.ximtec.igesture.core.composite.DefaultConstraint
getDistinctGestureClasses, getGestureClasses, getGestureEntries, getGestureTime, getNumberOfGestures, getParameter, getParameters, getTimeStamp, removeAllGestureClasses, removeGestureClass, setGestureTime, setParameter
 
Methods inherited from class org.ximtec.igesture.core.DefaultDataObject
accept, getId, setId
 
Methods inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ximtec.igesture.core.PropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

CardinalityUserConstraint

public CardinalityUserConstraint()
Method Detail

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 CardinalityDeviceConstraint
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 CardinalityDeviceConstraint

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.