Package io.debezium.config
Class Field.Set
- java.lang.Object
-
- io.debezium.config.Field.Set
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,Field>
fieldsByName
-
Constructor Summary
Constructors Modifier Constructor Description private
Set()
private
Set(Collection<Field> fields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
allFieldNames()
Field[]
asArray()
Get the fields in this set as an array.Field
fieldWithName(String name)
Get the field with the given {Field#name() name}.Field.Set
filtered(Predicate<Field> filter)
void
forEachMissingDependent(Consumer<String> consumer)
Call the supplied function for each of this set's fields that have non-existent dependents.void
forEachTopLevelField(Consumer<Field> consumer)
Call the supplied function for each of this set's fields that are not included as dependents in other fields.Iterator<Field>
iterator()
Field.Set
with(Field... fields)
Get a new set that contains the fields in this set and those supplied.Field.Set
with(Iterable<Field> fields)
Get a new set that contains the fields in this set and those supplied.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
Set
private Set()
-
Set
private Set(Collection<Field> fields)
-
-
Method Detail
-
fieldWithName
public Field fieldWithName(String name)
Get the field with the given {Field#name() name}.- Parameters:
name
- the name of the field- Returns:
- the field, or
null
if there is no field with the given name
-
asArray
public Field[] asArray()
Get the fields in this set as an array.- Returns:
- the array of fields; never null
-
forEachMissingDependent
public void forEachMissingDependent(Consumer<String> consumer)
Call the supplied function for each of this set's fields that have non-existent dependents.- Parameters:
consumer
- the function; may not be null
-
forEachTopLevelField
public void forEachTopLevelField(Consumer<Field> consumer)
Call the supplied function for each of this set's fields that are not included as dependents in other fields.- Parameters:
consumer
- the function; may not be null
-
with
public Field.Set with(Field... fields)
Get a new set that contains the fields in this set and those supplied.- Parameters:
fields
- the fields to include with this set's fields- Returns:
- the new set; never null
-
with
public Field.Set with(Iterable<Field> fields)
Get a new set that contains the fields in this set and those supplied.- Parameters:
fields
- the fields to include with this set's fields- Returns:
- the new set; never null
-
-