Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
java
java
public interface IIdentifiable {
    public long getId();
}

public interface IState extends IIdentifiable {
    public byte[] toByteArray();
    public void assignFromByteArray(byte[] bytes);
}

public interface IManageState {
    // linkable component state management
    public IState keepCurrentState();
    public void restoreState(IState state);
    public void clearState(IState state);
 
    // TODO: decide if states should be publically visible
    public IState[]Collection<IState> getStates();
 
    // factory method to revive state
    public IState createStateFromByteArray(byte[] bytes);
}