Class G2ScoringPlugin.ScoringContext

  • Enclosing interface:
    G2ScoringPlugin

    public static class G2ScoringPlugin.ScoringContext
    extends Object
    Context for scoring.
    • Constructor Detail

      • ScoringContext

        public ScoringContext​(FeatureInfo feature1,
                              FeatureInfo feature2)
        Constructs with the features to compare for scoring.
        Parameters:
        feature1 - The first feature to compare.
        feature2 - The second feature to compare.
    • Method Detail

      • getFeature1

        public FeatureInfo getFeature1()
        Gets the first feature to compare for scoring.
        Returns:
        The first feature to compare for scoring.
      • getFeature2

        public FeatureInfo getFeature2()
        Gets the second feature to compare for scoring.
        Returns:
        The second feature to compare for scoring.
      • getErrorMessage

        public String getErrorMessage()
        Get the error message (if any).
        Returns:
        The error message that was set or null if no error.
      • setErrorMessage

        public void setErrorMessage​(String message)
        Sets the error message (if any).
        Parameters:
        message - The error message to set if an error occurs, or null to clear an error.
      • getResults

        public Map<String,​String> getResults()
        Returns a Map which can be directly modified to set the results for this context. The plugin is expected to call Map.put(Object, Object) on the returned Map for each result value to be added.
        Returns:
        The Map to add the results to.