Skip to content

Instantly share code, notes, and snippets.

@TatsuUkraine
Last active January 10, 2020 19:07
Show Gist options
  • Save TatsuUkraine/324542acc5c4747fbe47374e78d503f0 to your computer and use it in GitHub Desktop.
Save TatsuUkraine/324542acc5c4747fbe47374e78d503f0 to your computer and use it in GitHub Desktop.
class ClientCriteria<I> {
final ClientCriteriaEnum criteria;
final ComparatorEnum comparator;
final I value;
ClientCriteria(
this.criteria,
this.value,
[this.comparator = ComparatorEnum.EQUALS]
);
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is ClientCriteria &&
runtimeType == other.runtimeType &&
criteria == other.criteria &&
comparator == other.comparator &&
value == other.value;
@override
int get hashCode =>
criteria.hashCode ^
comparator.hashCode ^
value.hashCode;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment