MCPcopy Create free account
hub / github.com/Berkeley-CS61B/skeleton-sp23 / getNodeClass

Method getNodeClass

proj1a/tests/NodeChecker.java:129–136  ·  view source on GitHub ↗

This method gets a valid, internal node class from a given class. @param clazz the class you want to check @param doublyLinked whether or not the list can be doubly linked @return the node class

(Class<?> clazz, boolean doublyLinked)

Source from the content-addressed store, hash-verified

127 * @return the node class
128 */
129 public static Class<?> getNodeClass(Class<?> clazz, boolean doublyLinked) {
130 for (Class<?> c : clazz.getDeclaredClasses()) {
131 if (isNode(c, doublyLinked)) {
132 return c;
133 }
134 }
135 return null;
136 }
137
138 /**
139 * This method gets fields of specified type from a given class.

Callers 1

Calls 1

isNodeMethod · 0.95

Tested by

no test coverage detected