Example usage for org.apache.commons.math3.complex ComplexFormat parse

List of usage examples for org.apache.commons.math3.complex ComplexFormat parse

Introduction

In this page you can find the example usage for org.apache.commons.math3.complex ComplexFormat parse.

Prototype

public Complex parse(String source) throws MathParseException 

Source Link

Document

Parses a string to produce a Complex object.

Usage

From source file:org.nmrfx.processor.gui.ComplexOperationItem.java

@Override
public void setFromString(String sValue) {
    ComplexFormat cfTemp = new ComplexFormat();
    Complex oldValue = value;//from w  w  w .j a v a2  s.c o m

    Complex newValue = cfTemp.parse(sValue);
    if (newValue == null) {
        return;
    }

    value = newValue;

    listener.changed(this, complexToString(oldValue), complexToString(value));

}