Class Tables

  • All Implemented Interfaces:
    java.lang.Iterable<TableMetadata>

    public final class Tables
    extends java.lang.Object
    implements java.lang.Iterable<TableMetadata>
    An immutable container for a keyspace's Tables.
    • Method Detail

      • none

        public static Tables none()
      • iterator

        public java.util.Iterator<TableMetadata> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<TableMetadata>
      • stream

        public java.util.stream.Stream<TableMetadata> stream()
      • referencingUserType

        public java.lang.Iterable<TableMetadata> referencingUserType​(java.nio.ByteBuffer name)
      • size

        public int size()
      • get

        public java.util.Optional<TableMetadata> get​(java.lang.String name)
        Get the table with the specified name
        Parameters:
        name - a non-qualified table name
        Returns:
        an empty Optional if the table name is not found; a non-empty optional of TableMetadataRef otherwise
      • getNullable

        @Nullable
        public TableMetadata getNullable​(java.lang.String name)
        Get the table with the specified name
        Parameters:
        name - a non-qualified table name
        Returns:
        null if the table name is not found; the found TableMetadataRef otherwise
      • with

        public Tables with​(TableMetadata table)
        Create a Tables instance with the provided table added
      • without

        public Tables without​(java.lang.String name)
        Creates a Tables instance with the table with the provided name removed
      • withUpdatedUserType

        public Tables withUpdatedUserType​(UserType udt)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object