Class V
- java.lang.Object
-
- org.proforma.variability.transfer.V
-
- All Implemented Interfaces:
Serializable
,Comparable<V>
public abstract class V extends Object implements Comparable<V>, Serializable
A
V
object is a variant, i. e. a possible value taken by a variation point.A variant can be represented as a specification, that has to be resolved before materializing a task or an artifact, or as a value.
Variant objects belong to a variation point. Usually a template specification defines several possible values for each variation point. The possible values are defined either by a set of
V
objects or by a set of value ranges represented by a first and a lastV
object.The
V
objects have a type that is taken from the associated variation point. There are interval scaled and nominal scaled variants (seeVis
andVns
).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description V()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract V
clone()
org.proforma.variability.transfer.VarSpecNode.DefRefCollector
collectDefRefs()
int
compareTo(V other)
static Object
convertToSpec(Vp vp, Object value)
static Object
convertToValue(Vp vp, Object spec)
abstract double
distanceTo(V choice)
abstract boolean
equals(Object o)
static V
fromSpec(Object spec)
static V
fromSpec(Object spec, Vp vp)
static V
fromString(String s)
static V
fromValue(Object value)
static V
fromValue(Object value, Vp vp)
abstract Object
getSpec()
abstract Class<?>
getSpecType()
protected abstract Character
getSpecTypeSymbol()
abstract Object
getValue()
abstract Class<?>
getValueType()
Vp
getVp()
This is available after push... having been calledabstract int
hashCode()
abstract boolean
isIntervalScaled()
abstract boolean
isSpec()
abstract boolean
isValue()
static String
nullToString()
void
pushInheritedCVpToChildren(Vp vp)
void
setParent(VarSpecNode parent)
protected void
setVp(Vp vp)
abstract V
switchToSpec()
abstract V
switchToValue()
String
toString()
String
toString(String prefix)
-
-
-
Method Detail
-
getVp
public Vp getVp()
This is available after push... having been called
-
setVp
protected void setVp(Vp vp)
-
collectDefRefs
public org.proforma.variability.transfer.VarSpecNode.DefRefCollector collectDefRefs()
-
setParent
public final void setParent(VarSpecNode parent)
-
pushInheritedCVpToChildren
public void pushInheritedCVpToChildren(Vp vp)
-
getSpec
public abstract Object getSpec()
-
getSpecType
public abstract Class<?> getSpecType()
-
getValue
public abstract Object getValue()
-
getValueType
public abstract Class<?> getValueType()
-
isSpec
public abstract boolean isSpec()
-
isValue
public abstract boolean isValue()
-
switchToSpec
public abstract V switchToSpec()
-
switchToValue
public abstract V switchToValue()
-
getSpecTypeSymbol
protected abstract Character getSpecTypeSymbol()
-
distanceTo
public abstract double distanceTo(V choice)
-
isIntervalScaled
public abstract boolean isIntervalScaled()
-
nullToString
public static String nullToString()
-
compareTo
public int compareTo(V other)
- Specified by:
compareTo
in interfaceComparable<V>
-
-