Class JDFNameRangeList

java.lang.Object
org.cip4.jdflib.datatypes.JDFRangeList
org.cip4.jdflib.datatypes.JDFNameRangeList
All Implemented Interfaces:
JDFBaseDataTypes

public class JDFNameRangeList extends JDFRangeList
This class is a representation of a name range list (JDFNameRangeList). It is a whitespace separated list of name ranges, for example "anna~berta hans~otto"
  • Constructor Details

    • JDFNameRangeList

      public JDFNameRangeList()
      constructs an empty JDFNameRangeList
    • JDFNameRangeList

      public JDFNameRangeList(String s) throws DataFormatException
      constructs a JDFNameRangeList from a given string
      Parameters:
      s - the given string
      Throws:
      DataFormatException - - if the String has not a valid format
    • JDFNameRangeList

      public JDFNameRangeList(JDFNameRangeList rl)
      constructs a JDFNameRangeList from the given JDFNameRangeList
      Parameters:
      rl - the given JDFNameRangeList
  • Method Details

    • createNameRangeList

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

      public void setString(String s) throws DataFormatException
      setString - parse the string and separate all single ranges
      Parameters:
      s - the given string
      Throws:
      DataFormatException - - if the String has not a valid format
    • inRange

      public boolean inRange(String x)
      inRange - returns true if the given string is in range with one of the ranges in the range list (<code
      Parameters:
      x - the given string
      Returns:
      boolean - true if in range, otherwise false
    • append

      public void append(JDFNameRange r)
      append - appends a name range to the range list
      Parameters:
      r - the given name range
    • isUniqueOrdered

      public boolean isUniqueOrdered()
      Description copied from class: JDFRangeList
      isUniqueOrdered - tests if this has only unique values and if the values are ordered
      Specified by:
      isUniqueOrdered in class JDFRangeList
      Returns:
      true if values are unique and ordered, otherwise false
    • isOrdered

      public boolean isOrdered()
      Specified by:
      isOrdered in class JDFRangeList