Skip to content

Instantly share code, notes, and snippets.

@Sanne
Created May 10, 2023 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sanne/a63a56df56545d3d81819f0abf06af65 to your computer and use it in GitHub Desktop.
Save Sanne/a63a56df56545d3d81819f0abf06af65 to your computer and use it in GitHub Desktop.
public void compareAndSerialize(Object o) {
if (o instanceof Comparable) {
useComparable((Comparable) o);
}
if (o instanceof Serializable) {
useSerializable((Serializable) o);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment