public final class Indexes extends java.lang.Object implements java.lang.Iterable<IndexMetadata>
Modifier and Type | Class and Description |
---|---|
static class |
Indexes.Builder |
Modifier and Type | Method and Description |
---|---|
static Indexes.Builder |
builder() |
boolean |
equals(java.lang.Object o) |
java.util.Optional<IndexMetadata> |
get(java.lang.String name)
Get the index with the specified name
|
java.util.Optional<IndexMetadata> |
get(java.util.UUID id)
Get the index with the specified id
|
boolean |
has(java.lang.String name)
Answer true if contains an index with the specified name.
|
boolean |
has(java.util.UUID id)
Answer true if contains an index with the specified id.
|
int |
hashCode() |
boolean |
isEmpty() |
java.util.Iterator<IndexMetadata> |
iterator() |
static Indexes |
none() |
static Indexes |
of(IndexMetadata... indexes) |
static Indexes |
of(java.lang.Iterable<IndexMetadata> indexes) |
Indexes |
replace(IndexMetadata index)
Creates a SecondaryIndexes instance which contains an updated index definition
|
int |
size() |
java.util.stream.Stream<IndexMetadata> |
stream() |
java.lang.String |
toString() |
void |
validate(TableMetadata table) |
Indexes |
with(IndexMetadata index)
Create a SecondaryIndexes instance with the provided index added
|
Indexes |
without(java.lang.String name)
Creates a SecondaryIndexes instance with the index with the provided name removed
|
public static Indexes.Builder builder()
public static Indexes none()
public static Indexes of(IndexMetadata... indexes)
public static Indexes of(java.lang.Iterable<IndexMetadata> indexes)
public java.util.Iterator<IndexMetadata> iterator()
iterator
in interface java.lang.Iterable<IndexMetadata>
public java.util.stream.Stream<IndexMetadata> stream()
public int size()
public boolean isEmpty()
public java.util.Optional<IndexMetadata> get(java.lang.String name)
name
- a non-qualified index nameOptional
if the named index is not found; a non-empty optional of IndexMetadata
otherwisepublic boolean has(java.lang.String name)
name
- a non-qualified index name.public java.util.Optional<IndexMetadata> get(java.util.UUID id)
id
- a UUID which identifies an indexOptional
if no index with the specified id is found; a non-empty optional of
IndexMetadata
otherwisepublic boolean has(java.util.UUID id)
id
- a UUID which identifies an index.public Indexes with(IndexMetadata index)
public Indexes without(java.lang.String name)
public Indexes replace(IndexMetadata index)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public void validate(TableMetadata table)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2009- The Apache Software Foundation