Java BigDecimal Add add(Vector a, Vector b)

Here you can find the source of add(Vector a, Vector b)

Description

add

License

Open Source License

Declaration



public static Vector<BigDecimal> add(Vector<BigDecimal> a, Vector<BigDecimal> b) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.math.BigDecimal;

import java.util.Vector;

public class Main {
    /***                         ***/
// w ww .  j a va 2  s.c o  m
    // TODO: write vector class that incorporates most vector operations
    public static Vector<BigDecimal> add(Vector<BigDecimal> a, Vector<BigDecimal> b) {
        int m = a.size();
        Vector<BigDecimal> c = new Vector(m);
        for (int i = 0; i < m; i++) {
            BigDecimal value = ((BigDecimal) a.elementAt(i)).add((BigDecimal) b.elementAt(i));
            c.add(value);
        }
        return c;
    }
}

Related

  1. add(BigDecimal... operands)
  2. add(BigDecimal[] item1, BigDecimal[] item2)
  3. add(final BigDecimal baseAmount, final BigDecimal amountToAdd)
  4. add(final BigDecimal start, final BigDecimal... values)
  5. add(final BigDecimal v1, final BigDecimal v2)
  6. add2Abs(BigDecimal aValue1, BigDecimal aValue2)
  7. addBigDec(BigDecimal b1, BigDecimal b2)
  8. addBigDecimal(BigDecimal a, BigDecimal b)
  9. addBigDecimals(String value1, String value2)