Package dev.cel.common.ast
Class CelExprIdGeneratorFactory
- java.lang.Object
-
- dev.cel.common.ast.CelExprIdGeneratorFactory
-
public final class CelExprIdGeneratorFactory extends java.lang.Object
Factory for populating expression IDs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CelExprIdGeneratorFactory.ExprIdGenerator
Functional interface for generating the next unique expression ID.static class
CelExprIdGeneratorFactory.MonotonicIdGenerator
MonotonicIdGenerator increments expression IDs from an initial seed value.static class
CelExprIdGeneratorFactory.StableIdGenerator
StableIdGenerator 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.MonotonicIdGenerator
newMonotonicIdGenerator(long exprId)
MonotonicIdGenerator increments expression IDs from an initial seed value.static CelExprIdGeneratorFactory.StableIdGenerator
newStableIdGenerator(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.
-
-