Skip to content

Instantly share code, notes, and snippets.

@davideanastasia
Created September 3, 2019 06:00
Show Gist options
  • Save davideanastasia/eb114eeb544d38a71821caf21f0705b6 to your computer and use it in GitHub Desktop.
Save davideanastasia/eb114eeb544d38a71821caf21f0705b6 to your computer and use it in GitHub Desktop.
TiledIntervalWindow Comparator
public static final Comparator<TiledIntervalWindow> TIME_ONLY_COMPARATOR = (o1, o2) -> ComparisonChain.start()
.compare(o1.start, o2.start)
.compare(o1.end, o2.end)
.result();
public static final Comparator<TiledIntervalWindow> SPACE_AND_TIME_COMPARATOR = (o1, o2) -> ComparisonChain.start()
.compare(o1.hexAddr, o2.hexAddr)
.compare(o1.start, o2.start)
.compare(o1.end, o2.end)
.result();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment