in commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/NativeSeedType.java [247:265]
public Object convertSeed(Object seed,
int size) {
// Convert to native type.
// Each method must be overridden by specific implementations.
if (seed instanceof Integer) {
return convert((Integer) seed, size);
} else if (seed instanceof Long) {
return convert((Long) seed, size);
} else if (seed instanceof int[]) {
return convert((int[]) seed, size);
} else if (seed instanceof long[]) {
return convert((long[]) seed, size);
} else if (seed instanceof byte[]) {
return convert((byte[]) seed, size);
}
throw new UnsupportedOperationException(unrecognizedSeedMessage(seed));
}