模块 mxlib.api

类 Pointer<T>

    • 构造器详细资料

      • Pointer

        public Pointer()
      • Pointer

        public Pointer​(T value)
    • 方法详细资料

      • value

        @Contract(pure=true)
        public T value()
      • value

        @Contract("null -> null; !null -> !null")
        public T value​(T val)
        If you want to get the old value. please use #replace(T)
        参数:
        val - The value you want to set
        返回:
        The input value
      • replace

        public T replace​(T val)
        Set up the value and return the old value.
        参数:
        val - The value you want to set
        返回:
        The value before set
        从以下版本开始:
        2.2
      • get

        @Contract(pure=true)
        public T get()
        指定者:
        get 在接口中 Supplier<T>
      • accept

        public void accept​(T t)
        指定者:
        accept 在接口中 Consumer<T>
      • exists

        @Contract(pure=true)
        public boolean exists()
        Check the current value not `null`
        返回:
        value != null
        从以下版本开始:
        2.2