Advertisement
Guest User

Untitled

a guest
Dec 30th, 2015
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. ImmutableRangeSet<LocalTime> r1 = new ImmutableRangeSet.Builder<LocalTime>().add(Range.openClosed(new LocalTime(8, 0, 0), new LocalTime(10, 0, 0))).build();
  2.         ImmutableRangeSet<LocalTime> r2 = new ImmutableRangeSet.Builder<LocalTime>().add(Range.openClosed(new LocalTime(9, 0, 0), new LocalTime(11, 0, 0))).build();
  3.         ImmutableRangeSet<LocalTime> result = new ImmutableRangeSet.Builder<LocalTime>().addAll(r1).addAll(r2).build();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement