Class Schema.EntriesOrder
java.lang.Object
org.talend.sdk.component.api.record.Schema.EntriesOrder
- All Implemented Interfaces:
Comparator<Schema.Entry>
- Enclosing interface:
- Schema
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(Schema.Entry e1, Schema.Entry e2) Move a field after another one.moveBefore
(String before, String name) Move a field before another one.static Schema.EntriesOrder
Build an EntriesOrder according fields.static Schema.EntriesOrder
Build an EntriesOrder according fields.Swap two fields.toFields()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
EntriesOrder
-
EntriesOrder
-
-
Method Details
-
of
Build an EntriesOrder according fields.- Parameters:
fields
- the fields ordering. Each field should be,
separated.- Returns:
- the order EntriesOrder
-
of
Build an EntriesOrder according fields.- Parameters:
fields
- the fields ordering.- Returns:
- the order EntriesOrder
-
getFieldsOrder
-
moveAfter
Move a field after another one.- Parameters:
after
- the field name referencename
- the field name- Returns:
- this EntriesOrder
-
moveBefore
Move a field before another one.- Parameters:
before
- the field name referencename
- the field name- Returns:
- this EntriesOrder
-
swap
Swap two fields.- Parameters:
name
- the field namewith
- the other field- Returns:
- this EntriesOrder
-
toFields
-
getComparator
-
compare
- Specified by:
compare
in interfaceComparator<Schema.Entry>
-