package com.cloudant.sync.query;

/**
 * Created by tomblench on 28/09/2016.
 */

public class FieldSort {

    public final String field;
    public final Direction sort;

    public FieldSort(String field) {
        this.field = field;
        this.sort = Direction.ASCENDING;
    }

    public FieldSort(String field, Direction sort) {
        this.field = field;
        this.sort = sort;
    }


    public enum Direction {
        ASCENDING,
        DESCENDING
    };


}

@@ -393,16 +393,734 @@
 %0A    %7D%0A%0A
+    @Override%0A    public boolean equals(Object o) %7B%0A        if (this == o) %7B%0A            return true;%0A        %7D%0A        if (o == null %7C%7C getClass() != o.getClass()) %7B%0A            return false;%0A        %7D%0A%0A        FieldSort fieldSort = (FieldSort) o;%0A%0A        if (!field.equals(fieldSort.field)) %7B%0A            return false;%0A        %7D%0A        return sort == fieldSort.sort;%0A%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        int result = field.hashCode();%0A        result = 31 * result + sort.hashCode();%0A        return result;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return %22FieldSort%7B%22 +%0A                %22field='%22 + field + '%5C'' +%0A                %22, sort=%22 + sort +%0A                '%7D';%0A    %7D%0A
 %0A    pub
@@ -1186,11 +1186,10 @@
     %7D;%0A%0A
-%0A
 %7D%0A

Implement toString/equals/hashCode