Michael03/19/2018, 2:18 PM
The “FilterConditionOperator” thing really annoys me - and I don’t think I’ve seen a way to sort of “force a static `import`“, right? Would the “idiomatic Kotlin” way to go be maybe to make an infix function for each of the enum values, as a FilterConditionFactory?
Criteria criteria = new Criteria(new Filter(new Filter.FilterConditions("field", "value", FilterConditionOperator.EQ)))
Evgeniy Zaharov03/19/2018, 2:19 PM
Michael03/19/2018, 2:22 PM
doesn’t have a default constructor - I was trying to look at some DSL examples, but they seemed to start with a default constructor, then set the fields. That’s when I thought, maybe infix functions as constructors (for that portion) might be the way to go, the way `map`s can use
to generate pairs.