public class Foo {
    private boolean isB;

    public boolean isB() {
        return isB;
    }

    public void setB(boolean b) {
        isB = b;
    }
}

public class Bar {
    private boolean isB;

    public boolean isB() {
        return isB;
    }

    public void setB(boolean b) {
        isB = b;
    }
}