public final class ModelLabelKey extends Object
'Ab' is not an Oracle identifier that folds to 'AB', and two different
expressions are not the same expression because a vendor happens to be
case-insensitive. Conversely, comparing an identifier with equals is wrong in the
other direction.
So labels compare exactly — byte-for-byte, no case folding, no
delimiter stripping, no vendor rules — and they carry a ModelLabelKey.Kind so that a label can
never collide with an identifier key or with a label of another kind in the same index.
The root CLAUDE.md allows equalsIgnoreCase for "dlineage display names"
precisely because they are not identifiers; this type is the positive form of that rule:
if a name is a label, key it here, and the question of which vendor folding applies never
arises.
This type deliberately does not decide whether a given model name is an identifier or a label — that is a per-call-site judgement made when the index is migrated in stage S3. It only makes the two representable as different things.
| Modifier and Type | Class and Description |
|---|---|
static class |
ModelLabelKey.Kind
What kind of non-identifier name this is.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
ModelLabelKey.Kind |
getKind() |
String |
getText()
The label text, exactly as supplied.
|
int |
hashCode() |
static ModelLabelKey |
of(ModelLabelKey.Kind kind,
String text) |
String |
toString() |
public static ModelLabelKey of(ModelLabelKey.Kind kind, String text)
kind - what sort of label this is; labels of different kinds never compare equaltext - the label exactly as the model holds it — not normalized, not trimmedIllegalArgumentException - if either argument is null. An empty string IS a
legal label (an empty expression rendering is a real, distinguishable state);
null is not, because a null label in an index is a bug, not a value.public ModelLabelKey.Kind getKind()