public void set(CharBuffer array, int index, T value) {
    Character ordinal = map.get(value);
    if (ordinal == null) {
      final int size = map.size();
      OUTER:
      do {
        for (; addPosition < map.size(); addPosition++) {
          if (list.get(addPosition) == null) {
            ordinal = addEnumValue(value, addPosition);
            break OUTER;
          }
        }
        ordinal = addEnumValue(value, size);
      } while (false);
      addPosition++;
    }
    array.put(index, ordinal);
  }