Class Namespace

  • Direct Known Subclasses:
    ImmutableNamespace

    @Immutable(prehash=true)
    public abstract class Namespace
    extends Object
    For a given table name a.b.c.tableName, the Namespace would be the prefix a.b.c, since the last element tableName always represents the name of the actual table and is not included in the Namespace itself. Therefore, the Namespace is always consisting of the first N-1 elements.
    • Constructor Detail

      • Namespace

        public Namespace()
    • Method Detail

      • name

        @NotNull
        public abstract @NotNull String name()
      • isEmpty

        public boolean isEmpty()
      • of

        public static Namespace of​(String... elements)
        Builds a Namespace instance out of the first N-1 elements.
        Parameters:
        elements - The elements to build the namespace from.
        Returns:
        A Namespace instance, where the name() represents the first N-1 elements. If elements consists only of a single element, then name() will be an empty string.
      • of

        public static Namespace of​(List<String> elements)
        Builds a Namespace instance out of the first N-1 elements.
        Parameters:
        elements - The elements to build the namespace from.
        Returns:
        A Namespace instance, where the name() represents the first N-1 elements. If elements consists only of a single element, then name() will be an empty string.
      • parse

        public static Namespace parse​(String identifier)
        Builds a Namespace instance out of the first N-1 elements when those are split by the . (dot) character.
        Parameters:
        identifier - The identifier to build the namespace from.
        Returns:
        Splits the given identifier by . and returns a Namespace instance, where the name() represents the first N-1 elements. If identifier consists only of a single element, then name() will be an empty string.