Package mocka.generator.primitive
Class ShortGenerator
-
Field Summary
Fields inherited from class mocka.generator.AbstractGenerator
key, randomProvider, type -
Method Summary
Modifier and TypeMethodDescriptionget()returns a random short value.returns a random even short within the valid range, avoiding overflow at Short.MAX_VALUE.static ShortGeneratorreturns a random negative short [Short.MIN_VALUE, 0).returns a random odd short within the valid range, avoiding overflow at Short.MAX_VALUE.returns a random positive short (0, Short.MAX_VALUE].getShort()returns a random short within the full short range [Short.MIN_VALUE, Short.MAX_VALUE].returns a random short between the given min and max values [min, max].picks a random short from the given array.picks a random short from the given list.Methods inherited from class mocka.generator.AbstractGenerator
getKey, getType
-
Method Details
-
getInstance
-
get
returns a random short value. -
getShort
returns a random short within the full short range [Short.MIN_VALUE, Short.MAX_VALUE]. -
getShort
returns a random short between the given min and max values [min, max]. -
getEvenShort
returns a random even short within the valid range, avoiding overflow at Short.MAX_VALUE. -
getOddShort
returns a random odd short within the valid range, avoiding overflow at Short.MAX_VALUE. -
getPositiveShort
returns a random positive short (0, Short.MAX_VALUE]. -
getNegativeShort
returns a random negative short [Short.MIN_VALUE, 0). -
pickFrom
picks a random short from the given list. -
pickFrom
picks a random short from the given array.
-