Package icyllis.modernui.core

# Class Clipboard

java.lang.Object
icyllis.modernui.core.Clipboard

@MainThread public final class Clipboard extends Object
A helper class to get/set clipboard text, methods are only expected to be called from the main thread.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Clipboard()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getText()`
  Get text from clipboard, or `null` if it is empty or cannot be converted to string.
  `static void`
  `setText(CharSequence text)`
  Set clipboard text.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Clipboard

    public Clipboard()

- ## Method Details

  - ### getText

    @Nullable public static String getText()
    Get text from clipboard, or `null` if it is empty or cannot be converted to string.
    Returns:
      the clipboard text

  - ### setText

    public static void setText(@NonNull CharSequence text)
    Set clipboard text.
    Parameters:
      `text` - the text to set, must be not null