UniqueNamer class

Hands out entity names nothing else has.

Unique against the world and against every name already handed out. Tools name a whole batch — a paint stroke's merged rectangles, a multi-entity duplicate — before creating any of it, so checked against the world alone, every entity in the batch would get the same name. Parents are linked by name when a level loads, so a duplicate name is not cosmetic.

Constructors

UniqueNamer(Iterable<String> _existingNames())
Avoids the names the given function returns — the world's entity names, say — asked again on every call.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(String prefix) → String
A name of the form prefix_N that is not in use and has not been issued before.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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