org.android.activityminer.model.activitylabels
Class ActivityLabelMap

Package class diagram package ActivityLabelMap
java.lang.Object
  extended by android.support.v4.util.LongSparseArray<ActivityLabel>
      extended by org.android.activityminer.model.activitylabels.ActivityLabelMap
All Implemented Interfaces:
Cloneable

public class ActivityLabelMap
extends android.support.v4.util.LongSparseArray<ActivityLabel>

A map to store activity references for a quick access by the activity name


Constructor Summary
ActivityLabelMap()
          Constructor
ActivityLabelMap(Collection<ActivityLabel> labels)
          Constructor
ActivityLabelMap(android.support.v4.util.LongSparseArray<String> classId2NameMapping)
          Constructor
 
Method Summary
 boolean containsActivityWithName(String name)
          Method to test if an activity label with the given name exits
 List<ActivityLabel> getActivityLabelsOrdered()
          Getter for the labels in an hierarchical order
 List<ActivityLabel> getActivityLabelsWithoutPredecessor()
          Getter for all activity labels without predecessors
 ActivityLabel[] getPossiblePredecessorsFor(ActivityLabel activityLabel)
          Getter for possible predecessors for an activity label
 
Methods inherited from class android.support.v4.util.LongSparseArray
append, clear, clone, delete, get, get, indexOfKey, indexOfValue, keyAt, put, remove, removeAt, setValueAt, size, toString, valueAt
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActivityLabelMap

public ActivityLabelMap()
Constructor


ActivityLabelMap

public ActivityLabelMap(Collection<ActivityLabel> labels)
Constructor

Parameters:
labels - a collection of activity labels

ActivityLabelMap

public ActivityLabelMap(android.support.v4.util.LongSparseArray<String> classId2NameMapping)
Constructor

Parameters:
classId2NameMapping - the class identifier to name mapping
Method Detail

getActivityLabelsOrdered

public final List<ActivityLabel> getActivityLabelsOrdered()
Getter for the labels in an hierarchical order

Returns:
an ordered list of activity labels

getActivityLabelsWithoutPredecessor

public final List<ActivityLabel> getActivityLabelsWithoutPredecessor()
Getter for all activity labels without predecessors

Returns:
a list with all activity labels without predecessors

getPossiblePredecessorsFor

public final ActivityLabel[] getPossiblePredecessorsFor(ActivityLabel activityLabel)
Getter for possible predecessors for an activity label

Parameters:
activityLabel - the activity label to get possible predecessors for
Returns:
an array with possible predecessor labels

containsActivityWithName

public final boolean containsActivityWithName(String name)
Method to test if an activity label with the given name exits

Parameters:
name - the name
Returns:
true if the name exists, false otherwise