2 * Copyright (c) 2022 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.util;
10 import com.google.common.collect.ImmutableList;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.util.ImmutableOffsetMap.Unordered;
15 * Serialization proxy for {@link Unordered}.
17 final class UIOMv1 extends IOMv1<Unordered<?, ?>> {
18 private static final long serialVersionUID = 1;
20 @SuppressWarnings("checkstyle:RedundantModifier")
25 UIOMv1(final @NonNull Unordered<?, ?> map) {
30 Unordered<?, ?> createInstance(final ImmutableList<Object> keys, final Object[] values) {
31 final var newOffsets = OffsetMapCache.unorderedOffsets(keys);
32 return new Unordered<>(newOffsets, OffsetMapCache.adjustedArray(newOffsets, keys, values));