Package dev.omnist.document
Record Class Limits
java.lang.Object
java.lang.Record
dev.omnist.document.Limits
- Record Components:
maxDepth- maximum nesting depth (reference default: 200)maxNodeCount- maximum materialized node count (reference default: 1 000 000)maxIntegerDigits- maximum decimal digits in an integer literal (reference default: 4 300)
Safety limits bounding Document nesting depth, node count, and integer literal digits (omnist-spec §2.4).
Enforced by every untrusted-input entry point — OmlLexer,
OsdReader, and each format codec's reader — not by
Node/Edge construction itself, which stays unconditionally trusting
(a document already built in memory has no "input" left to bound).
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLimits(int maxDepth, int maxNodeCount, int maxIntegerDigits) Creates an instance of aLimitsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmaxDepth()Returns the value of themaxDepthrecord component.intReturns the value of themaxIntegerDigitsrecord component.intReturns the value of themaxNodeCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
Normative reference default limits per omnist-spec §2.4.
-
-
Constructor Details
-
Limits
public Limits(int maxDepth, int maxNodeCount, int maxIntegerDigits) Creates an instance of aLimitsrecord class.- Parameters:
maxDepth- the value for themaxDepthrecord componentmaxNodeCount- the value for themaxNodeCountrecord componentmaxIntegerDigits- the value for themaxIntegerDigitsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
maxDepth
public int maxDepth()Returns the value of themaxDepthrecord component.- Returns:
- the value of the
maxDepthrecord component
-
maxNodeCount
public int maxNodeCount()Returns the value of themaxNodeCountrecord component.- Returns:
- the value of the
maxNodeCountrecord component
-
maxIntegerDigits
public int maxIntegerDigits()Returns the value of themaxIntegerDigitsrecord component.- Returns:
- the value of the
maxIntegerDigitsrecord component
-