Package org.cip4.lib.xjdf.type
Class Shape
- java.lang.Object
-
- jakarta.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
-
- org.cip4.lib.xjdf.type.AbstractXJdfType<java.lang.String,Shape>
-
- org.cip4.lib.xjdf.type.Shape
-
public class Shape extends AbstractXJdfType<java.lang.String,Shape>
XML Attributes of type shape are used to describe a three dimensional box. A shape is represented as an array of three (positive or zero) numbers — x y z — specifying the Width x, height y and depth z coordinates of the shape, in that order.
-
-
Constructor Summary
Constructors Constructor Description Shape()Default constructor.Shape(float x, float y)Custom constructor, accepting several values for initializing.Shape(float x, float y, float z)Custom constructor, accepting several values for initializing.Shape(java.lang.String expression)Custom Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetX()Getter for x attribute.floatgetY()Getter for y attribute.floatgetZ()Getter for z attribute.java.lang.Stringmarshal(Shape shape)java.lang.StringtoString()Shapeunmarshal(java.lang.String v)-
Methods inherited from class org.cip4.lib.xjdf.type.AbstractXJdfType
equals, hashCode
-
-
-
-
Constructor Detail
-
Shape
public Shape()
Default constructor.
-
Shape
public Shape(float x, float y)Custom constructor, accepting several values for initializing.
-
Shape
public Shape(float x, float y, float z)Custom constructor, accepting several values for initializing.
-
Shape
public Shape(java.lang.String expression)
Custom Constructor. Creates a new Shape instance by a String expression.- Parameters:
expression- Shape as String expression.
-
-
Method Detail
-
getX
public float getX()
Getter for x attribute.- Returns:
- the x
-
getY
public float getY()
Getter for y attribute.- Returns:
- the y
-
getZ
public float getZ()
Getter for z attribute.- Returns:
- the z
-
marshal
public java.lang.String marshal(Shape shape)
- Specified by:
marshalin classjakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,Shape>- See Also:
XmlAdapter.marshal(java.lang.Object)
-
unmarshal
public Shape unmarshal(java.lang.String v)
- Specified by:
unmarshalin classjakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,Shape>- See Also:
XmlAdapter.unmarshal(java.lang.Object)
-
toString
public java.lang.String toString()
- Specified by:
toStringin classAbstractXJdfType<java.lang.String,Shape>- See Also:
Object.toString()
-
-