diff --git a/ortools/java/com/google/ortools/sat/AutomatonConstraint.java b/ortools/java/com/google/ortools/sat/AutomatonConstraint.java index 5d610fa187..1f5d8ebb16 100644 --- a/ortools/java/com/google/ortools/sat/AutomatonConstraint.java +++ b/ortools/java/com/google/ortools/sat/AutomatonConstraint.java @@ -25,8 +25,14 @@ public AutomatonConstraint(CpModelProto.Builder builder) { super(builder); } - /// Adds a transitions to the automaton. - AutomatonConstraint addTransition(int tail, int head, long label) { + /** + * Adds a transitions to the automaton. + * + * @param head the head of the transition + * @param label the label of the transition + * @return this constraint + */ + public AutomatonConstraint addTransition(int tail, int head, long label) { getBuilder() .getAutomatonBuilder() .addTransitionTail(tail) diff --git a/ortools/java/com/google/ortools/sat/NoOverlap2dConstraint.java b/ortools/java/com/google/ortools/sat/NoOverlap2dConstraint.java index 4de36e45d5..9a8d90e8a6 100644 --- a/ortools/java/com/google/ortools/sat/NoOverlap2dConstraint.java +++ b/ortools/java/com/google/ortools/sat/NoOverlap2dConstraint.java @@ -19,14 +19,20 @@ /** * Specialized NoOverlap2D constraint. * - *

This constraint allows adding rectanles to the NoOverlap2D constraint incrementally. + *

This constraint allows adding rectangles to the NoOverlap2D constraint incrementally. */ public class NoOverlap2dConstraint extends Constraint { public NoOverlap2dConstraint(CpModelProto.Builder builder) { super(builder); } - /// Adds a rectangle (xInterval, yInterval) to the constraint. + /** + * Adds a rectangle (xInterval, yInterval) to the constraint. + * + * @param xInterval the x interval of the rectangle. + * @param yInterval the y interval of the rectangle. + * @return this constraint + */ public NoOverlap2dConstraint addRectangle(IntervalVar xInterval, IntervalVar yInterval) { NoOverlap2DConstraintProto.Builder noOverlap2d = getBuilder().getNoOverlap2DBuilder(); noOverlap2d.addXIntervals(xInterval.getIndex());