addBehavior(behavior) {
    var behaviorSet;
    var behaviors = this.behaviors[behavior.name];
    var behaviorType;
    if (!behaviors) {
      behaviors = this.behaviors[behavior.name] = {
        tick: {
          inUse: false,
          array: [],
          markedForRemoval: []
        },
        tock: {
          inUse: false,
          array: [],
          markedForRemoval: []
        }
      };
    }

    // Check if behavior has tick and/or tock and add the behavior to the appropriate list.
    for (behaviorType in behaviors) {
      if (!behavior[behaviorType]) {
        continue;
      }
      behaviorSet = behaviors[behaviorType];

      // In case the behaviorSet is in use, make sure this behavior isn't on the removal list.
      if (behaviorSet.inUse) {
        var index = behaviorSet.markedForRemoval.indexOf(behavior);
        if (index !== -1) {
          behaviorSet.markedForRemoval.splice(index, 1);
        }
      }
      // Add behavior to the set
      if (behaviorSet.array.indexOf(behavior) === -1) {
        behaviorSet.array.push(behavior);
      }
    }
  }
Add ticks and tocks.

@param {object} behavior - A component.