Skip to content

Commit 36e019a

Browse files
committed
improved jdoc
1 parent cc307d6 commit 36e019a

6 files changed

Lines changed: 113 additions & 64 deletions

File tree

src/main/java/org/htmlunit/html/HtmlStyle.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ public boolean mayBeDisplayed() {
125125
}
126126

127127
/**
128+
* Return the referenced style sheet.
129+
*
128130
* @return the referenced style sheet
129131
*/
130132
public CssStyleSheet getSheet() {

src/main/java/org/htmlunit/html/HtmlTable.java

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,19 @@ public final HtmlTableCell getCellAt(final int rowIndex, final int columnIndex)
110110
}
111111

112112
/**
113-
* @return an iterator over all the HtmlTableRow objects
113+
* Returns an iterator over all rows in this table.
114+
*
115+
* @return an iterator over all {@link HtmlTableRow} objects
114116
*/
115117
private RowIterator getRowIterator() {
116118
return new RowIterator();
117119
}
118120

119121
/**
120-
* @return an immutable list containing all the HtmlTableRow objects
121-
* @see #getRowIterator
122+
* Returns an immutable list of all rows in this table.
123+
*
124+
* @return an immutable list containing all {@link HtmlTableRow} objects
125+
* @see #getRowIterator()
122126
*/
123127
public List<HtmlTableRow> getRows() {
124128
final List<HtmlTableRow> result = new ArrayList<>();
@@ -129,10 +133,12 @@ public List<HtmlTableRow> getRows() {
129133
}
130134

131135
/**
136+
* Returns the row at the specified index.
137+
*
132138
* @param index the 0-based index of the row
133-
* @return the HtmlTableRow at the given index
139+
* @return the {@link HtmlTableRow} at the given index
134140
* @throws IndexOutOfBoundsException if there is no row at the given index
135-
* @see #getRowIterator
141+
* @see #getRowIterator()
136142
*/
137143
public HtmlTableRow getRow(final int index) throws IndexOutOfBoundsException {
138144
int count = 0;
@@ -160,11 +166,11 @@ public final int getRowCount() {
160166
}
161167

162168
/**
163-
* Finds and return the row with the specified id.
169+
* Returns the row with the specified identifier.
164170
*
165-
* @param id the id of the row
166-
* @return the row with the specified id
167-
* @exception ElementNotFoundException If the row cannot be found.
171+
* @param id the row identifier
172+
* @return the row with the specified identifier
173+
* @throws ElementNotFoundException if the row cannot be found
168174
*/
169175
public final HtmlTableRow getRowById(final String id) throws ElementNotFoundException {
170176
for (final HtmlTableRow row : getRowIterator()) {
@@ -355,24 +361,23 @@ private class RowIterator implements Iterator<HtmlTableRow>, Iterable<HtmlTableR
355361
}
356362

357363
/**
358-
* @return {@code true} if there are more rows available
364+
* {@inheritDoc}
359365
*/
360366
@Override
361367
public boolean hasNext() {
362368
return nextRow_ != null;
363369
}
364370

365371
/**
366-
* @return the next row from this iterator
367-
* @throws NoSuchElementException if no more rows are available
372+
* {@inheritDoc}
368373
*/
369374
@Override
370375
public HtmlTableRow next() throws NoSuchElementException {
371376
return nextRow();
372377
}
373378

374379
/**
375-
* Removes the current row from the underlying table.
380+
* {@inheritDoc}
376381
*/
377382
@Override
378383
public void remove() {
@@ -386,6 +391,8 @@ public void remove() {
386391
}
387392

388393
/**
394+
* Returns the next row.
395+
*
389396
* @return the next row from this iterator
390397
* @throws NoSuchElementException if no more rows are available
391398
*/
@@ -423,6 +430,9 @@ else if (currentGroup_ == null && next instanceof TableRowGroup group) {
423430
}
424431
}
425432

433+
/**
434+
* {@inheritDoc}
435+
*/
426436
@Override
427437
public Iterator<HtmlTableRow> iterator() {
428438
return this;
@@ -431,7 +441,9 @@ public Iterator<HtmlTableRow> iterator() {
431441

432442
/**
433443
* {@inheritDoc}
434-
* @return {@code true} as browsers ignore self closing <code>table</code> tags.
444+
*
445+
* @return {@code true} so that generated XML uses explicit opening and closing
446+
* {@code <table>} tags
435447
*/
436448
@Override
437449
protected boolean isEmptyXmlTagExpanded() {

src/main/java/org/htmlunit/html/HtmlTableCell.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ protected HtmlTableCell(final String qualifiedName, final SgmlPage page,
4848
}
4949

5050
/**
51-
* @return the value of the colspan attribute, or <code>1</code> if the attribute wasn't specified
51+
* Returns the column span of this cell.
52+
*
53+
* @return the value of the {@code colspan} attribute, or {@code 1} if the
54+
* attribute was not specified or is invalid
5255
*/
5356
public int getColumnSpan() {
5457
final String spanString = StringUtils.replaceChars(getAttributeDirect("colspan"), "\r\n\t ", null);
@@ -68,7 +71,10 @@ public int getColumnSpan() {
6871
}
6972

7073
/**
71-
* @return the value of the rowspan attribute, or <code>1</code> if the attribute wasn't specified
74+
* Returns the row span of this cell.
75+
*
76+
* @return the value of the {@code rowspan} attribute, or {@code 1} if the
77+
* attribute was not specified or is invalid
7278
*/
7379
public int getRowSpan() {
7480
final String spanString = StringUtils.replaceChars(getAttributeDirect("rowspan"), "\r\n\t ", null);

src/main/java/org/htmlunit/html/HtmlTableRow.java

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,19 @@ public class HtmlTableRow extends HtmlElement {
5151
}
5252

5353
/**
54-
* @return an Iterator over the all HtmlTableCell objects in this row
54+
* Returns an iterator over all cells in this row.
55+
*
56+
* @return an iterator over all {@link HtmlTableCell} objects in this row
5557
*/
5658
public CellIterator getCellIterator() {
5759
return new CellIterator();
5860
}
5961

6062
/**
61-
* @return an immutable list containing all the HtmlTableCells held by this object
62-
* @see #getCellIterator
63+
* Returns an immutable list of all cells in this row.
64+
*
65+
* @return an immutable list containing all {@link HtmlTableCell} objects in this row
66+
* @see #getCellIterator()
6367
*/
6468
public List<HtmlTableCell> getCells() {
6569
final List<HtmlTableCell> result = new ArrayList<>();
@@ -70,6 +74,8 @@ public List<HtmlTableCell> getCells() {
7074
}
7175

7276
/**
77+
* Returns the cell at the specified index.
78+
*
7379
* @param index the 0-based index
7480
* @return the cell at the given index
7581
* @throws IndexOutOfBoundsException if there is no cell at the given index
@@ -134,8 +140,9 @@ public final String getValignAttribute() {
134140
}
135141

136142
/**
137-
* Gets the table containing this row.
138-
* @return the table
143+
* Returns the table containing this row.
144+
*
145+
* @return the enclosing table
139146
*/
140147
public HtmlTable getEnclosingTable() {
141148
return (HtmlTable) getEnclosingElement("table");
@@ -167,24 +174,23 @@ public CellIterator() {
167174
}
168175

169176
/**
170-
* @return whether there is another cell available
177+
* {@inheritDoc}
171178
*/
172179
@Override
173180
public boolean hasNext() {
174181
return nextCell_ != null;
175182
}
176183

177184
/**
178-
* @return the next cell
179-
* @throws NoSuchElementException if no cell is available
185+
* {@inheritDoc}
180186
*/
181187
@Override
182188
public HtmlTableCell next() throws NoSuchElementException {
183189
return nextCell();
184190
}
185191

186192
/**
187-
* Removes the cell under the cursor from the current row.
193+
* {@inheritDoc}
188194
*/
189195
@Override
190196
public void remove() {
@@ -198,6 +204,8 @@ public void remove() {
198204
}
199205

200206
/**
207+
* Returns the next cell.
208+
*
201209
* @return the next cell
202210
* @throws NoSuchElementException if no cell is available
203211
*/
@@ -237,9 +245,7 @@ else if (currentForm_ == null && next instanceof HtmlForm form) {
237245
}
238246

239247
/**
240-
* Returns an HtmlTableCell iterator.
241-
*
242-
* @return an HtmlTableCell Iterator.
248+
* {@inheritDoc}
243249
*/
244250
@Override
245251
public Iterator<HtmlTableCell> iterator() {

src/main/java/org/htmlunit/html/HtmlTemplate.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public DisplayStyle getDefaultStyleDisplay() {
5656
}
5757

5858
/**
59+
* Return the associated document fragment.
60+
*
5961
* @return the associated document fragment
6062
*/
6163
public DomDocumentFragment getContent() {

0 commit comments

Comments
 (0)