Class ConstantDisplayEvalutor

java.lang.Object
ch.tocco.nice2.model.base.impl.display.ConstantDisplayEvalutor
All Implemented Interfaces:
DisplayEvaluator

public final class ConstantDisplayEvalutor extends Object implements DisplayEvaluator
A display-evaluator which just displays a constant string. Intended for stuff like seperation-characters like'/', '-' etc
  • Constructor Details

    • ConstantDisplayEvalutor

      public ConstantDisplayEvalutor()
  • Method Details

    • evaluate

      public String evaluate(String toEvaluate)
      Description copied from interface: DisplayEvaluator
      Evaluate the resource and return it as string
      Specified by:
      evaluate in interface DisplayEvaluator
      Parameters:
      toEvaluate - the resource-identifier @return the resource, non-null
      Returns:
      text, non-null
    • canResolve

      public boolean canResolve(String toEvaluate)
      Description copied from interface: DisplayEvaluator
      Return if this display-value can be evaluated. If it cannot, the DisplayEvaluator.evaluate(String)-Method still has to return a string. This will may be called allready during the configuration-reading process and out of the evaluation-context. So this method cannot expect a 'real'-evaluation-context to evaluate in.
      Specified by:
      canResolve in interface DisplayEvaluator
      Returns:
      true/false