VCollections.src.org.violetlib.collections.Binding Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vcollections Show documentation
Show all versions of vcollections Show documentation
Java Immutable Collections
The newest version!
/*
* Copyright (c) 2023 Alan Snyder.
* All rights reserved.
*
* You may not use, copy or modify this file, except in compliance with the license agreement. For details see
* accompanying license terms.
*/
package org.violetlib.collections;
import javax.annotation.CheckReturnValue;
import org.violetlib.collections.impl.BindingImpl;
import org.jetbrains.annotations.*;
import org.violetlib.annotations.Immutable;
/**
An immutable binding of a key to a value.
Null keys and values are not permitted.
*/
public @Immutable @CheckReturnValue interface Binding
{
static @NotNull Binding create(@NotNull K key, @NotNull V value)
{
return BindingImpl.create(key, value);
}
@NotNull K getKey();
@NotNull V getValue();
}