|
1 | 1 | /* |
2 | | - * Copyright (c) 2018-2022, FusionAuth, All Rights Reserved |
| 2 | + * Copyright (c) 2018-2025, FusionAuth, All Rights Reserved |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, |
| 11 | + * software distributed under the License is distributed on an |
| 12 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, |
| 13 | + * either express or implied. See the License for the specific |
| 14 | + * language governing permissions and limitations under the License. |
3 | 15 | */ |
4 | 16 | package io.fusionauth.domain.search; |
5 | 17 |
|
| 18 | +import java.util.Objects; |
| 19 | + |
6 | 20 | import com.inversoft.json.JacksonConstructor; |
7 | 21 | import com.inversoft.json.ToString; |
8 | 22 |
|
@@ -46,6 +60,20 @@ public SortField(String name, Sort order, String missing) { |
46 | 60 | this.missing = missing; |
47 | 61 | } |
48 | 62 |
|
| 63 | + @Override |
| 64 | + public boolean equals(Object o) { |
| 65 | + if (o == null || getClass() != o.getClass()) { |
| 66 | + return false; |
| 67 | + } |
| 68 | + SortField sortField = (SortField) o; |
| 69 | + return Objects.equals(missing, sortField.missing) && Objects.equals(name, sortField.name) && order == sortField.order; |
| 70 | + } |
| 71 | + |
| 72 | + @Override |
| 73 | + public int hashCode() { |
| 74 | + return Objects.hash(missing, name, order); |
| 75 | + } |
| 76 | + |
49 | 77 | @Override |
50 | 78 | public String toString() { |
51 | 79 | return ToString.toString(this); |
|
0 commit comments