chapter_004/src/main/java/ru/job4j/trade/Trading.java
/**
     * Send Application in the repository.
     *
     * @param application - application.
     */
Send Application in the repository.
@param application - application.
Send Application in the repository . @param application - application .
public void takeApplication(Application application) {
        if (this.table.get(application.getBook()) == null) {
            this.table.put(application.getBook(), new Repository());
        }
        if (application.getType().equals(ADD.getName())) {
            this.table.get(application.getBook()).addApplication(application);
        } else if (application.getType().equals(DELETE.getName())) {
            this.table.get(application.getBook()).deleteApplication(application);
        } else {
            System.out.println("Please, write correct type application.");
        }
    }
public void takeApplication ( Application application ) { if ( this . table . get ( application . getBook ( ) ) == null ) { this . table . put ( application . getBook ( ) , new Repository ( ) ) ; } if ( application . getType ( ) . equals ( ADD . getName ( ) ) ) { this . table . get ( application . getBook ( ) ) . addApplication ( application ) ; } else if ( application . getType ( ) . equals ( DELETE . getName ( ) ) ) { this . table . get ( application . getBook ( ) ) . deleteApplication ( application ) ; } else { System . out . println ( "Please, write correct type application." ) ; } }
Send Application in the repository.
Send Application in the repository .