Skip to content

Commit

Permalink
Add greatgrandparent variants of unary and binary capability name res…
Browse files Browse the repository at this point in the history
…olvers.
  • Loading branch information
pferraro committed Jan 4, 2024
1 parent 6a05fcd commit d0feb54
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,37 @@ public String[] apply(PathAddress address) {
return new String[] { address.getParent().getLastElement().getValue(), address.getLastElement().getValue() };
}
},
GRANDPARENT_CHILD() {
@Override
public String[] apply(PathAddress address) {
return new String[] { address.getParent().getParent().getLastElement().getValue(), address.getLastElement().getValue() };
}
},
GRANDPARENT_PARENT() {
@Override
public String[] apply(PathAddress address) {
PathAddress parent = address.getParent();
return new String[] { parent.getParent().getLastElement().getValue(), parent.getLastElement().getValue() };
}
},
GRANDPARENT_CHILD() {
GREATGRANDPARENT_CHILD() {
@Override
public String[] apply(PathAddress address) {
return new String[] { address.getParent().getParent().getLastElement().getValue(), address.getLastElement().getValue() };
return new String[] { address.getParent().getParent().getParent().getLastElement().getValue(), address.getLastElement().getValue() };
}
},
GREATGRANDPARENT_PARENT() {
@Override
public String[] apply(PathAddress address) {
PathAddress parent = address.getParent();
return new String[] { parent.getParent().getParent().getLastElement().getValue(), parent.getLastElement().getValue() };
}
},
GREATGRANDPARENT_GRANDPARENT() {
@Override
public String[] apply(PathAddress address) {
PathAddress grandparent = address.getParent().getParent();
return new String[] { grandparent.getParent().getLastElement().getValue(), grandparent.getLastElement().getValue() };
}
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ public String[] apply(PathAddress address) {
return new String[] { address.getParent().getParent().getLastElement().getValue() };
}
},
GREATGRANDPARENT() {
@Override
public String[] apply(PathAddress address) {
return new String[] { address.getParent().getParent().getParent().getLastElement().getValue() };
}
},
LOCAL() {
@Override
public String[] apply(PathAddress address) {
Expand Down

0 comments on commit d0feb54

Please sign in to comment.