Interface Name

All Superinterfaces:
Comparable<Name>
All Known Subinterfaces:
ElementName, FullyQualifiedName, Names, OtherName, QualifiedName, QualifyingName, RelativeName
All Known Implementing Classes:
ConfigurationName, CppNames.ForBinary, CppNames.ForComponent, TaskName

public interface Name extends Comparable<Name>
Strongly represent a name object. A name object has a very simple contract where the Object#toString() returns the string representation of the name. Hence, a loose representation of a name object could be any Object implementation that respect this contract. For this reason, we recommend treating name object as Object unless a strongly typed interface is required.
  • Method Details

    • compareTo

      default int compareTo(Name name)
      Specified by:
      compareTo in interface Comparable<Name>
    • of

      static Name of(Object name)
      Convert any object into a name object.
      Parameters:
      name - the name to convert, can be a Name itself or any Object respecting the contract, must not be null.
      Returns:
      a Name instance representing the object.
    • get

      @Nullable Object get(String propertyName)
    • of

      static FullyQualifiedName of(Named name)
    • toString

      default String toString(dev.nokee.commons.names.NameBuilder builder)