code: public Vector2i setComponent(int component, int value) throws IllegalArgumentException {
          switch (component) {
              case 0:
                  x = value;
                  break;
              case 1:
                  y = value;
                  break;
              default:
                  throw new IllegalArgumentException();
          }
          return this;
      }
docs: Set the value of the specified component of this vector.
  
  @param component
  the component whose value to set, within <code>[0..1]</code>
  @param value
  the value to set
  @return this
  @throws IllegalArgumentException if <code>component</code> is not within <code>[0..1]</code>