Skip to content

Instantly share code, notes, and snippets.

@fgoinai
Created May 12, 2017 15:11
Show Gist options
  • Save fgoinai/d08812a142f44faafec579b273707a33 to your computer and use it in GitHub Desktop.
Save fgoinai/d08812a142f44faafec579b273707a33 to your computer and use it in GitHub Desktop.
private final Function2 swap(final List list) {
return (Function2)(new Function2() {
// $FF: synthetic method
// $FF: bridge method
public Object invoke(Object var1, Object var2) {
this.invoke(((Number)var1).intValue(), ((Number)var2).intValue());
return Unit.INSTANCE;
}
public final void invoke(final int pos1, final int pos2) {
((Function0)(new Function0() {
// $FF: synthetic method
// $FF: bridge method
public Object invoke() {
this.invoke();
return Unit.INSTANCE;
}
public final void invoke() {
Insertion.this.setTmp((Comparable)list.get(pos1));
list.set(pos1, list.get(pos2));
list.set(pos2, Insertion.this.getTmp());
}
})).invoke();
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment