Class PersistableFeatureValue

java.lang.Object
com.e1c.langtool.collector.PersistableFeatureValue
All Implemented Interfaces:
FeatureValue, ContextTranslationKey, TranslationKey, Serializable, Comparable<FeatureValue>

public final class PersistableFeatureValue extends Object implements FeatureValue, Comparable<FeatureValue>
See Also:
  • Constructor Details

    • PersistableFeatureValue

      public PersistableFeatureValue(org.eclipse.core.resources.IFile file, FeatureKey featureKey, FeatureSettings settings, String value, boolean computedValue)
      Instantiates a new persistable feature value.
      Parameters:
      file - the file, cannot be null
      featureKey - the feature key, cannot be null
      settings - the settings, cannot be null
      value - the value, cannot be null
      computedValue - the computed value
    • PersistableFeatureValue

      public PersistableFeatureValue(org.eclipse.core.resources.IFile file, FeatureKey featureKey, FeatureSettings settings, String value, boolean computedValue, boolean unknownValue, boolean tagValue)
      Instantiates a new persistable feature value.
      Parameters:
      file - the file, cannot be null
      featureKey - the feature key, cannot be null
      settings - the settings, cannot be null
      value - the value, cannot be null
      computedValue - the computed value
      unknownValue - the is unknown
      tagValue - the is tag or tag parameter
    • PersistableFeatureValue

      public PersistableFeatureValue(String fullPath, FeatureKey featureKey, FeatureSettings settings, String featureValue, boolean computedValue)
      Instantiates a new persistable feature value.
      Parameters:
      fullPath - the full path, cannot be null
      featureKey - the feature key, cannot be null
      settings - the settings, cannot be null
      featureValue - the feature value
      computedValue - the computed value
    • PersistableFeatureValue

      public PersistableFeatureValue(ContextTranslationKey contextKey)
      Instantiates a new persistable feature value.
      Parameters:
      contextKey - the context key, cannot be null
    • PersistableFeatureValue

      public PersistableFeatureValue(ContextTranslationKey contextKey, boolean computedValue)
      Instantiates a new persistable feature value.
      Parameters:
      contextKey - the context key, cannot be null
      computedValue - the computed value
    • PersistableFeatureValue

      public PersistableFeatureValue(ContextTranslationKey contextKey, boolean computedValue, boolean unknownValue, boolean tagValue)
      Instantiates a new persistable feature value.
      Parameters:
      contextKey - the context key, cannot be null
      computedValue - the computed value
      unknownValue - the is unknown
      tagValue - the is tag or tag parameter
    • PersistableFeatureValue

      public PersistableFeatureValue(ContextTranslationKey contextKey, boolean computedValue, String comment)
      Instantiates a new persistable feature value.
      Parameters:
      contextKey - the context key, cannot be null
      computedValue - the computed value
      comment - the comment, can be null
    • PersistableFeatureValue

      public PersistableFeatureValue(ContextTranslationKey contextKey, String comment, boolean computedValue, boolean unknownValue, boolean tagValue)
      Instantiates a new persistable feature value.
      Parameters:
      contextKey - the context key, cannot be null
      comment - the comment, can be null
      computedValue - the computed value
      unknownValue - the is unknown
      tagValue - the is tag or tag parameter
  • Method Details

    • getContextKey

      public ContextTranslationKey getContextKey()
      Description copied from interface: FeatureValue
      Gets the context translation key.
      Specified by:
      getContextKey in interface FeatureValue
      Returns:
      the context key, cannot return null.
    • isComputedValue

      public boolean isComputedValue()
      Description copied from interface: FeatureValue
      Checks if the value is computed from base objects.
      Specified by:
      isComputedValue in interface FeatureValue
      Returns:
      the computedValue, cannot be null.
    • isUnknown

      public boolean isUnknown()
      Description copied from interface: FeatureValue
      Checks if the value is unknown.
      Specified by:
      isUnknown in interface FeatureValue
      Returns:
      true if unknown value.
    • isTag

      public boolean isTag()
      Description copied from interface: FeatureValue
      Checks if is tag or tag parameter.
      Specified by:
      isTag in interface FeatureValue
      Returns:
      true, if is tag or tag parameter.
    • getLocalStrings

      public Map<String,String> getLocalStrings()
      Description copied from interface: FeatureValue
      Gets the local strings of object feature.
      Specified by:
      getLocalStrings in interface FeatureValue
      Returns:
      the Map of local strings. The key of entry is "Language code" and the value of entry is the "local string" in this language. Cannot be null.
    • getComment

      public String getComment()
      Description copied from interface: FeatureValue
      Gets the comment for the collected value.
      Specified by:
      getComment in interface FeatureValue
      Returns:
      the comment
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(FeatureValue o)
      Specified by:
      compareTo in interface Comparable<FeatureValue>
    • toString

      public String toString()
      Overrides:
      toString in class Object