/*
 * Copyright 2012 Jakub Dominik Kozlowski <mail@jakub-kozlowski.com>
 * Distributed under the The MIT License.
 * (See accompanying file LICENSE)
 */

package icebook.exec;

/**
 * @author Jakub D Kozlowski
 */
public class Trade {
}

@@ -170,18 +170,239 @@
 .exec;%0A%0A
-/*
+import com.google.common.primitives.Longs;%0A%0Aimport javax.annotation.Nonnegative;%0Aimport javax.annotation.concurrent.Immutable;%0A%0Aimport static com.google.common.base.Preconditions.checkArgument;%0A%0A/**%0A * Represents a trade.%0A 
 *%0A * @au
@@ -430,17 +430,42 @@
 i%0A *
-/
+ @since 1.0%0A */%0A@Immutable
 %0Apublic 
 clas
@@ -460,16 +460,22 @@
 %0Apublic 
+final 
 class Tr
@@ -479,11 +479,1394 @@
  Trade %7B
+%0A%0A    private final long buyOrderId;%0A%0A    private final long sellOrderId;%0A%0A    private final long price;%0A%0A    private final long quantity;%0A%0A    /**%0A     * Default constructor.%0A     *%0A     * @param buyOrderId  id of the buy order.%0A     * @param sellOrderId id of the sell order.%0A     * @param price       execution price.%0A     * @param quantity    quantity executed.%0A     */%0A    public Trade(@Nonnegative final long buyOrderId,%0A                 @Nonnegative final long sellOrderId,%0A                 @Nonnegative final long price,%0A                 @Nonnegative final long quantity) %7B%0A        checkArgument(Longs.min(buyOrderId, sellOrderId, price, quantity) %3E 0);%0A        this.buyOrderId = buyOrderId;%0A        this.sellOrderId = sellOrderId;%0A        this.price = price;%0A        this.quantity = quantity;%0A    %7D%0A%0A    /**%0A     * Gets the buyOrderId.%0A     *%0A     * @return the buyOrderId.%0A     */%0A    public long getBuyOrderId() %7B%0A        return buyOrderId;%0A    %7D%0A%0A    /**%0A     * Gets the sellOrderId.%0A     *%0A     * @return the sellOrderId.%0A     */%0A    public long getSellOrderId() %7B%0A        return sellOrderId;%0A    %7D%0A%0A    /**%0A     * Gets the price.%0A     *%0A     * @return the price.%0A     */%0A    public long getPrice() %7B%0A        return price;%0A    %7D%0A%0A    /**%0A     * Gets the quantity.%0A     *%0A     * @return the quantity.%0A     */%0A    public long getQuantity() %7B%0A        return quantity;%0A    %7D
 %0A%7D%0A

Implement Trade.