Package matlabcontrol.link
Class MatlabInt8
- java.lang.Object
-
- matlabcontrol.link.MatlabInt8
-
public final class MatlabInt8 extends java.lang.ObjectMATLABint8with real and imaginary components.- Since:
- 4.2.0
-
-
Constructor Summary
Constructors Constructor Description MatlabInt8(byte real, byte imag)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Returnstrueif and only if the other object is of the same class and its component real and imaginary parts are both equal.inthashCode()Returns a hash code compatible withequals(...).booleanisReal()Returnstrueif the imaginary value is equivalent to the default value for the numeric type,falseotherwise.bytetoImaginary()Returns the imaginary value.bytetoReal()Returns the real value.java.lang.StringtoString()Returns aStringrepresentation of the number.
-
-
-
Method Detail
-
toReal
public byte toReal()
Returns the real value.- Returns:
-
toImaginary
public byte toImaginary()
Returns the imaginary value.- Returns:
-
isReal
public boolean isReal()
Returnstrueif the imaginary value is equivalent to the default value for the numeric type,falseotherwise. Equivalent to the MATLABisrealfunction.- Returns:
-
toString
public java.lang.String toString()
Returns aStringrepresentation of the number. If the number is real the String representation is real. If an imaginary component is present, the format isreal + imagiif the imaginary component is non-negative andreal - imagiif the imaginary component is negative.- Overrides:
toStringin classjava.lang.Object- Returns:
-
equals
public boolean equals(java.lang.Object obj)
Returnstrueif and only if the other object is of the same class and its component real and imaginary parts are both equal. The definition of equality for the component parts is defined by theequals(...)method of the boxed numeric class of its components.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj-- Returns:
-
hashCode
public int hashCode()
Returns a hash code compatible withequals(...).- Overrides:
hashCodein classjava.lang.Object- Returns:
-
-