Java Code Examples for org.apache.commons.math3.exception.util.LocalizedFormats#IMAGINARY_FORMAT

The following examples show how to use org.apache.commons.math3.exception.util.LocalizedFormats#IMAGINARY_FORMAT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Create an instance with a custom imaginary character, a custom number
 * format for the real part, and a custom number format for the imaginary
 * part.
 *
 * @param imaginaryCharacter The custom imaginary character.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryCharacter} is
 * {@code null}.
 * @throws NoDataException if {@code imaginaryCharacter} is an
 * empty string.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(String imaginaryCharacter,
                     NumberFormat realFormat,
                     NumberFormat imaginaryFormat) {
    if (imaginaryCharacter == null) {
        throw new NullArgumentException();
    }
    if (imaginaryCharacter.length() == 0) {
        throw new NoDataException();
    }
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = imaginaryCharacter;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 2
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Create an instance with a custom imaginary character, a custom number
 * format for the real part, and a custom number format for the imaginary
 * part.
 *
 * @param imaginaryCharacter The custom imaginary character.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryCharacter} is
 * {@code null}.
 * @throws NoDataException if {@code imaginaryCharacter} is an
 * empty string.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(String imaginaryCharacter,
                     NumberFormat realFormat,
                     NumberFormat imaginaryFormat)
    throws NullArgumentException, NoDataException {
    if (imaginaryCharacter == null) {
        throw new NullArgumentException();
    }
    if (imaginaryCharacter.length() == 0) {
        throw new NoDataException();
    }
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = imaginaryCharacter;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 3
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Create an instance with a custom imaginary character, a custom number
 * format for the real part, and a custom number format for the imaginary
 * part.
 *
 * @param imaginaryCharacter The custom imaginary character.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryCharacter} is
 * {@code null}.
 * @throws NoDataException if {@code imaginaryCharacter} is an
 * empty string.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(String imaginaryCharacter,
                     NumberFormat realFormat,
                     NumberFormat imaginaryFormat)
    throws NullArgumentException, NoDataException {
    if (imaginaryCharacter == null) {
        throw new NullArgumentException();
    }
    if (imaginaryCharacter.length() == 0) {
        throw new NoDataException();
    }
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = imaginaryCharacter;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 4
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Create an instance with a custom imaginary character, a custom number
 * format for the real part, and a custom number format for the imaginary
 * part.
 *
 * @param imaginaryCharacter The custom imaginary character.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryCharacter} is
 * {@code null}.
 * @throws NoDataException if {@code imaginaryCharacter} is an
 * empty string.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(String imaginaryCharacter,
                     NumberFormat realFormat,
                     NumberFormat imaginaryFormat)
    throws NullArgumentException, NoDataException {
    if (imaginaryCharacter == null) {
        throw new NullArgumentException();
    }
    if (imaginaryCharacter.length() == 0) {
        throw new NoDataException();
    }
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = imaginaryCharacter;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 5
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Create an instance with a custom imaginary character, a custom number
 * format for the real part, and a custom number format for the imaginary
 * part.
 *
 * @param imaginaryCharacter The custom imaginary character.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryCharacter} is
 * {@code null}.
 * @throws NoDataException if {@code imaginaryCharacter} is an
 * empty string.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(String imaginaryCharacter,
                     NumberFormat realFormat,
                     NumberFormat imaginaryFormat)
    throws NullArgumentException, NoDataException {
    if (imaginaryCharacter == null) {
        throw new NullArgumentException();
    }
    if (imaginaryCharacter.length() == 0) {
        throw new NoDataException();
    }
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = imaginaryCharacter;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 6
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Create an instance with a custom imaginary character, a custom number
 * format for the real part, and a custom number format for the imaginary
 * part.
 *
 * @param imaginaryCharacter The custom imaginary character.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryCharacter} is
 * {@code null}.
 * @throws NoDataException if {@code imaginaryCharacter} is an
 * empty string.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(String imaginaryCharacter,
                     NumberFormat realFormat,
                     NumberFormat imaginaryFormat) {
    if (imaginaryCharacter == null) {
        throw new NullArgumentException();
    }
    if (imaginaryCharacter.length() == 0) {
        throw new NoDataException();
    }
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = imaginaryCharacter;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 7
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Create an instance with a custom imaginary character, a custom number
 * format for the real part, and a custom number format for the imaginary
 * part.
 *
 * @param imaginaryCharacter The custom imaginary character.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryCharacter} is
 * {@code null}.
 * @throws NoDataException if {@code imaginaryCharacter} is an
 * empty string.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(String imaginaryCharacter,
                     NumberFormat realFormat,
                     NumberFormat imaginaryFormat)
    throws NullArgumentException, NoDataException {
    if (imaginaryCharacter == null) {
        throw new NullArgumentException();
    }
    if (imaginaryCharacter.length() == 0) {
        throw new NoDataException();
    }
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = imaginaryCharacter;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 8
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Create an instance with a custom imaginary character, a custom number
 * format for the real part, and a custom number format for the imaginary
 * part.
 *
 * @param imaginaryCharacter The custom imaginary character.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryCharacter} is
 * {@code null}.
 * @throws NoDataException if {@code imaginaryCharacter} is an
 * empty string.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(String imaginaryCharacter,
                     NumberFormat realFormat,
                     NumberFormat imaginaryFormat)
    throws NullArgumentException, NoDataException {
    if (imaginaryCharacter == null) {
        throw new NullArgumentException();
    }
    if (imaginaryCharacter.length() == 0) {
        throw new NoDataException();
    }
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = imaginaryCharacter;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 9
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for both real and
 * imaginary parts.
 * @param format the custom format for both real and imaginary parts.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(NumberFormat format) throws NullArgumentException {
    if (format == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = format;
    this.realFormat = format;
}
 
Example 10
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for the real part and a
 * custom number format for the imaginary part.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
  */
public ComplexFormat(NumberFormat realFormat, NumberFormat imaginaryFormat)
    throws NullArgumentException {
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 11
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for the real part and a
 * custom number format for the imaginary part.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
  */
public ComplexFormat(NumberFormat realFormat, NumberFormat imaginaryFormat)
    throws NullArgumentException {
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 12
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for both real and
 * imaginary parts.
 * @param format the custom format for both real and imaginary parts.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(NumberFormat format) throws NullArgumentException {
    if (format == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = format;
    this.realFormat = format;
}
 
Example 13
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for both real and
 * imaginary parts.
 * @param format the custom format for both real and imaginary parts.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(NumberFormat format) throws NullArgumentException {
    if (format == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = format;
    this.realFormat = format;
}
 
Example 14
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for the real part and a
 * custom number format for the imaginary part.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
  */
public ComplexFormat(NumberFormat realFormat, NumberFormat imaginaryFormat)
    throws NullArgumentException {
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 15
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for both real and
 * imaginary parts.
 * @param format the custom format for both real and imaginary parts.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(NumberFormat format) throws NullArgumentException {
    if (format == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = format;
    this.realFormat = format;
}
 
Example 16
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for both real and
 * imaginary parts.
 * @param format the custom format for both real and imaginary parts.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(NumberFormat format) throws NullArgumentException {
    if (format == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = format;
    this.realFormat = format;
}
 
Example 17
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for the real part and a
 * custom number format for the imaginary part.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
  */
public ComplexFormat(NumberFormat realFormat, NumberFormat imaginaryFormat)
    throws NullArgumentException {
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 18
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for both real and
 * imaginary parts.
 * @param format the custom format for both real and imaginary parts.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
 */
public ComplexFormat(NumberFormat format) throws NullArgumentException {
    if (format == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = format;
    this.realFormat = format;
}
 
Example 19
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for the real part and a
 * custom number format for the imaginary part.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
  */
public ComplexFormat(NumberFormat realFormat, NumberFormat imaginaryFormat)
    throws NullArgumentException {
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}
 
Example 20
Source File: ComplexFormat.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create an instance with a custom number format for the real part and a
 * custom number format for the imaginary part.
 * @param realFormat the custom format for the real part.
 * @param imaginaryFormat the custom format for the imaginary part.
 * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
 * @throws NullArgumentException if {@code realFormat} is {@code null}.
  */
public ComplexFormat(NumberFormat realFormat, NumberFormat imaginaryFormat)
    throws NullArgumentException {
    if (imaginaryFormat == null) {
        throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
    }
    if (realFormat == null) {
        throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
    }

    this.imaginaryCharacter = DEFAULT_IMAGINARY_CHARACTER;
    this.imaginaryFormat = imaginaryFormat;
    this.realFormat = realFormat;
}