File tree Expand file tree Collapse file tree
lib/shared/common/src/main/java/com/launchdarkly/sdk/fdv2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .launchdarkly .sdk .fdv2 ;
22
3+ import java .util .Objects ;
4+
35/**
46 * Identifies a specific version of data in the LaunchDarkly backend, used to request incremental
57 * updates from a known point.
@@ -75,4 +77,24 @@ public static Selector make(int version, String state) {
7577 * value when constructing a {@link ChangeSet}.
7678 */
7779 public static final Selector EMPTY = empty ();
80+
81+ @ Override
82+ public boolean equals (Object o ) {
83+ if (this == o ) return true ;
84+ if (!(o instanceof Selector )) return false ;
85+ Selector other = (Selector ) o ;
86+ return isEmpty == other .isEmpty
87+ && version == other .version
88+ && Objects .equals (state , other .state );
89+ }
90+
91+ @ Override
92+ public int hashCode () {
93+ return Objects .hash (isEmpty , version , state );
94+ }
95+
96+ @ Override
97+ public String toString () {
98+ return isEmpty ? "Selector(empty)" : "Selector(" + version + "," + state + ")" ;
99+ }
78100}
You can’t perform that action at this time.
0 commit comments