To remove some repeated code you can do this:

```
private native void command(final Element e, String method) /*-{
    $wnd.jQuery(e).collapse(method);
}-*/;
```

then above, you can

```
command(getElement(), "hide");
command(getElement(), "show");
command(getElement(), "toggle");
```