All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.tonivade.resp.command.DefaultCommandWrapperFactory Maven / Gradle / Ivy

/*
 * Copyright (c) 2016-2017, Antonio Gabriel Muñoz Conejo 
 * Distributed under the terms of the MIT License
 */
package com.github.tonivade.resp.command;

public class DefaultCommandWrapperFactory implements CommandWrapperFactory {
  @Override
  public ICommand wrap(Object command) {
    if (command instanceof ICommand) {
      return new CommandWrapper((ICommand) command);
    }
    throw new IllegalArgumentException("must implements command interface");
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy