public abstract class BaseValueHolder extends Object implements ValueHolderIF
| Modifier and Type | Field and Description |
|---|---|
Object |
extraObject
The other object referred to by this
ValueHolder |
Integer |
modVal
An object that can be manipulated (leaving myValue to hold a
value which allows validation against the key)
|
Object |
myValue
The value held by this
ValueHolder |
String |
myVersion |
| Constructor and Description |
|---|
BaseValueHolder()
No-arg constructor
|
BaseValueHolder(Object anObj,
RandomValues randomValues)
Create a new instance of ValueHolder.
|
BaseValueHolder(Object anObj,
RandomValues randomValues,
Integer initModVal)
Create a new instance of ValueHolder.
|
BaseValueHolder(RandomValues randomValues)
Create a new instance of ValueHolder.
|
BaseValueHolder(String nameFactoryName,
RandomValues randomValues)
Create a new instance of ValueHolder.
|
BaseValueHolder(String nameFactoryName,
RandomValues randomValues,
Integer initModVal)
Create a new instance of ValueHolder.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object anObj) |
BaseValueHolder |
getAlternateValueHolder(RandomValues randomValues)
Using the current values in this ValueHolder, return a new
ValueHolder that has the same "value" in
myValue and
a new extraObject if extraObject is used. |
Object |
getExtraObject()
Returns the extra object associated with this value holder.
|
Integer |
getModVal()
Returns the extra object associated with this value holder.
|
Object |
getMyValue()
Returns the value associated with this value holder.
|
int |
hashCode() |
void |
incrementModVal(Integer val) |
void |
setModVal(Integer val) |
String |
toString() |
void |
verifyMyFields(long base)
Verify the fields of this instance
|
void |
verifyMyFields(String string,
long base) |
public String myVersion
public Object myValue
ValueHolderpublic Object extraObject
ValueHolderpublic Integer modVal
public BaseValueHolder()
public BaseValueHolder(Object anObj, RandomValues randomValues)
anObj placed as its myValue field
and, if desired, extraObject will be filled in using
randomValues if ValueHolderPrms.useExtraObject is set to true.anObj - - Used for myValue.randomValues - - Used to generate extraObject, if needed.public BaseValueHolder(RandomValues randomValues)
randomValues - - Used to generate myValue and extraObject, if needed.public BaseValueHolder(String nameFactoryName, RandomValues randomValues)
Long for myValue, using the nameFactoryName to extract the long.
If ValueHolderPrms.useExtraObject is set, the extraObject field
will be filled in using randomValues.nameFactoryName - - A name from NameFactory, used to extract
a value for the ValueHolder myValue.randomValues - - Used to generate an extraObject, if needed.
If useExtraObject is false, this can be nullNameFactory.getCounterForName(java.lang.Object)public BaseValueHolder(Object anObj, RandomValues randomValues, Integer initModVal)
anObj placed as its myValue field
and, if desired, extraObject will be filled in using
randomValues if ValueHolderPrms.useExtraObject is set to true. In addition,
modVal will be initialized with initModVal.anObj - - Used for myValue.randomValues - - Used to generate extraObject, if needed.initModVal - - Use for initialization of modValpublic BaseValueHolder(String nameFactoryName, RandomValues randomValues, Integer initModVal)
Long for myValue, using the nameFactoryName to extract the long.
If ValueHolderPrms.useExtraObject is set, the extraObject field
will be filled in using randomValues.
initModVal will be used to initialize modValnameFactoryName - - A name from NameFactory, used to extract
a value for the ValueHolder myValue.randomValues - - Used to generate an extraObject, if needed.
If useExtraObject is false, this can be nullinitModVal - - initializer for modValNameFactory.getCounterForName(java.lang.Object)public Object getMyValue()
ValueHolderIFgetMyValue in interface ValueHolderIFpublic Object getExtraObject()
ValueHolderIFgetExtraObject in interface ValueHolderIFpublic Integer getModVal()
ValueHolderIFgetModVal in interface ValueHolderIFpublic void setModVal(Integer val)
public void incrementModVal(Integer val)
public BaseValueHolder getAlternateValueHolder(RandomValues randomValues)
myValue and
a new extraObject if extraObject is used. For
example, if this.myValue contains a Long of value 34, the new
ValueHolder will also have a myValue of 34, but it may be a
String, an Integer, a BigInteger, etc.TestException - If we cannot find an alternative value for this value in
this ValueHolder.public void verifyMyFields(long base)
base - The expected base value used to give the fields values.public void verifyMyFields(String string, long base)
string - Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.