Class CondLengthProperty

    • Constructor Detail

      • CondLengthProperty

        public CondLengthProperty()
    • Method Detail

      • setComponent

        public void setComponent​(int cmpId,
                                 Property cmpnValue,
                                 boolean bIsDefault)
        Sets a component of the compound datatype.
        Specified by:
        setComponent in interface CompoundDatatype
        Parameters:
        cmpId - ID of the component
        cmpnValue - value of the component
        bIsDefault - Indicates if it's the default value
      • getComponent

        public Property getComponent​(int cmpId)
        Returns a component of the compound datatype.
        Specified by:
        getComponent in interface CompoundDatatype
        Parameters:
        cmpId - ID of the component
        Returns:
        the value of the component
      • getConditionality

        public Property getConditionality()
        Returns the conditionality.
        Returns:
        the conditionality
      • getLengthComponent

        public Property getLengthComponent()
        Returns the length.
        Returns:
        the length
      • isDiscard

        public boolean isDiscard()
        Indicates if the length can be discarded on certain conditions.
        Returns:
        true if the length can be discarded.
      • getLengthValue

        public int getLengthValue()
        Returns the computed length value.
        Returns:
        the length in millipoints
      • getLengthValue

        public int getLengthValue​(PercentBaseContext context)
        Returns the computed length value.
        Parameters:
        context - The context for the length calculation (for percentage based lengths)
        Returns:
        the length in millipoints
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Property
      • getLength

        public Length getLength()
        TODO: Should we allow this?
        Overrides:
        getLength in class Property
        Returns:
        this.condLength cast as a Length
      • getObject

        public java.lang.Object getObject()
        Description copied from class: Property
        This method expects to be overridden by subclasses
        Overrides:
        getObject in class Property
        Returns:
        this.condLength cast as an Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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