/** * This will return the current state item as a displayable thing. * If there is no state, it will be an empty string. */ public String getStateDescription() { StateItem state = this.getState(); if ( state == null ) { return ""; } else { return state.getName(); } }
/** Compare this rules state with some other state */ public boolean sameState(StateItem other) { StateItem thisState = getState(); if ( thisState == other ) { return true; } else if ( thisState != null ) { return thisState.equals( other ); } else { return false; } }
/** Compare this rules state with some other state */ public boolean sameState(StateItem other) { StateItem thisState = getState(); if ( thisState == other ) { return true; } else if ( thisState != null ) { return thisState.equals( other ); } else { return false; } }
/** * This will return the current state item as a displayable thing. * If there is no state, it will be an empty string. */ public String getStateDescription() { StateItem state = this.getState(); if ( state == null ) { return ""; } else { return state.getName(); } }