Package org.instancio
Interface Result<T>
- Type Parameters:
T- the result type
public interface Result<T>
A result containing a created object and seed that was used for populating its values.
A result can be obtained by calling the
InstancioApi.asResult() method.
Example:
Result<Person> result = Instancio.of(Person.class)
.set(field(Person::getName), "Homer Simpson")
.asResult();
Person person = result.get();
long seed = result.getSeed();
- Since:
- 1.5.1
-
Method Summary
-
Method Details
-
get
-
getSeed
long getSeed()Returns the seed that was used to populate the created object.- Returns:
- the seed
- Since:
- 1.5.1
-