class MyTransferable implements Transferable {

    private static final DataFlavor[] supportedFlavors;

    static {
      try {
        supportedFlavors = new DataFlavor[]{
                new DataFlavor("text/html;class=java.lang.String"),
                new DataFlavor("text/plain;class=java.lang.String")
        };
      } catch (ClassNotFoundException e) {
        throw new ExceptionInInitializerError(e);
      }
    }

    private final String plainData;
    private final String htmlData;

    MyTransferable(String plainData, String htmlData) {
      this.plainData = plainData;
      this.htmlData = htmlData;
    }

    @Override
    public DataFlavor[] getTransferDataFlavors() {
      return supportedFlavors;
    }

    @Override
    public boolean isDataFlavorSupported(DataFlavor flavor) {<FILL_FUNCTION_BODY>}

    @Override
    public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException {
      if (flavor.equals(supportedFlavors[0])) {
        return htmlData;
      }
      if (flavor.equals(supportedFlavors[1])) {
        return plainData;
      }
      throw new UnsupportedFlavorException(flavor);
    }
  }

      for (DataFlavor supportedFlavor : supportedFlavors) {
        if (supportedFlavor == flavor) {
          return true;
        }
      }
      return false;
    
<methods>public void <init>(java.lang.String) ,public boolean canImport(javax.swing.TransferHandler.TransferSupport) ,public boolean canImport(javax.swing.JComponent, java.awt.datatransfer.DataFlavor[]) ,public void exportAsDrag(javax.swing.JComponent, java.awt.event.InputEvent, int) ,public void exportToClipboard(javax.swing.JComponent, java.awt.datatransfer.Clipboard, int) throws java.lang.IllegalStateException,public static javax.swing.Action getCopyAction() ,public static javax.swing.Action getCutAction() ,public java.awt.Image getDragImage() ,public java.awt.Point getDragImageOffset() ,public static javax.swing.Action getPasteAction() ,public int getSourceActions(javax.swing.JComponent) ,public javax.swing.Icon getVisualRepresentation(java.awt.datatransfer.Transferable) ,public boolean importData(javax.swing.TransferHandler.TransferSupport) ,public boolean importData(javax.swing.JComponent, java.awt.datatransfer.Transferable) ,public void setDragImage(java.awt.Image) ,public void setDragImageOffset(java.awt.Point) <variables>public static final int COPY,public static final int COPY_OR_MOVE,public static final int LINK,public static final int MOVE,public static final int NONE,static final javax.swing.Action copyAction,static final javax.swing.Action cutAction,private java.awt.Image dragImage,private java.awt.Point dragImageOffset,static final javax.swing.Action pasteAction,private java.lang.String propertyName,private static javax.swing.TransferHandler.SwingDragGestureRecognizer recognizer