Package de.cuioss.test.generator.impl
Enum PrimitiveArrayGenerators
- java.lang.Object
-
- java.lang.Enum<PrimitiveArrayGenerators>
-
- de.cuioss.test.generator.impl.PrimitiveArrayGenerators
-
- All Implemented Interfaces:
Serializable,Comparable<PrimitiveArrayGenerators>
public enum PrimitiveArrayGenerators extends Enum<PrimitiveArrayGenerators>
Generates arrays of primitive types.- Author:
- Oliver Wolff
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Class<?>getType()abstract Objectnext()static PrimitiveArrayGeneratorsresolveForType(Class<?> primitiveType)Returns aPrimitiveArrayGeneratorsfor the given primitive type.static PrimitiveArrayGeneratorsvalueOf(String name)Returns the enum constant of this type with the specified name.static PrimitiveArrayGenerators[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final PrimitiveArrayGenerators BOOLEAN
Provides booleans
-
BYTE
public static final PrimitiveArrayGenerators BYTE
Provides bytes
-
CHAR
public static final PrimitiveArrayGenerators CHAR
Provides chars
-
SHORT
public static final PrimitiveArrayGenerators SHORT
Provides shorts
-
INTEGER
public static final PrimitiveArrayGenerators INTEGER
Provides integers
-
LONG
public static final PrimitiveArrayGenerators LONG
Provides longs
-
FLOAT
public static final PrimitiveArrayGenerators FLOAT
Provides floats
-
DOUBLE
public static final PrimitiveArrayGenerators DOUBLE
Provides doubles
-
-
Method Detail
-
values
public static PrimitiveArrayGenerators[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PrimitiveArrayGenerators c : PrimitiveArrayGenerators.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PrimitiveArrayGenerators valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
next
public abstract Object next()
- Returns:
- an primitive array of the configured type, with the sizes 1-128
-
resolveForType
public static PrimitiveArrayGenerators resolveForType(Class<?> primitiveType)
Returns aPrimitiveArrayGeneratorsfor the given primitive type.- Parameters:
primitiveType- must not be null and a primitive type.- Returns:
- the found
PrimitiveArrayGeneratorsor throws anIllegalStateExceptionif none could be found
-
-