Class Schema.EntriesOrder
- java.lang.Object
-
- org.talend.sdk.component.api.record.Schema.EntriesOrder
-
- All Implemented Interfaces:
Comparator<Schema.Entry>
- Enclosing interface:
- Schema
public static class Schema.EntriesOrder extends Object implements Comparator<Schema.Entry>
-
-
Constructor Summary
Constructors Constructor Description EntriesOrder(String fields)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Schema.Entry e1, Schema.Entry e2)Schema.EntriesOrdermoveAfter(String after, String name)Move a field after another one.Schema.EntriesOrdermoveBefore(String before, String name)Move a field before another one.static Schema.EntriesOrderof(String fields)Build an EntriesOrder according fields.Schema.EntriesOrderswap(String name, String with)Swap two fields.StringtoFields()-
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 Detail
-
EntriesOrder
public EntriesOrder(String fields)
-
-
Method Detail
-
of
public static Schema.EntriesOrder of(String fields)
Build an EntriesOrder according fields.- Parameters:
fields- the fields ordering- Returns:
- the order EntriesOrder
-
moveAfter
public Schema.EntriesOrder moveAfter(String after, String name)
Move a field after another one.- Parameters:
after- the field name referencename- the field name- Returns:
- this EntriesOrder
-
moveBefore
public Schema.EntriesOrder moveBefore(String before, String name)
Move a field before another one.- Parameters:
before- the field name referencename- the field name- Returns:
- this EntriesOrder
-
swap
public Schema.EntriesOrder swap(String name, String with)
Swap two fields.- Parameters:
name- the field namewith- the other field- Returns:
- this EntriesOrder
-
compare
public int compare(Schema.Entry e1, Schema.Entry e2)
- Specified by:
comparein interfaceComparator<Schema.Entry>
-
-