|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttcra.MathString<ElementType>
public class MathString<ElementType extends MathType>
MathString is an abstraction of the mathematical "String of [ElementType]". MathString is parameterized to allow the elements to be of any type of MathType.
| Constructor Summary | |
|---|---|
MathString(java.util.Vector<ElementType> elem,
MathStringParser msp)
Class constructor specifying the elements in the string and the MathStringParser used to parse the String from user input. |
|
| Method Summary | |
|---|---|
MathString<ElementType> |
concat(ElementType latter)
Returns a MathString that has had the provided element concatenated on to it. |
MathString<ElementType> |
concat(MathString<ElementType> latter)
Returns a MathString that is the concatenation of this MathString and another MathString provided by the user. |
boolean |
equals(java.lang.Object other)
Tests the MathString provided and this MathString for equality. |
java.util.Vector<ElementType> |
getContents()
Returns the contents of the MathString. |
int |
length()
Returns the number of elements in the MathString |
MathString<ElementType> |
preconcat(ElementType former)
Returns a MathString that has had the provided element concatenated on to the beginning of this string. |
java.util.Vector<MathString<ElementType>> |
split(int elemNum)
Returns two seperate MathStrings that this MathString split after the specified element number. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MathString(java.util.Vector<ElementType> elem,
MathStringParser msp)
elem - Vector of the parameterized type ElementType that
is the contents of the MathStringmsp - MathStringParser used to parse the user input| Method Detail |
|---|
public int length()
public MathString<ElementType> concat(MathString<ElementType> latter)
latter - MathString to be concatenated onto
this MathString.
public MathString<ElementType> concat(ElementType latter)
latter - Element to be added to this MathString
public MathString<ElementType> preconcat(ElementType former)
former - Element to be added to this MathString
public boolean equals(java.lang.Object other)
equals in interface MathTypeequals in class java.lang.Objectother - MathString that this is compared to.
true if the MathString and the MathString
provided are equal.
false otherwise.public java.util.Vector<MathString<ElementType>> split(int elemNum)
elemNum - position to split the MathString around.
public java.util.Vector<ElementType> getContents()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||