DataKey

abstract class DataKey<T>(source)

A key to a piece of data associated with a Node at runtime. The key contains type information that can be used to check the type of any user data value for the key when the value is set. DataKey is abstract in order to force the creation of a subtype. That subtype is used to test for identity when looking for the user data because actual object identity would suffer from problems under serialization. So, the correct way to declare a DataKey is like this:


public static final DataKey<Role> ROLE = new DataKey<Role>() { };

This code was taken from the Wicket project.

Parameters

<T>

The type of the object which is stored

See also

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
open fun hashCode(): Int