public class MyText { private int myVar = 0; public void foo(int v, Boolean bar) { if (v == bar.toBoolean()) { System.out.println(v); } } }