edu.jas.structure
Interface Element<C extends Element<C>>
-
- Type Parameters:
C- element type. See the discussion in Bloch on Cloning.
- All Superinterfaces:
- java.lang.Comparable<C>, java.io.Serializable
- All Known Subinterfaces:
- AbelianGroupElem<C>, AlgebraElem<A,C>, FieldElem<C>, GcdRingElem<C>, IAST, IBigNumber, IComplex, IComplexNum, IExpr, IFraction, IInteger, INum, INumber, IPattern, IPatternSequence, IRational, ISignedNumber, IStringX, ISymbol, ModulElem<M,C>, MonoidElem<C>, Polynomial<C>, RegularRingElem<C>, RingElem<C>, StarRingElem<C>
- All Known Implementing Classes:
- AlgebraicNumber, AST, BigComplex, BigDecimal, BigInteger, BigOctonion, BigQuaternion, BigRational, Complex, ComplexAlgebraicNumber, ComplexNum, ComplexSym, ExprImpl, ExpVector, ExpVectorByte, ExpVectorInteger, ExpVectorLong, ExpVectorShort, FractionSym, GenMatrix, GenPolynomial, GenSolvablePolynomial, GenVector, GenWordPolynomial, IntegerSym, Local, Local, LocalSolvablePolynomial, MethodSymbol, ModInteger, ModLong, MultiVarPowerSeries, Num, Pattern, PatternSequence, Product, QLRSolvablePolynomial, Quotient, Quotient, QuotSolvablePolynomial, RealAlgebraicNumber, RealAlgebraicNumber, RecSolvablePolynomial, Residue, Residue, ResidueSolvablePolynomial, SolvableLocal, SolvableLocalResidue, SolvableQuotient, SolvableResidue, StringX, Symbol, UnivPowerSeries, Word
public interface Element<C extends Element<C>> extends java.lang.Comparable<C>, java.io.SerializableElement interface. Basic functionality of elements, e.g. compareTo, equals, clone. Note: extension ofCloneableremoved in 2012-08-18,clone()is renamed tocopy().
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description intcompareTo(C b)Compare this to b.Ccopy()Clone this Element.booleanequals(java.lang.Object b)Test if this is equal to b.ElemFactory<C>factory()Get the corresponding element factory.inthashCode()Hashcode of this Element.java.lang.StringtoScript()Get a scripting compatible string representation.java.lang.StringtoScriptFactory()Get a scripting compatible string representation of the factory.
-
-
-
Method Detail
-
copy
C copy()
Clone this Element.- Returns:
- Creates and returns a copy of this Element.
-
equals
boolean equals(java.lang.Object b)
Test if this is equal to b.- Overrides:
equalsin classjava.lang.Object- Parameters:
b-- Returns:
- true if this is equal to b, else false.
-
hashCode
int hashCode()
Hashcode of this Element.- Overrides:
hashCodein classjava.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.
-
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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG