|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.bonn.cs.sems.impl.context.ContextCommons
public abstract class ContextCommons
This is a helper superclass providing common helper methods to its subclasses Intended to be a superclass for context interface implementations
Field Summary | |
---|---|
static java.util.Comparator<Context> |
idComparator
Can be used to compare two contexts by Id Typical use is sorting |
Fields inherited from interface edu.bonn.cs.sems.model.context.Context |
---|
SENSOR_BROWSER_MOBILITY, SENSOR_BROWSER_ORIENTATION, SENSOR_BROWSER_SCREEN_DIMENSION, SENSOR_CONNECTION_SPEED, SENSOR_REGION, SENSOR_TIME_DAY, SENSOR_TIME_DAYOFWEEK, SENSOR_TIME_HOUR, SENSOR_TIME_MINUTE, SENSOR_TIME_MONTH, SENSOR_TIME_YEAR, SENSOR_TIME_ZONE, SENSOR_USER_AGE, SENSOR_USER_GENDER, SENSOR_USER_LANGUAGE |
Method Summary | |
---|---|
int |
compareTo(Context otherObject)
|
boolean |
equals(java.lang.Object o)
Compares this Context with another Object |
java.lang.String |
getDescription()
Gets the simple description of the context |
Context[] |
getFlatContexts()
Creates a new context which sensor values are merged from the current one recursively together with the sub contexts' values. |
java.util.List<Context> |
getFlatContextsAsList()
Creates a new context which sensor values are merged from the current one recursively together with the sub contexts' values. |
java.lang.String |
getId()
Gets the id of the context |
int |
hashCode()
|
boolean |
inContext(Context otherContext)
Tests if this context is included in another context |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.bonn.cs.sems.model.context.Context |
---|
addSubContext, addValue, getSensors, getSubContexts, getValue, getValues, isExclusiveSubContexts, removeSubContext, removeValue, setExclusiveSubContexts |
Field Detail |
---|
public static final java.util.Comparator<Context> idComparator
Method Detail |
---|
public java.lang.String getId()
Context
getId
in interface Context
public java.lang.String getDescription()
Context
getDescription
in interface Context
public int compareTo(Context otherObject)
compareTo
in interface java.lang.Comparable<Context>
public Context[] getFlatContexts()
Context
getFlatContexts
in interface Context
public java.util.List<Context> getFlatContextsAsList()
Context
getFlatContextsAsList
in interface Context
public boolean inContext(Context otherContext)
Context
inContext
in interface Context
otherContext
- The other Context this context is compared against
public boolean equals(java.lang.Object o)
Context
equals
in interface Context
equals
in class java.lang.Object
o
- Another object, e.g. another Context
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |