Java, searching within a list of objects?

后端 未结 6 1902
名媛妹妹
名媛妹妹 2020-12-09 10:49

I\'m a bit lost on the way to make this happen the fastest. I have a large list of objects that have basic variable attributes (with getters / setters) and I need to do a se

6条回答
  •  借酒劲吻你
    2020-12-09 11:43

    One library I'm familiar with is Guava -- you can compose its Predicate to pull out items from an Iterable. There's no need for the collection to be pre-sorted. (This means, in turn, that it's O(N), but it's convenient.)

提交回复
热议问题