|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.jqno.equalsverifier.util.PrefabValues
public class PrefabValues
Container and creator of prefabricated instances of objects and classes.
Constructor Summary | |
---|---|
PrefabValues()
|
|
PrefabValues(StaticFieldValueStash stash)
|
Method Summary | ||
---|---|---|
void |
backupToStash(Class<?> type)
|
|
boolean |
contains(Class<?> type)
Tests whether prefabricated values exist for the specified class. |
|
|
getBlack(Class<T> type)
Getter for the "black" prefabricated value of the specified type. |
|
Object |
getOther(Class<?> type,
Object value)
Returns a prefabricated value for type which is not equal to value. |
|
|
getRed(Class<T> type)
Getter for the "red" prefabricated value of the specified type. |
|
|
put(Class<T> type,
T red,
T black)
Associates the specified values with the specified class in this collection of prefabricated values. |
|
void |
putAll(PrefabValues from)
Copies all prefabricated values of the specified PrefabValues to
this one. |
|
void |
putFor(Class<?> type)
Creates instances for the specified type, and for the types of the fields contained within the specified type, recursively, and adds them. |
|
void |
restoreFromStash()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrefabValues()
public PrefabValues(StaticFieldValueStash stash)
Method Detail |
---|
public void backupToStash(Class<?> type)
public void restoreFromStash()
public <T> void put(Class<T> type, T red, T black)
T
- The type of value to put into this PrefabValues
.type
- The class of the values.red
- A value of type T.black
- Another value of type T.public void putAll(PrefabValues from)
PrefabValues
to
this one.
from
- Prefabricated values to be copied to this
PrefabValues
.public boolean contains(Class<?> type)
type
- Class whose presence in this PrefabValues
is to be
tested.
public <T> T getRed(Class<T> type)
type
- Class for which to return the prefabricated value.
public <T> T getBlack(Class<T> type)
type
- Class for which to return the prefabricated value.
public Object getOther(Class<?> type, Object value)
type
- Class for which to return a prefabricated value.value
- An instance of type.
public void putFor(Class<?> type)
type
- The type to create prefabValues for.
RecursionException
- If recursion is detected.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |