public class DefaultFormula extends FormattableObject implements Formula, Serializable
Formula
is for human reading.
The object that actually does the work of applying formula to coordinate values is
MathTransform
.
DefaultOperationMethod
,
AbstractMathTransform
,
MathTransformProvider
,
Serialized FormDefined in the sis-referencing
module
Modifier | Constructor and Description |
---|---|
|
DefaultFormula(CharSequence formula)
Creates a new formula from the given string.
|
|
DefaultFormula(Citation citation)
Creates a new formula from the given citation.
|
protected |
DefaultFormula(Formula formula)
Creates a new formula with the same values than the specified one.
|
Modifier and Type | Method and Description |
---|---|
static DefaultFormula |
castOrCopy(Formula object)
Returns a SIS formula implementation with the same values than the given arbitrary implementation.
|
boolean |
equals(Object object)
Compares this formula with the given object for equality.
|
protected String |
formatTo(Formatter formatter)
Formats this formula as a pseudo-Well Known Text element.
|
Citation |
getCitation()
Returns the reference to a publication giving the formula(s) or procedure used by the
coordinate operation method, or
null if none. |
InternationalString |
getFormula()
Returns the formula(s) or procedure used by the operation method, or
null if none. |
int |
hashCode()
Returns a hash code value for this formula.
|
print, toString, toString, toWKT
public DefaultFormula(CharSequence formula)
formula
- The formula.public DefaultFormula(Citation citation)
citation
- The citation.protected DefaultFormula(Formula formula)
This constructor performs a shallow copy, i.e. the properties are not cloned.
formula
- The formula to copy.castOrCopy(Formula)
public static DefaultFormula castOrCopy(Formula object)
null
, then this method returns null
.
Otherwise if the given object is already a SIS implementation, then the given object is returned unchanged.
Otherwise a new SIS implementation is created and initialized to the attribute values of the given object.object
- The object to get as a SIS implementation, or null
if none.null
if the argument was null.public InternationalString getFormula()
null
if none.getFormula
in interface Formula
public Citation getCitation()
null
if none.getCitation
in interface Formula
public int hashCode()
public boolean equals(Object object)
protected String formatTo(Formatter formatter)
Formula
objects.
The text formatted by this method is SIS-specific and causes the text to be
flagged as invalid WKT.
The WKT content of this element may change in any future SIS version.formatTo
in class FormattableObject
formatter
- The formatter where to format the inner content of this WKT element."Formula"
.FormattableObject.toWKT()
,
FormattableObject.toString()
Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.