Interface Export<T>

  • Type Parameters:
    T - the export type

    public interface Export<T>
    A namespaced value wrapper.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  Export.Pointer<T>
      A pointer to the value of an export.
    • Method Detail

      • name

        String name()
        Gets the name of the export
        Returns:
        the name
      • pointer

        Export.Pointer<T> pointer()
        Returns a pointer to this export
        Returns:
        a pointer
      • get

        T get()
        Gets the current value of the export
        Returns:
        the current value
      • get

        T get​(T other)
        Gets the current value of the export, or returns the other if a value isn't present.
        Parameters:
        other - the other value
        Returns:
        the value
      • put

        Export<T> put​(T value)
        Sets the value of the export
        Parameters:
        value - the value to set
        Returns:
        this
      • putIfAbsent

        Export<T> putIfAbsent​(T value)
        Sets the value of the export if a value isn't already present, then returns the export
        Parameters:
        value - the value to set if absent
        Returns:
        this
      • computeIfAbsent

        Export<T> computeIfAbsent​(Supplier<? extends T> other)
        Uses the provided function to compute a value if one isn't already present.
        Parameters:
        other - the other value
        Returns:
        the value
      • containsValue

        boolean containsValue()
        Gets if this export has a value
        Returns:
        true if this export has a value
      • clear

        void clear()
        Clears the export