diff --git a/jsprit-core/src/main/java/jsprit/core/problem/Capacity.java b/jsprit-core/src/main/java/jsprit/core/problem/Capacity.java
index 5022ed9b..180b875f 100644
--- a/jsprit-core/src/main/java/jsprit/core/problem/Capacity.java
+++ b/jsprit-core/src/main/java/jsprit/core/problem/Capacity.java
@@ -1,20 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2014 Stefan Schroeder.
- *
+ * Copyright (C) 2014 Stefan Schroeder
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
+ * License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
Note that this assumes that capacity dimension can be added up.
*
- * @param cap1
- * @param cap2
+ * @param cap1 capacity to be added up
+ * @param cap2 capacity to be added up
* @return new capacity
* @throws NullPointerException if one of the args is null
@@ -49,20 +47,20 @@ public class Capacity {
}
/**
- * Subtracts cap2substract from cap and returns the resulting Capacity.
+ * Subtracts cap2subtract from cap and returns the resulting Capacity.
*
- * @param cap
- * @param cap2substract
+ * @param cap capacity to be subtracted from
+ * @param cap2subtract capacity to subtract
* @return new capacity
* @throws NullPointerException if one of the args is null
* @throws IllegalStateException if number of capacityDimensions of cap1 and cap2 are different (i.e. If both capacities are have only dimensions with dimensionVal=0, it returns 0.0
- * @param numerator
- * @param denominator
- * @return
+ * @param numerator the numerator
+ * @param denominator the denominator
+ * @return quotient
* @throws IllegalStateException if numerator.get(i) != 0 and denominator.get(i) == 0
*/
public static double divide(Capacity numerator, Capacity denominator){
@@ -118,8 +116,8 @@ public class Capacity {
/**
* Makes a deep copy of Capacity.
*
- * @param capacity
- * @return
+ * @param capacity capacity to be copied
+ * @return copy
*/
public static Capacity copyOf(Capacity capacity){
if(capacity == null) return null;
@@ -156,9 +154,9 @@ public class Capacity {
* Note that it automatically resizes dimensions according to index, i.e. if index=7 there are 8 dimensions.
* New dimensions then are initialized with 0
*
- * @param index
- * @param dimValue
- * @return
+ * @param index dimensionIndex
+ * @param dimValue dimensionValue
+ * @return this builder
*/
public Builder addDimension(int index, int dimValue){
if(index < dimensions.length){
@@ -197,7 +195,7 @@ public class Capacity {
/**
* copy constructor
*
- * @param capacity
+ * @param capacity capacity to be copied
*/
Capacity(Capacity capacity){
this.dimensions = new int[capacity.getNuOfDimensions()];
@@ -213,19 +211,21 @@ public class Capacity {
/**
* Returns the number of specified capacity dimensions.
*
- * @return
+ * @return noDimensions
*/
public int getNuOfDimensions(){
return dimensions.length;
}
+
+
/**
* Returns value of capacity-dimension with specified index.
*
* If capacity dimension does not exist, it returns 0 (rather than IndexOutOfBoundsException).
*
- * @param index
- * @return
+ * @param index dimension index of the capacity value to be retrieved
+ * @return the according dimension value
*/
public int get(int index){
if(indexcap1.getNuOfDimension() != cap2.getNuOfDimension()).
*
*/
- public static Capacity subtract(Capacity cap, Capacity cap2substract){
- if(cap==null || cap2substract==null) throw new NullPointerException("arguments must not be null");
+ public static Capacity subtract(Capacity cap, Capacity cap2subtract){
+ if(cap==null || cap2subtract==null) throw new NullPointerException("arguments must not be null");
Capacity.Builder capacityBuilder= Capacity.Builder.newInstance();
- for(int i=0;i