Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 255638 Details for
Bug 474309
[formatter] hard hang
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
file that hangs the formatter
InterfacesEnableDisableFSM.java (text/x-java), 3.49 KB, created by
Ferry Huberts
on 2015-08-05 07:08:33 EDT
(
hide
)
Description:
file that hangs the formatter
Filename:
MIME Type:
Creator:
Ferry Huberts
Created:
2015-08-05 07:08:33 EDT
Size:
3.49 KB
patch
obsolete
>package nl.pelagic.util.fsm.interfaces.enabledisable; > >public class InterfacesEnableDisableFSM { > /** > * <p> > * State Diagram. > * </p> > * <p> > * <b>Note:</b> 's' (radio silence) transitions always have priority. > * </p> > * > * <pre> > * s = radio silence > * e = enable > * > * e > * +-------------------------------------------------------------------+ > * | | > * | +----------------------------------------------------------+ | > * | | !e | | > * V | V | > * +---------+ s +----------------+ !e +-----------------+ !s +----------+ > * | |---->| |---->| |---->| | > * | ENABLED | | ENABLED_SILENT | | DISABLED_SILENT | | DISABLED | > * | |<----| |<----| |<----| | > * +---------+ !s +----------------+ e +-----------------+ s +----------+ > * | ^ | ^ | ^ | ^ > * | | | | | | | | > * +---+ +---+ +---+ +---+ > * !s || e s || e s || !e !s || !e > * </pre> > */ > public enum State { > ENABLED, // > DISABLED, // > ENABLED_SILENT, // > DISABLED_SILENT; > } > > private State state = State.ENABLED; > > /** > * @return the state > */ > public State getState() { > return state; > } > > /** > * @return true when the state is <b>not</b> ENABLED, false otherwise > */ > public boolean isEnbled() { > return (state == State.ENABLED); > } > > /** > * <p> > * Determine the new state > * </p> > * <p> > * Note: one of the parameters must be null and they can't both be null > * </p> > * > * @param radioSilence non-null to determine the new state for a change in the > * radio silence setting > * @param enable non-null to determine the new state for a change in the > * interface enable setting > */ > public void determineNewState(Boolean radioSilence, Boolean enable) { > assert (!(((radioSilence == null) && (enable == null)) // > || ((radioSilence != null) && (enable != null)))); > > /* Determine new state */ > switch (state) { > case ENABLED: > if ((radioSilence != null) && Boolean.TRUE.equals(radioSilence)) { > state = State.ENABLED_SILENT; > } > if ((enable != null) && Boolean.FALSE.equals(enable)) { > state = State.DISABLED; > } > break; > > case ENABLED_SILENT: > if ((radioSilence != null) && Boolean.FALSE.equals(radioSilence)) { > state = State.ENABLED; > } > if ((enable != null) && Boolean.FALSE.equals(enable)) { > state = State.DISABLED_SILENT; > } > break; > > case DISABLED_SILENT: > if ((radioSilence != null) && Boolean.FALSE.equals(radioSilence)) { > state = State.DISABLED; > } > if ((enable != null) && Boolean.TRUE.equals(enable)) { > state = State.ENABLED_SILENT; > } > break; > > case DISABLED: > default: > if ((radioSilence != null) && Boolean.TRUE.equals(radioSilence)) { > state = State.DISABLED_SILENT; > } > if ((enable != null) && Boolean.TRUE.equals(enable)) { > state = State.ENABLED; > } > break; > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 474309
: 255638 |
255639