XJep xj = new XJep();
PolynomialCreator pc = new PolynomialCreator(xj);
String eqn = "3(x + 0)(x + 1) + 5(x + 0)";
Node n1 = xj.parse(eqn);
Node n2 = pc.expand(n1);
xj.println(n2);
String s = "1.0 + 1.71(x - 0.0) + 1.47(x - 0.0)(x - 1.0) + 0.84(x - 0.0)(x - 1.0)(x - 2.0)";
Node node = j.parse(s);
PNodeI pnode = pc.createPoly(node);
PNodeI pnode2 = pnode.expand();
System.out.println(pnode2);
Beyond that you can examine the actual date returned pc.createPoly. This gives of the actuall coefficients and you could look at this to dispaly the desired expression.
Hope that helps
Richard