Module simpa.core

Enum Class OutputFileFormat

java.lang.Object
java.lang.Enum<OutputFileFormat>
simpa.core.api.OutputFileFormat
All Implemented Interfaces:
Serializable, Comparable<OutputFileFormat>, Constable

public enum OutputFileFormat extends Enum<OutputFileFormat>
Enum for some output files. These files are usually taken as an input for some electromagnetic field calculation software like Opera or COMSOL, etc. as input file to get out the field values at the specified points.
  • Enum Constant Details

    • PLAINTEXT

      public static final OutputFileFormat PLAINTEXT
      An enum to categorize a plaintext file.
    • OPERA3D

      public static final OutputFileFormat OPERA3D
      An enum to categorize an Opera3D file.
  • Method Details

    • values

      public static OutputFileFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OutputFileFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getOpera3DHeader

      public static String getOpera3DHeader(int nPoints, LengthUnit lengthUnit)
      Gets a header specific for use of a file in Opera3D.
      Parameters:
      nPoints - The number of points.
      lengthUnit - The length unit.
      Returns:
      The generated header as a String.
    • parse

      public static OutputFileFormat parse(String s)
      Parses the string to the correct enum.
      Parameters:
      s - string version of the output format
      Returns:
      the enum for the output format