Compute YangInstanceIdentifier.hashCode() lazily
[yangtools.git] / data / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / PathArgumentList.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.data.api;
9
10 import com.google.common.collect.UnmodifiableIterator;
11 import java.util.AbstractList;
12 import java.util.Collection;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
15
16 // FIXME: sealed once we have JDK17+
17 abstract class PathArgumentList extends AbstractList<PathArgument> {
18     @Override
19     public abstract @NonNull UnmodifiableIterator<PathArgument> iterator();
20
21     @Override
22     public final boolean isEmpty() {
23         return false;
24     }
25
26     @Override
27     @SuppressWarnings("checkstyle:parameterName")
28     public final boolean remove(final Object o) {
29         throw new UnsupportedOperationException();
30     }
31
32     @Override
33     @SuppressWarnings("checkstyle:parameterName")
34     public final boolean addAll(final Collection<? extends PathArgument> c) {
35         throw new UnsupportedOperationException();
36     }
37
38     @Override
39     @SuppressWarnings("checkstyle:parameterName")
40     public final boolean addAll(final int index, final Collection<? extends PathArgument> c) {
41         throw new UnsupportedOperationException();
42     }
43
44     @Override
45     @SuppressWarnings("checkstyle:parameterName")
46     public final boolean removeAll(final Collection<?> c) {
47         throw new UnsupportedOperationException();
48     }
49
50     @Override
51     @SuppressWarnings("checkstyle:parameterName")
52     public final boolean retainAll(final Collection<?> c) {
53         throw new UnsupportedOperationException();
54     }
55
56     @Override
57     public final void clear() {
58         throw new UnsupportedOperationException();
59     }
60 }