|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.text.math.LinCombTermFormatV2<V>
V
- the variable type.public final class LinCombTermFormatV2<V>
This class is a concrete implementation of LinearCombTermFormat.
Terms have the following format: coefficient variable
.
Constructor Summary | |
---|---|
LinCombTermFormatV2(SimpleFormat<V> variableFormat)
Constructs a new linear combination term format using the provided formats. |
Method Summary | |
---|---|
java.lang.String |
format(LinearComb.Term<? extends V> term)
Returns a formatted string representation of the provided term. |
CoeffFormatV2 |
getCoeffFormat()
Returns the format used for coefficients. |
SimpleFormat<V> |
getVariableFormat()
Returns the format used for variables. |
LinearComb.Term<V> |
parse(java.lang.String term)
Parses the provided string and returns its corresponding term. |
LinearComb.Term<V> |
parse(java.lang.String coefficient,
java.lang.String variable)
Parses the provided strings and returns their corresponding term. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface sbrt.shell.text.Formatter |
---|
format |
Constructor Detail |
---|
public LinCombTermFormatV2(SimpleFormat<V> variableFormat)
variableFormat
- the format to use for variables.Method Detail |
---|
public SimpleFormat<V> getVariableFormat()
public CoeffFormatV2 getCoeffFormat()
public java.lang.String format(LinearComb.Term<? extends V> term)
format
in interface LinearCombTermFormat<V>
term
- the term to be formatted.
public LinearComb.Term<V> parse(java.lang.String term)
parse
in interface LinearCombTermFormat<V>
parse
in interface Parser<LinearComb.Term<? extends V>>
term
- the string to be parsed.
public LinearComb.Term<V> parse(java.lang.String coefficient, java.lang.String variable)
coefficient
- the string of the coefficient to be parsed.variable
- the string of the variable to be parsed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |