Class Helper
java.lang.Object
org.eclipse.persistence.internal.eis.cobol.helper.Helper
Purpose: This class contains some simple methods that are helpful and used through
the classes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte
byteFromInt
(int intValue) takes a int an returns a bytestatic byte
byteFromString
(String string) static Integer
integerFromByte
(byte byteValue) takes a byte and returns the Integer valuestatic Integer
integerFromHexString
(String string) takes a hex string representation and returns the Integer valuestatic Integer
integerFromString
(String string) takes a string as an argument and returns theInteger
valuestatic int
intFromByte
(byte byteValue) takes a byte value and returns int valuestatic int
intFromHexString
(String string) takes a hex string and returns an int valuestatic int
power
(int base, int power) calculates a exponential value give the base and power
-
Constructor Details
-
Helper
public Helper()
-
-
Method Details
-
integerFromString
takes a string as an argument and returns theInteger
value -
integerFromHexString
takes a hex string representation and returns the Integer value -
byteFromString
-
intFromHexString
takes a hex string and returns an int value -
integerFromByte
takes a byte and returns the Integer value -
intFromByte
public static int intFromByte(byte byteValue) takes a byte value and returns int value -
byteFromInt
public static byte byteFromInt(int intValue) takes a int an returns a byte -
power
public static int power(int base, int power) calculates a exponential value give the base and power
-