GP-3887: Update Debugger course for Trace RMI.

This commit is contained in:
Dan 2024-04-22 10:11:25 -04:00
parent 190f1eaa1e
commit a93a695e6a
79 changed files with 2235 additions and 1663 deletions

View file

@ -499,6 +499,21 @@ public enum PathUtils {
return Objects.equals(ancestor, successor.subList(0, ancestor.size()));
}
/**
* Assuming the first path is an ancestor of the second, compute the relative path from the
* first to the second.
*
* @param ancestor the ancestor (from)
* @param successor the successor (to)
* @return the relative path
*/
public static List<String> relativize(List<String> ancestor, List<String> successor) {
if (!isAncestor(ancestor, successor)) {
throw new IllegalArgumentException("First must be an ancestor of the second");
}
return successor.subList(ancestor.size(), successor.size());
}
/**
* Check whether a given object-valued attribute is a link.
*
@ -538,6 +553,7 @@ public enum PathUtils {
* Check whether a given attribute should be displayed.
*
* @param key the key of the given attribute
* @return true if hidden
*/
public static boolean isHidden(String key) {
return key.startsWith(TargetObject.PREFIX_INVISIBLE);