Class V

  • All Implemented Interfaces:
    Serializable, Comparable<V>
    Direct Known Subclasses:
    Vis, Vns

    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 last V object.

    The V objects have a type that is taken from the associated variation point. There are interval scaled and nominal scaled variants (see Vis and Vns).

    See Also:
    Serialized Form
    • Constructor Detail

      • V

        public V()
    • Method Detail

      • getVp

        public Vp getVp()
        This is available after push... having been called
      • setVp

        protected void setVp​(Vp vp)
      • clone

        public abstract V clone()
        Overrides:
        clone in class Object
      • 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()
      • hashCode

        public abstract int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public abstract boolean equals​(Object o)
        Overrides:
        equals in class Object
      • nullToString

        public static String nullToString()
      • fromString

        public static V fromString​(String s)
      • fromSpec

        public static V fromSpec​(Object spec,
                                 Vp vp)
      • fromSpec

        public static V fromSpec​(Object spec)
      • fromValue

        public static V fromValue​(Object value,
                                  Vp vp)
      • fromValue

        public static V fromValue​(Object value)
      • convertToValue

        public static Object convertToValue​(Vp vp,
                                            Object spec)
      • convertToSpec

        public static Object convertToSpec​(Vp vp,
                                           Object value)