Interface ErrorHit

  • All Superinterfaces:
    java.lang.Cloneable
    All Known Implementing Classes:
    DefaultErrorHit

    public interface ErrorHit
    extends java.lang.Cloneable
    A hit which holds information on error conditions in a result. En error hit maintains a main error - the main error of the result.
    Author:
    bratseth
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addError​(ErrorMessage error)
      Adds an error to this.
      void addErrors​(ErrorHit errorHit)
      Add all errors from another error hit to this
      java.lang.Object clone()  
      java.util.Iterator<? extends ErrorMessage> errorIterator()
      Returns all the detail errors of this error hit, including the main error
      java.util.Set<ErrorMessage> errors()
      Returns a read-only set containing all the error of this, including the main error
      boolean hasOnlyErrorCode​(int code)
      Returns true if all errors in this has the given error code
      boolean isMeta()
      Returns true - this is a meta hit containing information on other hits
      void setSource​(java.lang.String source)  
    • Method Detail

      • setSource

        void setSource​(java.lang.String source)
      • addError

        void addError​(ErrorMessage error)
        Adds an error to this. This may change the main error and/or the list of detailed errors
      • addErrors

        void addErrors​(ErrorHit errorHit)
        Add all errors from another error hit to this
      • errorIterator

        java.util.Iterator<? extends ErrorMessage> errorIterator()
        Returns all the detail errors of this error hit, including the main error
      • errors

        java.util.Set<ErrorMessage> errors()
        Returns a read-only set containing all the error of this, including the main error
      • isMeta

        boolean isMeta()
        Returns true - this is a meta hit containing information on other hits
      • hasOnlyErrorCode

        boolean hasOnlyErrorCode​(int code)
        Returns true if all errors in this has the given error code
      • clone

        java.lang.Object clone()