示例#1
0
  /**
   * Method append appends all the values of the given Tuple instances to a copy of this instance.
   *
   * @param tuples of type Tuple
   * @return Tuple
   */
  public Tuple append(Tuple... tuples) {
    Tuple result = new Tuple(this);

    for (Tuple tuple : tuples) result.addAll(tuple);

    return result;
  }
示例#2
0
  /**
   * Method addAll adds all given values to this instance.
   *
   * @param values of type Comparable...
   */
  public void addAll(Comparable... values) {
    verifyModifiable();

    if (values.length == 1 && values[0] instanceof Tuple) addAll((Tuple) values[0]);
    else Collections.addAll(elements, values);
  }