- return Optional.fromJavaUtil(delegate.getMountPoint(path).map(DOMMountPointServiceImpl::convert));
- }
-
- private static DOMMountPoint convert(final org.opendaylight.mdsal.dom.api.DOMMountPoint from) {
- return new DOMMountPoint() {
- @Override
- public YangInstanceIdentifier getIdentifier() {
- return from.getIdentifier();
- }
-
- @Override
- public <T extends DOMService> Optional<T> getService(final Class<T> cls) {
- return Optional.fromJavaUtil(from.getService(cls));
- }
-
- @Override
- public SchemaContext getSchemaContext() {
- return from.getSchemaContext();
- }
-
- @Override
- public int hashCode() {
- return from.getIdentifier().hashCode();
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (!(obj instanceof DOMMountPoint)) {
- return false;
- }
-
- DOMMountPoint other = (DOMMountPoint) obj;
- return from.getIdentifier().equals(other.getIdentifier());
- }
- };