Package edu.jas.structure
Interface Element<C extends Element<C>>
- Type Parameters:
C
- element type.
- All Superinterfaces:
Comparable<C>
,Serializable
- All Known Subinterfaces:
AbelianGroupElem<C>
,AlgebraElem<A,
,C> FieldElem<C>
,GcdRingElem<C>
,ModulElem<M,
,C> MonoidElem<C>
,NoncomRingElem<C>
,Polynomial<C>
,RegularRingElem<C>
,RingElem<C>
,StarRingElem<C>
- All Known Implementing Classes:
AlgebraicNumber
,BigComplex
,BigDecimal
,BigDecimalComplex
,BigInteger
,BigOctonion
,BigQuaternion
,BigQuaternionInteger
,BigRational
,Complex
,ComplexAlgebraicNumber
,ExpVector
,ExpVectorByte
,ExpVectorInteger
,ExpVectorLong
,ExpVectorShort
,GenExteriorPolynomial
,GenMatrix
,GenPolynomial
,GenSolvablePolynomial
,GenVector
,GenWordPolynomial
,IndexList
,Local
,Local
,LocalSolvablePolynomial
,ModInt
,ModInteger
,ModLong
,Monomial
,MultiVarPowerSeries
,Product
,QLRSolvablePolynomial
,Quotient
,Quotient
,QuotSolvablePolynomial
,RealAlgebraicNumber
,RealAlgebraicNumber
,RecSolvablePolynomial
,RecSolvableWordPolynomial
,Residue
,Residue
,ResidueSolvablePolynomial
,ResidueSolvableWordPolynomial
,SolvableLocal
,SolvableLocalResidue
,SolvableQuotient
,SolvableResidue
,UnivPowerSeries
,Word
,WordResidue
Element interface. Basic functionality of elements, e.g. compareTo, equals,
clone.
Note: extension of Cloneable
removed in 2012-08-18,
clone()
is renamed to copy()
. See also the
discussion in Bloch on
Cloning.
-
Method Summary
Modifier and TypeMethodDescriptionint
Compare this to b.copy()
Clone this Element.boolean
Test if this is equal to b.factory()
Get the corresponding element factory.int
hashCode()
Hashcode of this Element.toScript()
Get a scripting compatible string representation.Get a scripting compatible string representation of the factory.
-
Method Details
-
copy
C copy()Clone this Element.- Returns:
- Creates and returns a copy of this Element.
-
equals
Test if this is equal to b. -
hashCode
int hashCode()Hashcode of this Element. -
compareTo
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 interfaceComparable<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
String toScript()Get a scripting compatible string representation.- Returns:
- script compatible representation for this Element.
-
toScriptFactory
String toScriptFactory()Get a scripting compatible string representation of the factory.- Returns:
- script compatible representation for this ElemFactory.
-