edu.jas.structure
Interface Element<C extends Element<C>>

All Superinterfaces:
java.lang.Cloneable, java.lang.Comparable<C>, java.io.Serializable
All Known Subinterfaces:
AbelianGroupElem<C>, AlgebraElem<A,C>, GcdRingElem<C>, ModulElem<M,C>, MonoidElem<C>, RingElem<C>, StarRingElem<C>
All Known Implementing Classes:
AlgebraicNumber, BigComplex, BigDecimal, BigInteger, BigOctonion, BigQuaternion, BigRational, GenMatrix, GenPolynomial, GenSolvablePolynomial, GenVector, Local, Local, ModInteger, Quotient, Quotient, Residue, Residue

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
Type parameter:
C element type.

Method Summary
 C clone()
          Clone this Element.
 int compareTo(C b)
          Compare this to b.
 boolean equals(java.lang.Object b)
          Test if this is equal to b.
 int hashCode()
          Hashcode of this Element.
 

Method Detail

clone

C clone()
Clone this Element.

Returns:
Creates and returns a copy of this Elemnt.

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.