Skip to content

Commit bec5261

Browse files
oswettorbri
authored andcommitted
Add missing javadoc
Add missing class name Add missing method name Add missing inheritDoc Add final modifier Repalce import Stack with Deque
1 parent bc9f214 commit bec5261

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+444
-112
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/.checkstyle
33
/.classpath
44
/.project
5+
.idea/

src/main/java/org/htmlunit/cssparser/dom/AbstractCSSRuleImpl.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
import org.htmlunit.cssparser.parser.AbstractLocatable;
2020

2121
/**
22+
* <p>Abstract AbstractCSSRuleImpl class.</p>
23+
*
2224
* @author Ronald Brill
25+
*
2326
*/
2427
public abstract class AbstractCSSRuleImpl extends AbstractLocatable implements Serializable {
2528

@@ -28,6 +31,7 @@ public abstract class AbstractCSSRuleImpl extends AbstractLocatable implements S
2831

2932
/**
3033
* Ctor.
34+
*
3135
* @param parentStyleSheet the parent style sheet
3236
* @param parentRule the parent rule
3337
*/
@@ -38,6 +42,8 @@ public AbstractCSSRuleImpl(final CSSStyleSheetImpl parentStyleSheet, final Abstr
3842
}
3943

4044
/**
45+
* <p>getCssText.</p>
46+
*
4147
* @return the current css text
4248
*/
4349
public abstract String getCssText();
@@ -65,19 +71,24 @@ public void setParentRule(final AbstractCSSRuleImpl parentRule) {
6571
}
6672

6773
/**
74+
* <p>getParentStyleSheet.</p>
75+
*
6876
* @return the parent style sheet
6977
*/
7078
public CSSStyleSheetImpl getParentStyleSheet() {
7179
return parentStyleSheet_;
7280
}
7381

7482
/**
83+
* <p>getParentRule.</p>
84+
*
7585
* @return the parent rule
7686
*/
7787
public AbstractCSSRuleImpl getParentRule() {
7888
return parentRule_;
7989
}
8090

91+
/** {@inheritDoc} */
8192
@Override
8293
public boolean equals(final Object obj) {
8394
if (this == obj) {
@@ -91,6 +102,7 @@ public boolean equals(final Object obj) {
91102
// recursive loop -> stack overflow!
92103
}
93104

105+
/** {@inheritDoc} */
94106
@Override
95107
public int hashCode() {
96108
final int hash = super.hashCode();

src/main/java/org/htmlunit/cssparser/dom/CSSCharsetRuleImpl.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* Implementation of CSSCharsetRule.
2626
*
2727
* @author Ronald Brill
28+
*
2829
*/
2930
public class CSSCharsetRuleImpl extends AbstractCSSRuleImpl {
3031

@@ -45,9 +46,7 @@ public CSSCharsetRuleImpl(
4546
encoding_ = encoding;
4647
}
4748

48-
/**
49-
* {@inheritDoc}
50-
*/
49+
/** {@inheritDoc} */
5150
@Override
5251
public void setCssText(final String cssText) throws DOMException {
5352
try {
@@ -79,12 +78,15 @@ public void setCssText(final String cssText) throws DOMException {
7978
}
8079

8180
/**
81+
* <p>getEncoding.</p>
82+
*
8283
* @return the encoding
8384
*/
8485
public String getEncoding() {
8586
return encoding_;
8687
}
8788

89+
/** {@inheritDoc} */
8890
@Override
8991
public boolean equals(final Object obj) {
9092
if (this == obj) {
@@ -98,21 +100,21 @@ public boolean equals(final Object obj) {
98100
&& ParserUtils.equals(getEncoding(), ccr.getEncoding());
99101
}
100102

103+
/** {@inheritDoc} */
101104
@Override
102105
public int hashCode() {
103106
int hash = super.hashCode();
104107
hash = ParserUtils.hashCode(hash, encoding_);
105108
return hash;
106109
}
107110

111+
/** {@inheritDoc} */
108112
@Override
109113
public String toString() {
110114
return getCssText();
111115
}
112116

113-
/**
114-
* {@inheritDoc}
115-
*/
117+
/** {@inheritDoc} */
116118
@Override
117119
public String getCssText() {
118120
final StringBuilder sb = new StringBuilder();

src/main/java/org/htmlunit/cssparser/dom/CSSFontFaceRuleImpl.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@
2525
* Implementation of CSSFontFaceRule.
2626
*
2727
* @author Ronald Brill
28+
*
2829
*/
2930
public class CSSFontFaceRuleImpl extends AbstractCSSRuleImpl {
3031

3132
private CSSStyleDeclarationImpl style_;
3233

3334
/**
3435
* Ctor.
36+
*
3537
* @param parentStyleSheet the parent style sheet
3638
* @param parentRule the parent rule
3739
*/
3840
public CSSFontFaceRuleImpl(final CSSStyleSheetImpl parentStyleSheet, final AbstractCSSRuleImpl parentRule) {
3941
super(parentStyleSheet, parentRule);
4042
}
4143

42-
/**
43-
* {@inheritDoc}
44-
*/
44+
/** {@inheritDoc} */
4545
@Override
4646
public String getCssText() {
4747
final StringBuilder sb = new StringBuilder();
@@ -58,9 +58,7 @@ public String getCssText() {
5858
return sb.toString();
5959
}
6060

61-
/**
62-
* {@inheritDoc}
63-
*/
61+
/** {@inheritDoc} */
6462
@Override
6563
public void setCssText(final String cssText) throws DOMException {
6664
try {
@@ -92,6 +90,8 @@ public void setCssText(final String cssText) throws DOMException {
9290
}
9391

9492
/**
93+
* <p>getStyle.</p>
94+
*
9595
* @return the style
9696
*/
9797
public CSSStyleDeclarationImpl getStyle() {
@@ -100,12 +100,14 @@ public CSSStyleDeclarationImpl getStyle() {
100100

101101
/**
102102
* Sets the style to a new one.
103+
*
103104
* @param style the new style
104105
*/
105106
public void setStyle(final CSSStyleDeclarationImpl style) {
106107
style_ = style;
107108
}
108109

110+
/** {@inheritDoc} */
109111
@Override
110112
public boolean equals(final Object obj) {
111113
if (this == obj) {
@@ -119,13 +121,15 @@ public boolean equals(final Object obj) {
119121
&& ParserUtils.equals(getStyle(), cffr.getStyle());
120122
}
121123

124+
/** {@inheritDoc} */
122125
@Override
123126
public int hashCode() {
124127
int hash = super.hashCode();
125128
hash = ParserUtils.hashCode(hash, style_);
126129
return hash;
127130
}
128131

132+
/** {@inheritDoc} */
129133
@Override
130134
public String toString() {
131135
return getCssText();

src/main/java/org/htmlunit/cssparser/dom/CSSImportRuleImpl.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* Implementation of CSSImportRule.
2626
*
2727
* @author Ronald Brill
28+
*
2829
*/
2930
public class CSSImportRuleImpl extends AbstractCSSRuleImpl {
3031

@@ -49,9 +50,7 @@ public CSSImportRuleImpl(
4950
media_ = media;
5051
}
5152

52-
/**
53-
* {@inheritDoc}
54-
*/
53+
/** {@inheritDoc} */
5554
@Override
5655
public String getCssText() {
5756
final StringBuilder sb = new StringBuilder();
@@ -70,9 +69,7 @@ public String getCssText() {
7069
return sb.toString();
7170
}
7271

73-
/**
74-
* {@inheritDoc}
75-
*/
72+
/** {@inheritDoc} */
7673
@Override
7774
public void setCssText(final String cssText) throws DOMException {
7875
try {
@@ -105,31 +102,39 @@ public void setCssText(final String cssText) throws DOMException {
105102
}
106103

107104
/**
105+
* <p>getHref.</p>
106+
*
108107
* @return the href
109108
*/
110109
public String getHref() {
111110
return href_;
112111
}
113112

114113
/**
114+
* <p>getMedia.</p>
115+
*
115116
* @return the media lsit
116117
*/
117118
public MediaListImpl getMedia() {
118119
return media_;
119120
}
120121

121122
/**
123+
* <p>getStyleSheet.</p>
124+
*
122125
* @return the parent style sheet
123126
*/
124127
public CSSStyleSheetImpl getStyleSheet() {
125128
return getParentStyleSheet();
126129
}
127130

131+
/** {@inheritDoc} */
128132
@Override
129133
public String toString() {
130134
return getCssText();
131135
}
132136

137+
/** {@inheritDoc} */
133138
@Override
134139
public boolean equals(final Object obj) {
135140
if (this == obj) {
@@ -144,6 +149,7 @@ public boolean equals(final Object obj) {
144149
&& ParserUtils.equals(getMedia(), cir.getMedia());
145150
}
146151

152+
/** {@inheritDoc} */
147153
@Override
148154
public int hashCode() {
149155
int hash = super.hashCode();

src/main/java/org/htmlunit/cssparser/dom/CSSMediaRuleImpl.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* Implementation of CSSMediaRule.
2929
*
3030
* @author Ronald Brill
31+
*
3132
*/
3233
public class CSSMediaRuleImpl extends AbstractCSSRuleImpl {
3334

@@ -36,6 +37,7 @@ public class CSSMediaRuleImpl extends AbstractCSSRuleImpl {
3637

3738
/**
3839
* Ctor.
40+
*
3941
* @param parentStyleSheet the parent style sheet
4042
* @param parentRule the parent rule
4143
* @param media the media
@@ -48,9 +50,7 @@ public CSSMediaRuleImpl(
4850
mediaList_ = media;
4951
}
5052

51-
/**
52-
* {@inheritDoc}
53-
*/
53+
/** {@inheritDoc} */
5454
@Override
5555
public String getCssText() {
5656
final StringBuilder sb = new StringBuilder("@media ");
@@ -65,9 +65,7 @@ public String getCssText() {
6565
return sb.toString();
6666
}
6767

68-
/**
69-
* {@inheritDoc}
70-
*/
68+
/** {@inheritDoc} */
7169
@Override
7270
public void setCssText(final String cssText) throws DOMException {
7371
try {
@@ -100,13 +98,17 @@ public void setCssText(final String cssText) throws DOMException {
10098
}
10199

102100
/**
101+
* <p>getMediaList.</p>
102+
*
103103
* @return the media list
104104
*/
105105
public MediaListImpl getMediaList() {
106106
return mediaList_;
107107
}
108108

109109
/**
110+
* <p>getCssRules.</p>
111+
*
110112
* @return the css rules
111113
*/
112114
public CSSRuleListImpl getCssRules() {
@@ -118,6 +120,7 @@ public CSSRuleListImpl getCssRules() {
118120

119121
/**
120122
* Insert a new rule at the given index.
123+
*
121124
* @param rule the rule to be inserted
122125
* @param index the insert pos
123126
* @throws DOMException in case of error
@@ -181,11 +184,13 @@ public void setRuleList(final CSSRuleListImpl rules) {
181184
cssRules_ = rules;
182185
}
183186

187+
/** {@inheritDoc} */
184188
@Override
185189
public String toString() {
186190
return getCssText();
187191
}
188192

193+
/** {@inheritDoc} */
189194
@Override
190195
public boolean equals(final Object obj) {
191196
if (this == obj) {

src/main/java/org/htmlunit/cssparser/dom/CSSPageRuleImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ public void setCssText(final String cssText) throws DOMException {
109109
}
110110

111111
/**
112-
* @return the current selector text
112+
* <p>getSelectorText.</p>
113+
*
114+
* @return the selector text
113115
*/
114116
public String getSelectorText() {
115117
if (null == pseudoPage_) {

0 commit comments

Comments
 (0)