Package xml.factories.attribute
Class XmlColourFactory
java.lang.Object
public class XmlColourFactory extends XmlFactoryFromAttribute<Colour>
Constructs
Colour
s from XML attributes.-
Constructor Summary
Constructors Constructor Description XmlColourFactory()
-
Method Summary
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
-
XmlColourFactory
public XmlColourFactory()
-
-
Method Details
-
create
Constructs a newColour
from an XML attribute string.- Specified by:
create
in classXmlFactoryFromAttribute<Colour>
- Parameters:
attribute
- The XML attribute, in the form "r g b" where r, g, and b are integers between 0 and 255 representing the red, green, and blue values.- Returns:
- A new colour with the given values.
- Throws:
XmlParserException
- if the input string was malformed.
-