Guava Range使用方法

概念 表示范围 guava对应功能方法
(a..b) {x | a < x < b} open(C, C)
[a..b] {x | a <= x <= b} closed(C, C)
[a..b) {x | a <= x < b} closedOpen(C, C)
(a..b] {x | a < x <= b} openClosed(C, C)
(a..+∞) {x | x > a} greaterThan(C)
[a..+∞) {x | x >= a} atLeast(C)
(-∞..b) {x | x < b} lessThan(C)
(-∞..b] {x | x <= b} atMost(C)
(-∞..+∞) all values all()
作者

雾非雾的情思

发布于

2018-05-09

更新于

2023-03-30

许可协议

评论