1 /*
2 * SPDX-FileCopyrightText: none
3 * SPDX-License-Identifier: CC0-1.0
4 */
5
6 package dev.metaschema.core.metapath.item.function;
7
8 import dev.metaschema.core.metapath.item.atomic.IAnyAtomicItem;
9 import edu.umd.cs.findbugs.annotations.NonNull;
10
11 /**
12 * The key value used in an {@link IMapItem}.
13 */
14 public interface IMapKey {
15
16 /**
17 * Get the atomic item used as the key.
18 *
19 * @return the atomic item
20 */
21 @NonNull
22 IAnyAtomicItem getKey();
23
24 @Override
25 int hashCode();
26
27 /**
28 * Determine if this key is the same as another key.
29 *
30 * @param other
31 * the other key to compare
32 * @return {@code true} if the keys are the same, or {@code false} otherwise
33 */
34 boolean isSameKey(@NonNull IMapKey other);
35 }