Class ValueLine.ValueEntry

  • Enclosing class:
    ValueLine

    public static class ValueLine.ValueEntry
    extends java.lang.Object
    The actual value object inside a value line. This object holds the source value string and the translated value. It tells whether or not the value has been resolved yet or if the cell shall be ignored.
    • Constructor Summary

      Constructors 
      Constructor Description
      ValueEntry​(int index, java.lang.String cellValue)
      Creates a new value entry.
    • Constructor Detail

      • ValueEntry

        public ValueEntry​(int index,
                          java.lang.String cellValue)
        Creates a new value entry.
        Parameters:
        index - column index
        cellValue - source cell value
    • Method Detail

      • createCopy

        public ValueLine.ValueEntry createCopy()
        Clones the entry by copying the source cell value.
        Returns:
        a clone of this entry
      • getIndex

        public int getIndex()
      • getCellValue

        public java.lang.String getCellValue()
        Gets the source cell value.
        Returns:
        source value
      • isUnresolved

        public boolean isUnresolved()
        Checks whether the entry is unresolved.
        Returns:
        true if entry is unresolved, false otherwise
      • isManuallyMarkedUnresolved

        public boolean isManuallyMarkedUnresolved()
      • hasUnresolvedReason

        public boolean hasUnresolvedReason​(java.lang.String valueLineReason)
      • getUnresolvedReason

        public java.lang.String getUnresolvedReason()
      • markUnresolved

        protected void markUnresolved()
        Marks the entry as unresolved.
      • markUnresolved

        public void markUnresolved​(java.lang.String reason)
        Marks the entry as unresolved caused by given reason.
        Parameters:
        reason - reason for not resolving value
      • resolve

        public void resolve​(java.lang.Object newTranslatedValue)
        Marks the entry as resolved and sets the translated value.
        Parameters:
        newTranslatedValue - the value translated from source value
      • markUnused

        protected void markUnused()
        Marks the entry as unused.
      • isUnused

        public boolean isUnused()
        Checks whether the entry is unused.
        Returns:
        true if entry is unused, false otherwise
      • isIgnore

        public boolean isIgnore()
        Checks whether this entry will be ignored.
        Returns:
        true if ignore flag is set, false otherwise
      • getTranslatedValue

        public java.lang.Object getTranslatedValue()
        Gets the translated value.
        Returns:
        translated value or null if unresolved
      • toString

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

        public void dump​(java.util.Map<java.lang.Integer,​java.lang.String> csvLine,
                         java.lang.Integer atPosition,
                         boolean wholeLineIsUnresolved)
      • canIgnoreValueInNextTurn

        protected boolean canIgnoreValueInNextTurn()