MCPcopy Create free account
hub / github.com/ReadyTalk/avian / compareTo

Method compareTo

classpath/java/lang/Enum.java:24–30  ·  view source on GitHub ↗
(E other)

Source from the content-addressed store, hash-verified

22 }
23
24 public int compareTo(E other) {
25 if (getDeclaringClass() != other.getDeclaringClass()) {
26 throw new ClassCastException();
27 }
28
29 return ordinal - other.ordinal;
30 }
31
32 public static <T extends Enum<T>> T valueOf(Class<T> enumType, String name) {
33 if (name == null) throw new NullPointerException("name");

Callers

nothing calls this directly

Calls 2

getDeclaringClassMethod · 0.95
getDeclaringClassMethod · 0.65

Tested by

no test coverage detected