Esempio n. 1
0
 public void calculate() {
   if (c != null && !c.isRazlomak()) {
     parent.b = c.getA();
     a = (a.multiply(c.getA())).add(b);
     b = BigInteger.valueOf(0);
   } else if (c != null) {
     c.calculate();
     parent.b = c.getA();
     a = (a.multiply(c.getA())).add(b);
     b = BigInteger.valueOf(0);
   } else {
     parent.b = a.add(b);
   }
 }
Esempio n. 2
0
 public BigInteger getValue() {
   if (c != null) {
     if (c.isRazlomak()) c.calculate();
     BigInteger c1 = c.getA();
     BigInteger result = (a.multiply(c1)).add(b);
     return result;
   } else {
     return a.add(b);
   }
 }