Interface AlgorithmEvidence

    • Method Detail

      • getAlgorithm

        String getAlgorithm()
        Get the algorithm name associated with this evidence (will never be null).
        the algorithm name
      • castAndApply

        default <E extends Evidence,​R> R castAndApply​(Class<E> evidenceType,
                                                            String algorithmName,
                                                            Function<E,​R> function)
        Description copied from interface: Evidence
        Cast this evidence type and apply a function if the type matches.
        Specified by:
        castAndApply in interface Evidence
        Type Parameters:
        E - the evidence type
        R - the return type
        evidenceType - the evidence type class to check
        algorithmName - the name of the algorithm or null if any algorithm is acceptable
        function - the function to apply
        the result of the function, or null if the evidence is not of the given type