2 * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.parser.spi.meta;
10 import com.google.common.annotations.Beta;
11 import com.google.common.base.MoreObjects.ToStringHelper;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.concepts.Immutable;
16 public final class EffectiveSchemaTreeStatementState extends EffectiveStatementState {
17 private final int flags;
19 public EffectiveSchemaTreeStatementState(final @NonNull Immutable identity, final int flags) {
25 public int hashCode() {
26 return identity().hashCode() * 31 + Integer.hashCode(flags);
30 public boolean equals(final Object obj) {
34 if (!(obj instanceof EffectiveSchemaTreeStatementState)) {
37 final EffectiveSchemaTreeStatementState other = (EffectiveSchemaTreeStatementState) obj;
38 return flags == other.flags && identity().equals(other.identity());
42 protected ToStringHelper addToStringAttributes(final ToStringHelper helper) {
43 return super.addToStringAttributes(helper).add("flags", flags);