public RemoteMenuController build() {
        if(protocol == null) {
            protocol = new TagValMenuCommandProtocol();
        }
        if(executorService == null) {
            executorService = Executors.newScheduledThreadPool(2,
                    new NamedDaemonThreadFactory("rs232-remote"));
        }
        Rs232RemoteConnector connector = new Rs232RemoteConnector(portName, baud, protocol, executorService);
        return new RemoteMenuController(connector, menuTree, executorService, name, clock);
    }
public RemoteMenuController build ( ) { if ( protocol == null ) { protocol = new TagValMenuCommandProtocol ( ) ; } if ( executorService == null ) { executorService = Executors . newScheduledThreadPool ( 2 , new NamedDaemonThreadFactory ( "rs232-remote" ) ) ; } Rs232RemoteConnector connector = new Rs232RemoteConnector ( portName , baud , protocol , executorService ) ; return new RemoteMenuController ( connector , menuTree , executorService , name , clock ) ; }
Once the above methods have been called to fill in the blanks, then call build to get
the actual instance.
@return the actual instance.