FeatureRange extends PredicateValue { public void addPartition(RangePartition p) { if (p instanceof RangeEdgePartition) { edgePartitions.add((RangeEdgePartition)p); } else { partitions.add(p); } } FeatureRange(String key);  FeatureRange(String key, Long fromInclusive, Long toInclusive); FeatureRange setKey(String key); String getKey(); FeatureRange setFromInclusive(Long from); Long getFromInclusive(); FeatureRange setToInclusive(Long to); Long getToInclusive(); void addPartition(RangePartition p); List<RangeEdgePartition> getEdgePartitions(); List<RangePartition> getPartitions(); void clearPartitions(); @Override FeatureRange clone(); @Override int hashCode(); @Override boolean equals(Object obj); static FeatureRange buildFromMixedIn(String key, List<String> partitions, int arity);  }
@Test public void requireThatRangePartitionsCanBeAdded() { FeatureRange range = new FeatureRange("foo", 10L, 22L); range.addPartition(new RangePartition("foo=10-19")); range.addPartition(new RangePartition("foo", 0, 0x8000000000000000L, true)); range.addPartition(new RangeEdgePartition("foo=20", 20, 0, 2)); assertEquals("foo in [10..22 (foo=20+[..2],foo=10-19,foo=-9223372036854775808-0)]", range.toString()); }