package com.paritytrading.parity.client;

import com.paritytrading.parity.net.poe.POE;
import java.util.stream.Stream;

public class Commands {

    private static final Command[] COMMANDS = new Command[] {
        new EnterCommand(POE.BUY),
        new EnterCommand(POE.SELL),
        new CancelCommand(),
        new OrdersCommand(),
        new TradesCommand(),
        new ErrorsCommand(),
        new HelpCommand(),
        new ExitCommand(),
    };

    private Commands() {
    }

    public static Command[] all() {
        return COMMANDS;
    }

    public static Command find(final String name) {
        return Stream.of(COMMANDS)
                .filter(c -> c.getName().equals(name))
                .findFirst()
                .orElse(null);
    }

    public static String[] names() {
        return Stream.of(COMMANDS).map(Command::getName).toArray(String[]::new);
    }

}

@@ -113,23 +113,16 @@
 tream;%0A%0A
-public 
 class Co
@@ -450,47 +450,8 @@
     
-private Commands() %7B%0A    %7D%0A%0A    public 
 stat
@@ -503,31 +503,24 @@
 %0A    %7D%0A%0A    
-public 
 static Comma
@@ -713,15 +713,8 @@
     
-public 
 stat

Clean up 'Commands'