public static final class

ActionRegistry.Entry

extends Object
java.lang.Object
   ↳ com.urbanairship.actions.ActionRegistry.Entry

Class Overview

An entry in the action registry.

Summary

Public Methods
Action getActionForSituation(int situation)
Returns an action for a given situation.
Action getDefaultAction()
Gets the default action
List<String> getNames()
Gets the list of registered names for the entry
ActionRegistry.Predicate getPredicate()
Gets the predicate for the entry.
void setDefaultAction(Action action)
Sets the default action.
void setPredicate(ActionRegistry.Predicate predicate)
Sets the predicate for the entry.
void setSituationOverride(int situation, Action action)
Adds an action to be used instead of the default action for a given situation.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public Action getActionForSituation (int situation)

Returns an action for a given situation.

Parameters
situation Situation for the entry
Returns
  • The action defined for the situation override, or the default action

public Action getDefaultAction ()

Gets the default action

Returns
  • The default action

public List<String> getNames ()

Gets the list of registered names for the entry

Returns
  • A list of names

public ActionRegistry.Predicate getPredicate ()

Gets the predicate for the entry.

Returns
  • The entry's predicate, or null if it is not defined

public void setDefaultAction (Action action)

Sets the default action.

Parameters
action The default action for the entry

public void setPredicate (ActionRegistry.Predicate predicate)

Sets the predicate for the entry.

Parameters
predicate A predicate for the entry

public void setSituationOverride (int situation, Action action)

Adds an action to be used instead of the default action for a given situation.

Parameters
situation The situation to override
action Action for the situation

public String toString ()