Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 44fc10a

Browse files
committed
removed setter for final attributes
1 parent 4617f78 commit 44fc10a

1 file changed

Lines changed: 21 additions & 12 deletions

File tree

src/main/java/com/sybit/airtable/Sort.java

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,42 @@ public class Sort {
1313

1414
public enum Direction {asc, desc}
1515

16-
private String field;
16+
private final String field;
1717

18-
private Direction direction;
18+
private final Direction direction;
1919

2020
/**
21+
* Sort ascending given field.
2122
*
22-
* @param field
23-
* @param direction
23+
* @param field name of field
24+
*/
25+
public Sort(String field) {
26+
this(field, Direction.asc);
27+
}
28+
/**
29+
* Sort given field by defined direction.
30+
*
31+
* @param field name of field
32+
* @param direction sort direction
2433
*/
2534
public Sort(String field, Direction direction) {
2635
this.field = field;
2736
this.direction = direction;
2837
}
2938

39+
/**
40+
*
41+
* @return
42+
*/
3043
public String getField() {
3144
return field;
3245
}
3346

34-
public void setField(String field) {
35-
this.field = field;
36-
}
37-
47+
/**
48+
*
49+
* @return
50+
*/
3851
public Direction getDirection() {
3952
return direction;
4053
}
41-
42-
public void setDirection(Direction direction) {
43-
this.direction = direction;
44-
}
4554
}

0 commit comments

Comments
 (0)