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

package icebook.book;

import icebook.book.OrderBook.Entry;
import icebook.order.Side;

import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;

/**
 * Factory for {@link OrderBook}s and {@link Entry}ies.
 *
 * @author Jakub D Kozlowski
 * @since 1.0
 */
public final class OrderBooks {

    private OrderBooks() {
    }

    /**
     * Gets a default {@link Entry} implementation.
     *
     * @param id        id of this {@link Entry}.
     * @param timestamp timestamp of this {@link Entry}.
     * @param side      side of this {@link Entry}.
     * @param price     price of this {@link Entry}.
     * @param volume    volume of this {@link Entry}.
     *
     * @throws NullPointerException     if {@code side} is null.
     * @throws IllegalArgumentException if any {@code long} argument is {@code <= 0}
     */
    public static final Entry newEntry(@Nonnegative final long id,
                                       @Nonnegative final long timestamp,
                                       @Nonnull final Side side,
                                       @Nonnegative final long price,
                                       @Nonnegative final long volume) {
        return new EntryImpl(id, timestamp, side, price, volume);
    }

    /**
     * Gets a default {@link OrderBook} implementation.
     *
     * @return new {@link OrderBook}.
     */
    public static final OrderBook newDefaultOrderBook() {
        return new DefaultOrderBook();
    }
}

@@ -935,33 +935,129 @@
  if 
-any %7B@code long%7D argument
+%7B@code id%7D, %7B@code timestamp%7D or %7B@code price%7D is %7B@code %3C= 0%7D,%0A     *                                  or %7B@code volume%7D
  is 
@@ -1064,20 +1064,20 @@
 %7B@code %3C
-=
  0%7D
+.
 %0A     */
@@ -1585,19 +1585,23 @@
 @return 
-new
+default
  %7B@link 
@@ -1610,16 +1610,31 @@
 derBook%7D
+ implementation
 .%0A     *

Update OrderBooks javadoc.