public final class Tables extends java.lang.Object implements java.lang.Iterable<TableMetadata>
Modifier and Type | Class and Description |
---|---|
static class |
Tables.Builder |
static class |
Tables.TablesDiff |
Modifier and Type | Method and Description |
---|---|
static Tables.Builder |
builder() |
boolean |
equals(java.lang.Object o) |
Tables |
filter(java.util.function.Predicate<TableMetadata> predicate) |
java.util.Optional<TableMetadata> |
get(java.lang.String name)
Get the table with the specified name
|
TableMetadata |
getNullable(java.lang.String name)
Get the table with the specified name
|
int |
hashCode() |
java.util.Iterator<TableMetadata> |
iterator() |
static Tables |
none() |
static Tables |
of(java.lang.Iterable<TableMetadata> tables) |
static Tables |
of(TableMetadata... tables) |
java.lang.Iterable<TableMetadata> |
referencingUserType(java.nio.ByteBuffer name) |
int |
size() |
java.util.stream.Stream<TableMetadata> |
stream() |
java.lang.String |
toString() |
Tables |
with(TableMetadata table)
Create a Tables instance with the provided table added
|
Tables |
without(java.lang.String name)
Creates a Tables instance with the table with the provided name removed
|
Tables |
without(TableMetadata table) |
Tables |
withSwapped(TableMetadata table) |
Tables |
withUpdatedUserType(UserType udt) |
public static Tables.Builder builder()
public static Tables none()
public static Tables of(TableMetadata... tables)
public static Tables of(java.lang.Iterable<TableMetadata> tables)
public java.util.Iterator<TableMetadata> iterator()
iterator
in interface java.lang.Iterable<TableMetadata>
public java.util.stream.Stream<TableMetadata> stream()
public java.lang.Iterable<TableMetadata> referencingUserType(java.nio.ByteBuffer name)
public int size()
public java.util.Optional<TableMetadata> get(java.lang.String name)
name
- a non-qualified table nameOptional
if the table name is not found; a non-empty optional of TableMetadataRef
otherwise@Nullable public TableMetadata getNullable(java.lang.String name)
name
- a non-qualified table nameTableMetadataRef
otherwisepublic Tables filter(java.util.function.Predicate<TableMetadata> predicate)
public Tables with(TableMetadata table)
public Tables withSwapped(TableMetadata table)
public Tables without(java.lang.String name)
public Tables without(TableMetadata table)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2009-2021 The Apache Software Foundation