I want to do something like this
Code:
private ExtendedBoolean b = new ExtendedBoolean(){return m_pressed};
private void run()
if(b){
motor.set(1);
}
}
but the only way i can do it now is
Code:
private ExtendedBoolean b = new ExtendedBoolean(){private boolean get() return m_pressed;};
private void run()
if(b.get()){
motor.set(1);
}
}
which just looks ugly in my opinion. Is there a good way to do it?