code: public void setAxisValue(int axis, float value) {
          switch (axis) {
              case AXIS_X:
                  x = value;
                  break;
              case AXIS_Y:
                  y = value;
                  break;
              case AXIS_PRESSURE:
                  pressure = value;
                  break;
              case AXIS_SIZE:
                  size = value;
                  break;
              case AXIS_TOUCH_MAJOR:
                  touchMajor = value;
                  break;
              case AXIS_TOUCH_MINOR:
                  touchMinor = value;
                  break;
              case AXIS_TOOL_MAJOR:
                  toolMajor = value;
                  break;
              case AXIS_TOOL_MINOR:
                  toolMinor = value;
                  break;
              case AXIS_ORIENTATION:
                  orientation = value;
                  break;
              default: {
                  if (axis < 0 || axis > 63) {
                      throw new IllegalArgumentException("Axis out of range.");
                  }
                  final long bits = mPackedAxisBits;
                  final long axisBit = 1L << axis;
                  final int index = Long.bitCount(bits & (axisBit - 1L));
                  float[] values = mPackedAxisValues;
                  if ((bits & axisBit) == 0) {
                      if (values == null) {
                          values = new float[INITIAL_PACKED_AXIS_VALUES];
                          mPackedAxisValues = values;
                      } else {
                          final int count = Long.bitCount(bits);
                          if (count < values.length) {
                              if (index != count) {
                                  System.arraycopy(values, index, values, index + 1,
                                          count - index);
                              }
                          } else {
                              float[] newValues = new float[count * 2];
                              System.arraycopy(values, 0, newValues, 0, index);
                              System.arraycopy(values, index, newValues, index + 1,
                                      count - index);
                              values = newValues;
                              mPackedAxisValues = values;
                          }
                      }
                      mPackedAxisBits = bits | axisBit;
                  }
                  values[index] = value;
              }
          }
      }
docs: Sets the value associated with the specified axis.
  
  @param axis  The axis identifier for the axis value to assign.
  @param value The value to set.