Class JDFNumberList

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Object>, Collection<Object>, List<Object>, RandomAccess, JDFBaseDataTypes

public class JDFNumberList extends JDFNumList
This class is a representation of a number list (JDFNumberList). It is a whitespace separated list of double values.
See Also:
  • Constructor Details

  • Method Details

    • createNumberList

      public static JDFNumberList createNumberList(String s)
      factory for JDFNumberList that silently returns null in case of illegal strings
      Parameters:
      s - the string to parse
      Returns:
      the JDFNumberList, null if s is not compatible
    • isValid

      public boolean isValid() throws DataFormatException
      isValid - true if all instances are Double types
      Specified by:
      isValid in class JDFNumList
      Returns:
      boolean - true if all instances are Double or Integer types
      Throws:
      DataFormatException - - if the Vector has not a valid format
    • add

      public void add(double x)
      add - add a double value to the vector
      Parameters:
      x - the double value
    • add

      public void add(String s) throws DataFormatException
      add - adds a number list to the already existing number list
      Parameters:
      s - the given string
      Throws:
      DataFormatException - - if the String has not a valid format
    • contains

      public boolean contains(double d)
      return true if at least one value in the list is d
      Parameters:
      d - the value to search
      Returns: