private static Map<ActionType, List<ObjectAction>> createObjectActionsByType() {
   final Map<ActionType, List<ObjectAction>> map = Maps.newHashMap();
   for (final ActionType type : ActionType.values()) {
     map.put(type, Lists.<ObjectAction>newArrayList());
   }
   return map;
 }
  protected void sortCacheAndUpdateActions(final List<ObjectAction> objectActions) {
    final List<ObjectAction> orderedActions = sortActions(objectActions);
    synchronized (this.objectActions) {
      this.objectActions.clear();
      this.objectActions.addAll(orderedActions);

      for (final ActionType type : ActionType.values()) {
        final List<ObjectAction> objectActionForType = objectActionsByType.get(type);
        objectActionForType.clear();
        objectActionForType.addAll(
            Collections2.filter(objectActions, ObjectAction.Predicates.ofType(type)));
      }
    }
  }