Package dev.cel.common.ast
Class CelExprIdGeneratorFactory
- java.lang.Object
-
- dev.cel.common.ast.CelExprIdGeneratorFactory
-
public final class CelExprIdGeneratorFactory extends java.lang.ObjectFactory for populating expression IDs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCelExprIdGeneratorFactory.ExprIdGeneratorFunctional interface for generating the next unique expression ID.static classCelExprIdGeneratorFactory.MonotonicIdGeneratorMonotonicIdGenerator increments expression IDs from an initial seed value.static classCelExprIdGeneratorFactory.StableIdGeneratorStableIdGenerator ensures new IDs are only created the first time they are encountered.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CelExprIdGeneratorFactory.MonotonicIdGeneratornewMonotonicIdGenerator(long exprId)MonotonicIdGenerator increments expression IDs from an initial seed value.static CelExprIdGeneratorFactory.StableIdGeneratornewStableIdGenerator(long exprId)StableIdGenerator ensures new IDs are only created the first time they are encountered.
-
-
-
Method Detail
-
newMonotonicIdGenerator
public static CelExprIdGeneratorFactory.MonotonicIdGenerator newMonotonicIdGenerator(long exprId)
MonotonicIdGenerator increments expression IDs from an initial seed value.- Parameters:
exprId- Seed value. Must be non-negative. For example, if 1 is providedCelExprIdGeneratorFactory.MonotonicIdGenerator.nextExprId()will return 2.
-
newStableIdGenerator
public static CelExprIdGeneratorFactory.StableIdGenerator newStableIdGenerator(long exprId)
StableIdGenerator ensures new IDs are only created the first time they are encountered.- Parameters:
exprId- Seed value. Must be non-negative. For example, if 1 is providedCelExprIdGeneratorFactory.StableIdGenerator.renumberId(long)will return 2.
-
-