Package jadex.extension.envsupport.math
Class Vector1Int
- java.lang.Object
- 
- jadex.extension.envsupport.math.Vector1Int
 
- 
- 
Constructor SummaryConstructors Constructor Description Vector1Int()Creates a new vector.Vector1Int(int value)Creates a new Vector1int.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IVector1add(IVector1 vector)Adds another vector to this vector, adding individual components.IVector1cbrt()Calculate the cube root.java.lang.Objectclone()Generates a deep clone of the vector.IVector1copy()Makes a copy of the vector without using the complex clone interface.IVector2createVector2(IVector1 sec)Create a vector2 from this and another vector.booleanequals(IVector1 vector)Compares the vector to another vector.booleanequals(java.lang.Object obj)Compares the vector to an objectjava.math.BigDecimalgetAsBigDecimal()Returns the vector as BigDecimal.doublegetAsDouble()Returns the vector as double.floatgetAsFloat()Returns the vector as float.intgetAsInteger()Returns the vector as integer.longgetAsLong()Returns the vector as long.IVector1getDistance(IVector1 vector)Returns the distance to another vectorbooleangreater(IVector1 vector)Tests if the vector is greater than another vector.inthashCode()Compute the hash code.booleanless(IVector1 vector)Tests if the vector is less than another vector.IVector1mod(IVector1 mod)Calculate the modulo.IVector1multiply(IVector1 vector)Performs a multiplication on the vector.IVector1negate()Negates the vector by negating its components.voidsetAsInteger(int x)IVector1sqrt()Calculate the square root.IVector1subtract(IVector1 vector)Subtracts another vector to this vector, subtracting individual components.java.lang.StringtoString()IVector1zero()Sets the vector component to zero.
 
- 
- 
- 
Field Detail- 
ZEROpublic static final IVector1 ZERO Zero vector
 
- 
 - 
Method Detail- 
addpublic IVector1 add(IVector1 vector) Adds another vector to this vector, adding individual components.
 - 
subtractpublic IVector1 subtract(IVector1 vector) Subtracts another vector to this vector, subtracting individual components.
 - 
zeropublic IVector1 zero() Sets the vector component to zero.
 - 
negatepublic IVector1 negate() Negates the vector by negating its components.
 - 
sqrtpublic IVector1 sqrt() Calculate the square root.
 - 
getDistancepublic IVector1 getDistance(IVector1 vector) Returns the distance to another vector- Specified by:
- getDistancein interface- IVector1
- Parameters:
- vector- other vector
- Returns:
- distance
 
 - 
getAsIntegerpublic int getAsInteger() Returns the vector as integer.- Specified by:
- getAsIntegerin interface- IVector1
- Returns:
- vector as integer
 
 - 
setAsIntegerpublic void setAsInteger(int x) 
 - 
getAsLongpublic long getAsLong() Returns the vector as long.
 - 
getAsFloatpublic float getAsFloat() Returns the vector as float.- Specified by:
- getAsFloatin interface- IVector1
- Returns:
- vector as float
 
 - 
getAsDoublepublic double getAsDouble() Returns the vector as double.- Specified by:
- getAsDoublein interface- IVector1
- Returns:
- vector as double
 
 - 
getAsBigDecimalpublic java.math.BigDecimal getAsBigDecimal() Returns the vector as BigDecimal.- Specified by:
- getAsBigDecimalin interface- IVector1
- Returns:
- vector as BigDecimal
 
 - 
copypublic IVector1 copy() Makes a copy of the vector without using the complex clone interface.
 - 
clonepublic java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionGenerates a deep clone of the vector.
 - 
equalspublic boolean equals(java.lang.Object obj) Compares the vector to an object
 - 
hashCodepublic int hashCode() Compute the hash code.- Overrides:
- hashCodein class- java.lang.Object
- Returns:
- The hash code.
 
 - 
equalspublic boolean equals(IVector1 vector) Compares the vector to another vector. The vectors are equal if the components are equal.
 - 
greaterpublic boolean greater(IVector1 vector) Tests if the vector is greater than another vector.
 - 
lesspublic boolean less(IVector1 vector) Tests if the vector is less than another vector.
 - 
createVector2public IVector2 createVector2(IVector1 sec) Create a vector2 from this and another vector.- Specified by:
- createVector2in interface- IVector1
- Parameters:
- sec- The second vector.
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-