# Class Monomial<E>

All Implemented Interfaces:
`Serializable`

```public class Monomial<E>
extends AMonomial<Monomial<E>>```
Monomial with coefficient from generic ring
Since:
1.0
`IMonomialAlgebra.MonomialAlgebra`, Serialized Form
• ## Field Summary

Fields
Modifier and Type Field Description
`E` `coefficient`
the coefficient

### Fields inherited from class cc.redberry.rings.poly.multivar.DegreeVector

`exponents, totalDegree`
• ## Constructor Summary

Constructors
Constructor Description
```Monomial​(int[] exponents, int totalDegree, E coefficient)```
```Monomial​(int[] exponents, E coefficient)```
```Monomial​(int nVariables, E coefficient)```
```Monomial​(DegreeVector degreeVector, E coefficient)```
• ## Method Summary

Modifier and Type Method Description
`boolean` `equals​(Object o)`
`Monomial<E>` ```forceSetDegreeVector​(int[] exponents, int totalDegree)```
Sets the degree vector
`int` `hashCode()`
`Monomial<E>` `setCoefficient​(E c)`
`Monomial<E>` `setCoefficientFrom​(Monomial<E> oth)`
Sets coefficient of this with coefficient of oth
`Monomial<E>` ```setDegreeVector​(int[] exponents, int totalDegree)```
Sets the degree vector
`Monomial<E>` `setDegreeVector​(DegreeVector oth)`
Sets the degree vector
`String` `toString()`

### Methods inherited from class cc.redberry.rings.poly.multivar.AMonomial

`divideOrNull, divideOrNull, dropSelect, dv, dvToString, dvToString, insert, insert, joinNewVariable, joinNewVariables, joinNewVariables, map, multiply, multiply, range, select, select, set, setDegreeVector, setNVariables, setZero, setZero, toZero, without, without`

### Methods inherited from class cc.redberry.rings.poly.multivar.DegreeVector

`dvDivideExact, dvDivideExact, dvDivideOrNull, dvDivideOrNull, dvDivideOrNull, dvDivisibleBy, dvDivisibleBy, dvDropSelect, dvEquals, dvInsert, dvInsert, dvJoinNewVariable, dvJoinNewVariables, dvJoinNewVariables, dvMap, dvMultiply, dvMultiply, dvMultiply, dvRange, dvSelect, dvSelect, dvSet, dvSetNVariables, dvSetZero, dvSetZero, dvTotalDegree, dvWithout, dvWithout, isZeroVector, nVariables, toString, toStringArray`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`
• ## Field Details

• ### coefficient

public final E coefficient
the coefficient
• ## Constructor Details

• ### Monomial

public Monomial​(DegreeVector degreeVector, E coefficient)
Parameters:
`degreeVector` - DegreeVector
`coefficient` - the coefficient
• ### Monomial

public Monomial​(int[] exponents, int totalDegree, E coefficient)
Parameters:
`exponents` - exponents
`totalDegree` - total degree (sum of exponents)
`coefficient` - the coefficient
• ### Monomial

public Monomial​(int[] exponents, E coefficient)
Parameters:
`exponents` - exponents
`coefficient` - the coefficient
• ### Monomial

public Monomial​(int nVariables, E coefficient)
• ## Method Details

• ### setCoefficientFrom

public  setCoefficientFrom​(Monomial<E> oth)
Description copied from class: `AMonomial`
Sets coefficient of this with coefficient of oth
Specified by:
`setCoefficientFrom` in class `AMonomial<Monomial<E>>`
• ### setDegreeVector

public  setDegreeVector​(DegreeVector oth)
Description copied from class: `AMonomial`
Sets the degree vector
Specified by:
`setDegreeVector` in class `AMonomial<Monomial<E>>`
• ### setDegreeVector

public  setDegreeVector​(int[] exponents, int totalDegree)
Description copied from class: `AMonomial`
Sets the degree vector
Specified by:
`setDegreeVector` in class `AMonomial<Monomial<E>>`
• ### forceSetDegreeVector

public  forceSetDegreeVector​(int[] exponents, int totalDegree)
Description copied from class: `AMonomial`
Sets the degree vector
Specified by:
`forceSetDegreeVector` in class `AMonomial<Monomial<E>>`
• ### setCoefficient

public  setCoefficient​(E c)
• ### equals

public boolean equals​(Object o)
Overrides:
`equals` in class `DegreeVector`
• ### hashCode

public int hashCode()
Overrides:
`hashCode` in class `DegreeVector`
• ### toString

public String toString()
Overrides:
`toString` in class `DegreeVector`