类 Key<T>

java.lang.Object
com.intellij.openapi.util.Key<T>
直接已知子类:
KeyWithDefaultValue

public class Key<T> extends Object
Provides type-safe access to data.
  • 构造器详细资料

    • Key

      public Key(@NotNull @NotNull String name)
  • 方法详细资料

    • hashCode

      public final int hashCode()
      覆盖:
      hashCode 在类中 Object
    • equals

      public final boolean equals(Object obj)
      覆盖:
      equals 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • create

      @NotNull public static <T> @NotNull Key<T> create(@NotNull @NotNull String name)
    • get

      public T get(@Nullable @Nullable UserDataHolder holder)
    • get

      public T get(@Nullable @Nullable Map<Key,?> holder)
    • get

      public T get(@Nullable @Nullable UserDataHolder holder, T defaultValue)
    • set

      public void set(@Nullable @Nullable UserDataHolder holder, @Nullable T value)
      Returns true if and only if the holder has not null value for the key.
    • set

      public void set(@Nullable @Nullable Map<Key,Object> holder, T value)