Modifier and Type | Field and Description |
---|---|
static short |
BOOLEAN
An explicit NULL property value.
|
static short |
BOOLEAN_ARRAY
Array of Java primitives.
|
static short |
BYTE |
static short |
BYTE_ARRAY |
static short |
CHAR |
static short |
CHAR_ARRAY |
static short |
DOUBLE |
static short |
DOUBLE_ARRAY |
static short |
FLOAT |
static short |
FLOAT_ARRAY |
static short |
INT |
static short |
INT_ARRAY |
static short |
LONG |
static short |
LONG_ARRAY |
static short |
OBJECT
Java Object (must implement
Serializable or Externalizable ). |
static short |
OBJECT_ARRAY
Array of Java objects (but not Java primitives).
|
int[] |
randomType |
static short |
SHORT |
static short |
SHORT_ARRAY |
static short |
STRING |
Modifier | Constructor and Description |
---|---|
protected |
TestCase2.RandomType() |
Modifier and Type | Method and Description |
---|---|
int |
getType(Class cls)
Return the type code for the specified class.
|
Object |
nextObject(Random rnd,
boolean allowNull)
Returns an object with a random type and random value.
|
Object |
nextObject(Random rnd,
Class cls,
boolean allowNull)
Return an instance of the specified type with a random value.
|
Object |
nextObject(Random rnd,
int type,
boolean allowNull)
Return an instance of the specified type with a random value.
|
public static final short BOOLEAN
public static final short BYTE
public static final short CHAR
public static final short SHORT
public static final short INT
public static final short LONG
public static final short FLOAT
public static final short DOUBLE
public static final short STRING
public static final short OBJECT
Serializable
or Externalizable
).public static final short OBJECT_ARRAY
public static final short BOOLEAN_ARRAY
public static final short BYTE_ARRAY
public static final short CHAR_ARRAY
public static final short SHORT_ARRAY
public static final short INT_ARRAY
public static final short LONG_ARRAY
public static final short FLOAT_ARRAY
public static final short DOUBLE_ARRAY
public final int[] randomType
public int getType(Class cls)
cls
- A class.UnsupportedOperationException
- if the class is not one of those that is supported by
TestCase2.RandomType
.public Object nextObject(Random rnd, boolean allowNull)
rnd
- The random# generator to use.allowNull
- When true, a null object reference may be returned.public Object nextObject(Random rnd, Class cls, boolean allowNull)
rnd
- The random number generator.cls
- The class of the random instance to be returned -or-
null
to return an instance of any of the
classes that can be generated by this method.allowNull
- When true, a null object reference may be returned.public Object nextObject(Random rnd, int type, boolean allowNull)
rnd
- The random number generator.type
- One of the values declared by this class.allowNull
- When true, a null object reference may be returned.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.