Class Value

    • Constructor Detail

      • Value

        Value()
        Constructor for serialization.
      • Value

        protected Value​(IDatatype origin)
        Constructor.
        Parameters:
        origin - the origin datatype.
    • Method Detail

      • getValue

        public abstract java.lang.Object getValue()
        Abstract getValue method. The result of this method must comply to the input conventions of ValueFactory and the constructor of the respective implementing class.
        Returns:
        the Value of the Datatype
      • accept

        public abstract void accept​(IValueVisitor visitor)
        Abstract accept method.
        Parameters:
        visitor - The visitor
      • getType

        public IDatatype getType()
        Returns the Datatype of this Value. The datatype should match to the type of this value.
        Returns:
        Related datatype of this value.
      • isConfigured

        public abstract boolean isConfigured()
        Abstract Method to check whether a value is configured.
        Returns:
        true = it is configured / false = it is not
      • stringValueOf

        protected java.lang.String stringValueOf​(java.lang.Object object)
        Converts a object value to a string.
        Parameters:
        object - the object to convert
        Returns:
        the converted object
      • clone

        public Value clone()
        Clones the this value.
        Overrides:
        clone in class java.lang.Object
        Returns:
        the clone of the value
      • getContainedType

        public IDatatype getContainedType()
        Returns the data type explicitly contained in this value. This is typically a meta value, i.e. a type expression.
        Returns:
        the contained type or null if there is none
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equalsPartially

        public abstract boolean equalsPartially​(Value value)
        Returns whether the provided value is partially equal to this value, i.e., whether the nested elements of value (if they exist) have the same contents as in this value. Other values of this value are not considered. The check is transitive on nested elements. Please consider that this method is not symmetric as opposed to equals. This method is important to cope with default values.
        Parameters:
        value - the value to be checked for partial equality.
        Returns:
        true if value is partially equal to this, false else
      • equalsPartially

        public static boolean equalsPartially​(Value v1,
                                              Value v2)
        Returns whether v1 and v2 are equalsPartially(Value) partially equal considering the case that v1 may be null.
        Parameters:
        v1 - the first value (may be null)
        v2 - the second value (may be null)
        Returns:
        true if v1 and v2 are considered to be partially equal, false else, i.e., whether v2 is a partial value of v1
      • equals

        public static boolean equals​(Value v1,
                                     Value v2)
        Returns whether v1 and v2 are #equals(Value) equal considering the case that v1 may be null.
        Parameters:
        v1 - the first value (may be null)
        v2 - the second value (may be null)
        Returns:
        true if v1 and v2 are considered to be equal, false else, i.e., whether v2 is the same value as v1
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • setValueParent

        public void setValueParent​(IValueParent parent)
        Changes the value parent.
        Parameters:
        parent - the parent
      • getValueParent

        public IValueParent getValueParent()
        Returns the value parent.
        Returns:
        the parent (may be null for none)