Class FakeConstant<T>

java.lang.Object
dev.pfaff.altargui.util.FakeConstant<T>
All Implemented Interfaces:
Supplier<T>
Direct Known Subclasses:
FakeConstantProfiler

public abstract class FakeConstant<T> extends Object implements Supplier<T>
  • Constructor Details

    • FakeConstant

      public FakeConstant(Class<T> type, T value)
      Parameters:
      type - the value type
      value - the initial value
  • Method Details

    • set

      public void set(boolean value)
      Stores a new value. This is an expensive operation, so care should be taken by the caller to avoid redundant invocations.
      Parameters:
      value - the new value
    • implGet

      protected abstract T implGet(MethodHandle target) throws Throwable
      Throws:
      Throwable
    • get

      public T get()
      Specified by:
      get in interface Supplier<T>
      Returns:
      the stored value