StringPoolUtils class

Interner: returns canonical instance for equal strings.

Optional maxSize limits the pool; when exceeded, one arbitrary entry is evicted (FIFO by first intern after full). Omit for unbounded pooling.

Constructors

StringPoolUtils({int? maxSize})
Creates a string pool. Pass maxSize to bound the pool with FIFO eviction; omit it for unbounded pooling.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
Number of distinct interned strings.
no setter

Methods

intern(String s) String
Returns the canonical string equal to s; deduplicates repeated strings.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited