Exemple #1
0
  /**
   * Method put places the values of the given tuple into the positions specified by the fields
   * argument. The declarator Fields value declares the fields in this Tuple instance.
   *
   * @param declarator of type Fields
   * @param fields of type Fields
   * @param tuple of type Tuple
   */
  public void put(Fields declarator, Fields fields, Tuple tuple) {
    verifyModifiable();

    int[] pos = getPos(declarator, fields);

    for (int i = 0; i < pos.length; i++) internalSet(pos[i], tuple.getObject(i));
  }
Exemple #2
0
  /**
   * Method setAll sets each element value of the given Tuple instance into the corresponding
   * position of this instance.
   *
   * @param tuple of type Tuple
   */
  public void setAll(Tuple tuple) {
    verifyModifiable();

    if (tuple == null) return;

    for (int i = 0; i < tuple.elements.size(); i++) internalSet(i, tuple.elements.get(i));
  }
Exemple #3
0
  /**
   * Method setAll sets each element value of the given Tuple instances into the corresponding
   * position of this instance.
   *
   * <p>All given tuple instances after the first will be offset by the length of the prior tuple
   * instances.
   *
   * @param tuples of type Tuple[]
   */
  public void setAll(Tuple... tuples) {
    verifyModifiable();

    if (tuples.length == 0) return;

    int pos = 0;
    for (int i = 0; i < tuples.length; i++) {
      Tuple tuple = tuples[i];

      if (tuple == null) // being defensive
      continue;

      for (int j = 0; j < tuple.elements.size(); j++) internalSet(pos++, tuple.elements.get(j));
    }
  }
Exemple #4
0
  /**
   * Method setString sets the given value to the given index position in this instance.
   *
   * @param index of type int
   * @param value of type String
   */
  public void setString(int index, String value) {
    verifyModifiable();

    internalSet(index, value);
  }
Exemple #5
0
  /**
   * Method setDouble sets the given value to the given index position in this instance.
   *
   * @param index of type int
   * @param value of type double
   */
  public void setDouble(int index, double value) {
    verifyModifiable();

    internalSet(index, value);
  }
Exemple #6
0
  /**
   * Method setFloat sets the given value to the given index position in this instance.
   *
   * @param index of type int
   * @param value of type float
   */
  public void setFloat(int index, float value) {
    verifyModifiable();

    internalSet(index, value);
  }
Exemple #7
0
  /**
   * Method setInteger sets the given value to the given index position in this instance.
   *
   * @param index of type int
   * @param value of type int
   */
  public void setInteger(int index, int value) {
    verifyModifiable();

    internalSet(index, value);
  }
Exemple #8
0
  /**
   * Method setShort sets the given value to the given index position in this instance.
   *
   * @param index of type int
   * @param value of type short
   */
  public void setShort(int index, short value) {
    verifyModifiable();

    internalSet(index, value);
  }
Exemple #9
0
  /**
   * Method setBoolean sets the given value to the given index position in this instance.
   *
   * @param index of type int
   * @param value of type boolean
   */
  public void setBoolean(int index, boolean value) {
    verifyModifiable();

    internalSet(index, value);
  }
Exemple #10
0
  /**
   * Method set sets the given value to the given index position in this instance.
   *
   * @param index of type int
   * @param value of type Object
   */
  public void set(int index, Object value) {
    verifyModifiable();

    internalSet(index, value);
  }