Class NullableObjectKey<T>

java.lang.Object
org.jhotdraw8.fxcollection.typesafekey.AbstractKey<T>
org.jhotdraw8.fxcollection.typesafekey.NullableObjectKey<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
Key<T>, MapAccessor<T>, NullableKey<T>

public class NullableObjectKey<T> extends AbstractKey<T> implements NullableKey<T>
A simple Key which has a nullable value.
Author:
Werner Randelshofer
  • Constructor Details

    • NullableObjectKey

      public NullableObjectKey(String name, Type type)
      Creates a new instance with the specified name, type token class, and with null as the default value.
      Parameters:
      name - The name of the name.
      type - The type of the value.
    • NullableObjectKey

      public NullableObjectKey(String name, Type type, @Nullable T defaultValue)
      Creates a new instance with the specified name, type token class, default value.
      Parameters:
      name - The name of the name.
      type - The type of the value.
      defaultValue - The default value.
    • NullableObjectKey

      public NullableObjectKey(String name, TypeToken<T> type)
      Creates a new instance with the specified name, type token class, and with null as the default value.
      Parameters:
      name - The name of the key.
      type - The type of the value.
    • NullableObjectKey

      public NullableObjectKey(String name, TypeToken<T> type, @Nullable T defaultValue)
      Creates a new instance with the specified name, type token class, default value.
      Parameters:
      name - The name of the key.
      type - The type of the value.
      defaultValue - The default value.
    • NullableObjectKey

      public NullableObjectKey(String name, Class<?> clazz)
      Creates a new instance with the specified name, type token class, and with null as the default value.
      Parameters:
      name - The name of the key.
      clazz - The type of the value.
    • NullableObjectKey

      public NullableObjectKey(String name, Class<?> clazz, @Nullable T defaultValue)
      Creates a new instance with the specified name, type token class, default value.
      Parameters:
      name - The name of the key.
      clazz - The type of the value.
      defaultValue - The default value.