Class XmlTripleFactory<T extends Triple>

java.lang.Object
xml.factories.attribute.XmlFactoryFromAttribute<T>
xml.factories.attribute.XmlTripleFactory<T>

public class XmlTripleFactory<T extends Triple>
extends XmlFactoryFromAttribute<T>
Constructs Triples from XML attributes, according to the given DoubleTriFunction.
  • Constructor Summary

    Constructors
    Constructor Description
    XmlTripleFactory​(DoubleTriFunction<T> creator)
    Construct a triple factory which will create instances of the type returned by creator.
  • Method Summary

    Modifier and Type Method Description
    protected T create​(java.lang.String attribute)
    Constructs a new Triple from an XML attribute string.

    Methods inherited from class xml.factories.attribute.XmlFactoryFromAttribute

    create, create

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • XmlTripleFactory

      public XmlTripleFactory​(DoubleTriFunction<T> creator)
      Construct a triple factory which will create instances of the type returned by creator.
      Parameters:
      creator - A function which receives three doubles and returns a new Triple.
  • Method Details

    • create

      protected T create​(java.lang.String attribute)
      Constructs a new Triple from an XML attribute string.
      Specified by:
      create in class XmlFactoryFromAttribute<T extends Triple>
      Parameters:
      attribute - The XML attribute, in the form "x y z" where x, y, and z are doubles.
      Returns:
      A new triple with the given coordinates.
      Throws:
      XmlParserException - if the input string was malformed.