Interface ContextInheritance


  • public interface ContextInheritance
    Holder for information about inheritance between contexts. Immutable.
    Since:
    2.0.0
    • Method Detail

      • parents

        List<ContextValue<?>> parents​(ContextValue<?> context)
        Get the parents of a specific context.

        When this context is present in a subject's active contexts, its parents are appended to the subject's active contexts for the purpose of data queries.

        Parameters:
        context - The child context
        Returns:
        Any parent contexts, or an empty list
        Since:
        2.0.0
      • parents

        ContextInheritance parents​(ContextValue<?> context,
                                   @Nullable List<ContextValue<?>> parents)
        Set the parents for a specific context.
        Parameters:
        context - The context to set parents in
        parents - The parents to set, or null to clear parents for the context.
        Returns:
        A new context inheritance object with the updated parents
        Since:
        2.0.0