@Value.Immutable(prehash=true, builder=false, copy=false, intern=true) public abstract class CanonicalCellName extends Object implements Comparable<CanonicalCellName>
Cell
. There is a 1-1
mapping between these.
These should not be constructed by users and instead should only be acquired from a Cell
or via a CellNameResolver
.
Constructor and Description |
---|
CanonicalCellName() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CanonicalCellName o) |
abstract Optional<String> |
getLegacyName()
Returns the underlying name in the legacy
Optional<String> format. |
String |
getName()
Returns the name in a human-readable form.
|
static CanonicalCellName |
of(Optional<String> name) |
static CanonicalCellName |
rootCell() |
String |
toString() |
static CanonicalCellName |
unsafeNotACell()
This cell object is used when there's no cell, but
CanonicalCellName object is needed. |
static CanonicalCellName |
unsafeOf(Optional<String> name)
Used for creating CanonicalCellName in places where we aren't guaranteed to be handling
canonicalization correctly.
|
static CanonicalCellName |
unsafeRootCell()
This should be used to mark places that are hardcoding the root cell's canonical name in a way
that doesn't ensure that it's correct.
|
public static CanonicalCellName rootCell()
public static CanonicalCellName unsafeNotACell()
CanonicalCellName
object is needed.
This cell name is never resolved successfully to a cell.public static CanonicalCellName unsafeRootCell()
public abstract Optional<String> getLegacyName()
Optional<String>
format.public String getName()
public int compareTo(CanonicalCellName o)
compareTo
in interface Comparable<CanonicalCellName>
public static CanonicalCellName of(Optional<String> name)
public static CanonicalCellName unsafeOf(Optional<String> name)