diff options
Diffstat (limited to 'config-model/src/main/java/com/yahoo/schema/fieldoperation/FieldOperation.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/schema/fieldoperation/FieldOperation.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/fieldoperation/FieldOperation.java b/config-model/src/main/java/com/yahoo/schema/fieldoperation/FieldOperation.java new file mode 100644 index 00000000000..126f594c371 --- /dev/null +++ b/config-model/src/main/java/com/yahoo/schema/fieldoperation/FieldOperation.java @@ -0,0 +1,22 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.schema.fieldoperation; + +import com.yahoo.schema.document.SDField; + +/** + * An operation on a field. + * Operations has a natural order of execution. + * + * @author Einar M R Rosenvinge + */ +public interface FieldOperation extends Comparable<FieldOperation> { + + /** Apply this operation on the given field */ + void apply(SDField field); + + @Override + default int compareTo(FieldOperation other) { + return 0; // no order by default + } + +} |