2 * SPDX-FileCopyrightText: The reguloj Authors
3 * SPDX-License-Identifier: 0BSD
5 package wtf
.metio
.reguloj
;
9 * A {@link Context} is used by a {@link RuleEngine} to evaluate a collection of {@link Rule rules}.
12 * @param <TOPIC> The topic of the context.
16 public interface Context
<TOPIC
> {
19 * Creates an immutable context that just contains the given topic.
21 * @param topic The topic value of the context.
22 * @param <TOPIC> The topic type of the context.
23 * @return A new context with the given value.
25 static <TOPIC
> Context
<TOPIC
> of(final TOPIC topic
) {
26 return new SimpleContext
<>(topic
);
30 * @return The topic of this inference context.