Class ColorResolver.Result

java.lang.Object
com.iizix.prop.ColorResolver.Result
Enclosing class:
ColorResolver

public static final class ColorResolver.Result extends Object
The result of a resolution: the status, the color and, when not resolved, the reason.
Author:
Christopher Mindus
  • Method Details

    • getStatus

      public ColorResolver.Status getStatus()
      Gets the status.
      Returns:
      The status.
    • getColor

      public GColor getColor()
      Gets the color.
      Returns:
      The literal or GColor.INHERIT reached, GColor.UNRESOLVED when the status is not ColorResolver.Status.RESOLVED. Never null and never a reference.
    • getDetail

      public String getDetail()
      Gets the reason when not resolved.
      Returns:
      The reason, phrased to follow "The reference '...'", or null when resolved.
    • getDepth

      public int getDepth()
      Gets the number of references followed.
      Returns:
      The depth, zero for a literal palette color.
    • isResolved

      public boolean isResolved()
      Checks if the reference resolved.
      Returns:
      true for ColorResolver.Status.RESOLVED.
    • toString

      public String toString()
      Returns a string representation of this result.
      Overrides:
      toString in class Object
      Returns:
      The status, the color and the detail.