@FunctionalInterface public interface WireKey
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkKeys(@NotNull WireKey[] keys)
Checks that each entry uses a distinct
code() value. |
default int |
code()
Returns a numeric code for this key, typically derived from its
name(). |
default boolean |
contentEquals(@NotNull CharSequence c)
Compares the string representation of this
WireKey (obtained via this.toString())
with the provided CharSequence c for content equality. |
default @Nullable Object |
defaultValue()
Returns the default value for the field or event represented by this key.
|
@NotNull CharSequence |
name()
Returns the textual name of this key.
|
static int |
toCode(@NotNull CharSequence cs)
Converts a textual name to a numeric code.
|
default Type |
type()
Returns the
Type associated with the value this key typically represents,
inferred from defaultValue(). |
static boolean checkKeys(@NotNull
@NotNull WireKey[] keys)
code() value.keys - An array of WireKey objects to be checked for unique code() values.true if all codes are unique.AssertionError - if two or more keys share the same code.static int toCode(@NotNull
@NotNull CharSequence cs)
cs - The CharSequence (typically a field or event name) to convert into a numeric code.@NotNull @NotNull CharSequence name()
default int code()
name().
By default this delegates to toCode(CharSequence).default Type type()
Type associated with the value this key typically represents,
inferred from defaultValue(). Returns Void.class if no default value is defined.@Nullable default @Nullable Object defaultValue()
null indicates no default.null.default boolean contentEquals(@NotNull
@NotNull CharSequence c)
WireKey (obtained via this.toString())
with the provided CharSequence c for content equality.c - The CharSequence to compare against this key's string form.true if the contents are equal.Copyright © 2026 Chronicle Software Ltd. All rights reserved.