Interface AlgorithmEvidence

    • Method Detail

      • getAlgorithm

        String getAlgorithm()
        Get the algorithm name associated with this evidence (will never be null).
        Returns:
        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
        Parameters:
        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
        Returns:
        the result of the function, or null if the evidence is not of the given type