Skip to content

Commit 6eb9f32

Browse files
Added javadoc support for OrderFactory class.
1 parent 9a65c66 commit 6eb9f32

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/main/java/coreapi/OrderFactory.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,35 @@ public class OrderFactory
1010
private static int orderCount = 0;
1111

1212
/**
13-
* @return Returns the current unique counter of new Orders' id.
13+
* Returns the current counter of created Orders.
14+
* This is id number that will be assigned to the next Order created,
15+
* which is unique for each and everyone of them.
16+
* @return the current unique id counter.
1417
*/
1518
public static int getOrderCount()
1619
{
1720
return orderCount;
1821
}
1922

2023
/**
21-
* @return Returns a new instance of Order with a unique id.
24+
* Returns a new instance of Order with a unique id.
25+
* Sets the timestamp as the current time of execution.
26+
* @return the newly created instance of an order.
27+
* @see Order
2228
*/
2329
public static Order createOrder()
2430
{
2531
return createOrder(new Date(System.currentTimeMillis()));
2632
}
2733

34+
/**
35+
* Returns a new instance of Order with a unique id.
36+
* Sets the specified timestamp as the order's creation date.
37+
* @param creationDate the timestamp to assign to the order
38+
* @return the newly created instance of an order from the indicated date.
39+
* @see Order
40+
* @see Date
41+
*/
2842
public static Order createOrder(Date creationDate)
2943
{
3044
return new OrderImpl(orderCount++, creationDate);

0 commit comments

Comments
 (0)