edu.jas.structure
Interface Element<C extends Element<C>>
- Type Parameters:
C
- element type.
- All Superinterfaces:
- java.lang.Cloneable, java.lang.Comparable<C>, java.io.Serializable
- All Known Subinterfaces:
- AbelianGroupElem<C>, AlgebraElem<A,C>, FieldElem<C>, GcdRingElem<C>, ModulElem<M,C>, MonoidElem<C>, Polynomial<C>, RegularRingElem<C>, RingElem<C>, StarRingElem<C>
- All Known Implementing Classes:
- AlgebraicNumber, BigComplex, BigDecimal, BigInteger, BigOctonion, BigQuaternion, BigRational, Complex, ComplexAlgebraicNumber, ExpVector, ExpVectorByte, ExpVectorInteger, ExpVectorLong, ExpVectorShort, GenMatrix, GenPolynomial, GenSolvablePolynomial, GenVector, Local, Local, ModInteger, ModLong, MultiVarPowerSeries, Product, Quotient, Quotient, RealAlgebraicNumber, RealAlgebraicNumber, Residue, Residue, UnivPowerSeries
public interface Element<C extends Element<C>>
- extends java.lang.Cloneable, java.lang.Comparable<C>, java.io.Serializable
Element interface.
Basic functionality of elements, e.g. compareTo, equals, clone.
- Author:
- Heinz Kredel
Method Summary |
int |
compareTo(C b)
Compare this to b. |
boolean |
equals(java.lang.Object b)
Test if this is equal to b. |
ElemFactory<C> |
factory()
Get the corresponding element factory. |
int |
hashCode()
Hashcode of this Element. |
java.lang.String |
toScript()
Get a scripting compatible string representation. |
java.lang.String |
toScriptFactory()
Get a scripting compatible string representation of the factory. |
equals
boolean equals(java.lang.Object b)
- Test if this is equal to b.
- Overrides:
equals
in class java.lang.Object
- Parameters:
b
-
- Returns:
- true if this is equal to b, else false.
hashCode
int hashCode()
- Hashcode of this Element.
- Overrides:
hashCode
in class java.lang.Object
- Returns:
- the hashCode.
compareTo
int compareTo(C b)
- Compare this to b.
I.e. this < b iff this.compareTo(b) < 0.
Note: may not be meaningful if structure has no order.
- Specified by:
compareTo
in interface java.lang.Comparable<C extends Element<C>>
- Parameters:
b
-
- Returns:
- 0 if this is equal to b,
-1 if this is less then b, else +1.
factory
ElemFactory<C> factory()
- Get the corresponding element factory.
- Returns:
- factory for this Element.
toScript
java.lang.String toScript()
- Get a scripting compatible string representation.
- Returns:
- script compatible representation for this Element.
toScriptFactory
java.lang.String toScriptFactory()
- Get a scripting compatible string representation of the factory.
- Returns:
- script compatible representation for this ElemFactory.