Class ConditionDecision

    • Constructor Detail

      • ConditionDecision

        @Deprecated
        public ConditionDecision​(boolean satisfied,
                                 Map<String,​Set<String>> advices)
        Deprecated.
        Constructs an instance of ConditionDecision.
        Deprecated, favour the factory methods.
        Parameters:
        satisfied - result of this ConditionDecision.
        advices - Advice map of this ConditionDecision.
      • ConditionDecision

        @Deprecated
        public ConditionDecision​(boolean satisfied,
                                 Map<String,​Set<String>> advices,
                                 long ttl)
        Deprecated.
        Constructs an instance of ConditionDecision.
        Deprecated, favour the factory methods.
        Parameters:
        satisfied - Result of this ConditionDecision.
        advices - Advice map of this ConditionDecision.
        ttl - The TTL of this ConditionDecision.
    • Method Detail

      • isSatisfied

        public boolean isSatisfied()
        Whether this ConditionDecision is satisfied.
        Returns:
        true if ConditionDecision is fulfilled.
      • getAdvice

        public Map<String,​Set<String>> getAdvice()
        Advices associated with this ConditionDecision.
        Returns:
        advice of ConditionDecision.
      • getResponseAttributes

        public Map<String,​Set<String>> getResponseAttributes()
        Retrieves the response attributes.
        Returns:
        the response attributes
      • getTimeToLive

        public long getTimeToLive()
        Returns the time to live (TTL) of this ConditionDecision.
        Returns:
        The TTL time in ms.
      • clearAdvices

        @Deprecated
        public void clearAdvices()
        Deprecated.
        Clears the current advice associated with this ConditionDecision.
        Deprecated method as a given instance should be immutable.
      • addAdvices

        @Deprecated
        public void addAdvices​(ConditionDecision decision)
        Deprecated.
        Adds an advice (from another ConditionDecision) to this ConditionDecision.
        Deprecated method as a given instance should be immutable.
        Parameters:
        decision - The ConditionDecision whose advice should be added to this ConditionDecision.
      • newBuilder

        public static ConditionDecision.Builder newBuilder​(boolean satisfied)
        New decision builder.
        Parameters:
        satisfied - whether the decision represents a successful evaluation or not
        Returns:
        new builder instance
      • newSuccessBuilder

        public static ConditionDecision.Builder newSuccessBuilder()
        New builder representing a satisfied.
        Returns:
        new builder instance
      • newFailureBuilder

        public static ConditionDecision.Builder newFailureBuilder()
        New builder representing a failure.
        Returns:
        new builder instance