Skip to content

Commit bb7c898

Browse files
committed
Formatted
1 parent 56f79b5 commit bb7c898

81 files changed

Lines changed: 1052 additions & 840 deletions

File tree

Some content is hidden

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

ph-css/src/main/java/com/helger/css/CCSS.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@
2020
import com.helger.annotation.style.PresentForCodeCoverage;
2121

2222
/**
23-
* Contains CSS style constants and utility stuff. Only constants that are part
24-
* of the CSS specification are contained in this class.<br>
25-
* Units of measurement are based on:
26-
* http://de.selfhtml.org/css/formate/wertzuweisung.htm<br>
23+
* Contains CSS style constants and utility stuff. Only constants that are part of the CSS
24+
* specification are contained in this class.<br>
25+
* Units of measurement are based on: http://de.selfhtml.org/css/formate/wertzuweisung.htm<br>
2726
*
2827
* @author Philip Helger
2928
*/
@@ -55,8 +54,7 @@ public final class CCSS
5554
public static final char DOUBLE_QUOTE = '"';
5655

5756
/**
58-
* The maximum fraction digits to be considered when printing CSS decimal
59-
* values.
57+
* The maximum fraction digits to be considered when printing CSS decimal values.
6058
*
6159
* @since 3.7.3
6260
*/

ph-css/src/main/java/com/helger/css/CSSFilenameHelper.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ private CSSFilenameHelper ()
3939
{}
4040

4141
/**
42-
* Check if the passed filename is a CSS filename (independent if regular or
43-
* minified)
42+
* Check if the passed filename is a CSS filename (independent if regular or minified)
4443
*
4544
* @param sFilename
4645
* The filename to check.
@@ -56,8 +55,7 @@ public static boolean isCSSFilename (@Nullable final String sFilename)
5655
*
5756
* @param sFilename
5857
* The filename to check.
59-
* @return <code>true</code> if the passed filename is a minified CSS
60-
* filename.
58+
* @return <code>true</code> if the passed filename is a minified CSS filename.
6159
*/
6260
public static boolean isMinifiedCSSFilename (@Nullable final String sFilename)
6361
{
@@ -77,8 +75,8 @@ public static boolean isRegularCSSFilename (@Nullable final String sFilename)
7775
}
7876

7977
/**
80-
* Get the minified CSS filename from the passed filename. If the passed
81-
* filename is already minified, it is returned as is.
78+
* Get the minified CSS filename from the passed filename. If the passed filename is already
79+
* minified, it is returned as is.
8280
*
8381
* @param sCSSFilename
8482
* The filename to get minified. May not be <code>null</code>.
@@ -87,7 +85,8 @@ public static boolean isRegularCSSFilename (@Nullable final String sFilename)
8785
@NonNull
8886
public static String getMinifiedCSSFilename (@NonNull final String sCSSFilename)
8987
{
90-
ValueEnforcer.isTrue (isCSSFilename (sCSSFilename), "Passed file name '" + sCSSFilename + "' is not a CSS file name!");
88+
ValueEnforcer.isTrue (isCSSFilename (sCSSFilename),
89+
"Passed file name '" + sCSSFilename + "' is not a CSS file name!");
9190
if (isMinifiedCSSFilename (sCSSFilename))
9291
return sCSSFilename;
9392
return StringHelper.trimEnd (sCSSFilename, CCSS.FILE_EXTENSION_CSS) + CCSS.FILE_EXTENSION_MIN_CSS;

ph-css/src/main/java/com/helger/css/CSSSourceArea.java

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
import com.helger.base.tostring.ToStringGenerator;
2626

2727
/**
28-
* Defines the source location of a single token when reading CSS from a stream.
29-
* It consists of the start position (getTokenBegin*) and the end position
30-
* (getTokenEnd*).
28+
* Defines the source location of a single token when reading CSS from a stream. It consists of the
29+
* start position (getTokenBegin*) and the end position (getTokenEnd*).
3130
*
3231
* @author Philip Helger
3332
*/
@@ -43,17 +42,18 @@ public class CSSSourceArea
4342
* Constructor
4443
*
4544
* @param nBeginLineNumber
46-
* Line number of the beginning. May be -1 if not such token is
47-
* available.
45+
* Line number of the beginning. May be -1 if not such token is available.
4846
* @param nBeginColumnNumber
49-
* Column number of the beginning. May be -1 if not such token is
50-
* available.
47+
* Column number of the beginning. May be -1 if not such token is available.
5148
* @param nEndLineNumber
5249
* Line number of the end. May be -1 if not such token is available.
5350
* @param nEndColumnNumber
5451
* Column number of the end. May be -1 if not such token is available.
5552
*/
56-
public CSSSourceArea (final int nBeginLineNumber, final int nBeginColumnNumber, final int nEndLineNumber, final int nEndColumnNumber)
53+
public CSSSourceArea (final int nBeginLineNumber,
54+
final int nBeginColumnNumber,
55+
final int nEndLineNumber,
56+
final int nEndColumnNumber)
5757
{
5858
m_nBeginLineNumber = nBeginLineNumber;
5959
m_nBeginColumnNumber = nBeginColumnNumber;
@@ -62,8 +62,8 @@ public CSSSourceArea (final int nBeginLineNumber, final int nBeginColumnNumber,
6262
}
6363

6464
/**
65-
* @return The line number where the token begins (incl.). May be -1 if not
66-
* such token is available.
65+
* @return The line number where the token begins (incl.). May be -1 if not such token is
66+
* available.
6767
*/
6868
@CheckForSigned
6969
public int getTokenBeginLineNumber ()
@@ -72,8 +72,8 @@ public int getTokenBeginLineNumber ()
7272
}
7373

7474
/**
75-
* @return The column number where the token begins (incl.). May be -1 if not
76-
* such token is available.
75+
* @return The column number where the token begins (incl.). May be -1 if not such token is
76+
* available.
7777
*/
7878
@CheckForSigned
7979
public int getTokenBeginColumnNumber ()
@@ -82,8 +82,7 @@ public int getTokenBeginColumnNumber ()
8282
}
8383

8484
/**
85-
* @return The line number where the token ends (incl.). May be -1 if not such
86-
* token is available.
85+
* @return The line number where the token ends (incl.). May be -1 if not such token is available.
8786
*/
8887
@CheckForSigned
8988
public int getTokenEndLineNumber ()
@@ -92,8 +91,8 @@ public int getTokenEndLineNumber ()
9291
}
9392

9493
/**
95-
* @return The column number where the token ends (incl.). May be -1 if not
96-
* such token is available.
94+
* @return The column number where the token ends (incl.). May be -1 if not such token is
95+
* available.
9796
*/
9897
@CheckForSigned
9998
public int getTokenEndColumnNumber ()
@@ -102,10 +101,9 @@ public int getTokenEndColumnNumber ()
102101
}
103102

104103
/**
105-
* @return The location of the token as a simple string. Never
106-
* <code>null</code>. Example: <code>(1:2/3:4)</code>. If begin and
107-
* end are identical, only one line/column value is printed:
108-
* <code>(1:2)</code>.
104+
* @return The location of the token as a simple string. Never <code>null</code>. Example:
105+
* <code>(1:2/3:4)</code>. If begin and end are identical, only one line/column value is
106+
* printed: <code>(1:2)</code>.
109107
*/
110108
@NonNull
111109
@Nonempty
@@ -116,7 +114,15 @@ public String getTokenLocationAsString ()
116114
return "(" + m_nBeginLineNumber + ":" + m_nBeginColumnNumber + ")";
117115

118116
// Begin != end
119-
return "(" + m_nBeginLineNumber + ":" + m_nBeginColumnNumber + "/" + m_nEndLineNumber + ":" + m_nEndColumnNumber + ")";
117+
return "(" +
118+
m_nBeginLineNumber +
119+
":" +
120+
m_nBeginColumnNumber +
121+
"/" +
122+
m_nEndLineNumber +
123+
":" +
124+
m_nEndColumnNumber +
125+
")";
120126
}
121127

122128
@Override

ph-css/src/main/java/com/helger/css/CSSSourceLocation.java

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@
3030
import com.helger.base.tostring.ToStringGenerator;
3131

3232
/**
33-
* Defines the source location of an object when reading CSS from a stream. It
34-
* consists of the position of the start token and the position of the end
35-
* token.
33+
* Defines the source location of an object when reading CSS from a stream. It consists of the
34+
* position of the start token and the position of the end token.
3635
*
3736
* @author Philip Helger
3837
*/
@@ -46,11 +45,11 @@ public class CSSSourceLocation
4645
* Constructor.
4746
*
4847
* @param aFirstTokenArea
49-
* Area of the first token. May be <code>null</code> if the last token
50-
* area is not <code>null</code>.
48+
* Area of the first token. May be <code>null</code> if the last token area is not
49+
* <code>null</code>.
5150
* @param aLastTokenArea
52-
* Area of the last token. May be <code>null</code> if the first token
53-
* area is not <code>null</code>.
51+
* Area of the last token. May be <code>null</code> if the first token area is not
52+
* <code>null</code>.
5453
* @throws IllegalArgumentException
5554
* if both areas are <code>null</code>.
5655
*/
@@ -62,8 +61,8 @@ public CSSSourceLocation (@Nullable final CSSSourceArea aFirstTokenArea, @Nullab
6261
}
6362

6463
/**
65-
* @return The area of the first token. May be <code>null</code> if no such
66-
* information is available.
64+
* @return The area of the first token. May be <code>null</code> if no such information is
65+
* available.
6766
*/
6867
@Nullable
6968
public CSSSourceArea getFirstTokenArea ()
@@ -80,8 +79,8 @@ public boolean hasFirstTokenArea ()
8079
}
8180

8281
/**
83-
* @return The line number where the first token begins (incl.). May be -1 if
84-
* not such token is available.
82+
* @return The line number where the first token begins (incl.). May be -1 if not such token is
83+
* available.
8584
*/
8685
@CheckForSigned
8786
public int getFirstTokenBeginLineNumber ()
@@ -90,8 +89,8 @@ public int getFirstTokenBeginLineNumber ()
9089
}
9190

9291
/**
93-
* @return The column number where the first token begins (incl.). May be -1
94-
* if not such token is available.
92+
* @return The column number where the first token begins (incl.). May be -1 if not such token is
93+
* available.
9594
*/
9695
@CheckForSigned
9796
public int getFirstTokenBeginColumnNumber ()
@@ -100,8 +99,8 @@ public int getFirstTokenBeginColumnNumber ()
10099
}
101100

102101
/**
103-
* @return The line number where the fist token ends (incl.). May be -1 if not
104-
* such token is available.
102+
* @return The line number where the fist token ends (incl.). May be -1 if not such token is
103+
* available.
105104
*/
106105
@CheckForSigned
107106
public int getFirstTokenEndLineNumber ()
@@ -110,8 +109,8 @@ public int getFirstTokenEndLineNumber ()
110109
}
111110

112111
/**
113-
* @return The column number where the first token ends (incl.). May be -1 if
114-
* not such token is available.
112+
* @return The column number where the first token ends (incl.). May be -1 if not such token is
113+
* available.
115114
*/
116115
@CheckForSigned
117116
public int getFirstTokenEndColumnNumber ()
@@ -120,8 +119,8 @@ public int getFirstTokenEndColumnNumber ()
120119
}
121120

122121
/**
123-
* @return The area of the last token. May be <code>null</code> if no such
124-
* information is available.
122+
* @return The area of the last token. May be <code>null</code> if no such information is
123+
* available.
125124
*/
126125
@Nullable
127126
public CSSSourceArea getLastTokenArea ()
@@ -138,8 +137,8 @@ public boolean hasLastTokenArea ()
138137
}
139138

140139
/**
141-
* @return The line number where the last token begins (incl.). May be -1 if
142-
* not such token is available.
140+
* @return The line number where the last token begins (incl.). May be -1 if not such token is
141+
* available.
143142
*/
144143
@CheckForSigned
145144
public int getLastTokenBeginLineNumber ()
@@ -148,8 +147,8 @@ public int getLastTokenBeginLineNumber ()
148147
}
149148

150149
/**
151-
* @return The column number where the last token begins (incl.). May be -1 if
152-
* not such token is available.
150+
* @return The column number where the last token begins (incl.). May be -1 if not such token is
151+
* available.
153152
*/
154153
@CheckForSigned
155154
public int getLastTokenBeginColumnNumber ()
@@ -158,8 +157,8 @@ public int getLastTokenBeginColumnNumber ()
158157
}
159158

160159
/**
161-
* @return The line number where the fist token ends (incl.). May be -1 if not
162-
* such token is available.
160+
* @return The line number where the fist token ends (incl.). May be -1 if not such token is
161+
* available.
163162
*/
164163
@CheckForSigned
165164
public int getLastTokenEndLineNumber ()
@@ -168,8 +167,8 @@ public int getLastTokenEndLineNumber ()
168167
}
169168

170169
/**
171-
* @return The column number where the last token ends (incl.). May be -1 if
172-
* not such token is available.
170+
* @return The column number where the last token ends (incl.). May be -1 if not such token is
171+
* available.
173172
*/
174173
@CheckForSigned
175174
public int getLastTokenEndColumnNumber ()
@@ -178,8 +177,7 @@ public int getLastTokenEndColumnNumber ()
178177
}
179178

180179
/**
181-
* @return The location of the first token as a simple string. May be
182-
* <code>null</code>.
180+
* @return The location of the first token as a simple string. May be <code>null</code>.
183181
*/
184182
@Nullable
185183
public String getFirstTokenLocationAsString ()
@@ -188,8 +186,7 @@ public String getFirstTokenLocationAsString ()
188186
}
189187

190188
/**
191-
* @return The location of the last token as a simple string. May be
192-
* <code>null</code>.
189+
* @return The location of the last token as a simple string. May be <code>null</code>.
193190
*/
194191
@Nullable
195192
public String getLastTokenLocationAsString ()
@@ -214,7 +211,8 @@ public boolean equals (final Object o)
214211
if (o == null || !getClass ().equals (o.getClass ()))
215212
return false;
216213
final CSSSourceLocation rhs = (CSSSourceLocation) o;
217-
return EqualsHelper.equals (m_aFirstTokenArea, rhs.m_aFirstTokenArea) && EqualsHelper.equals (m_aLastTokenArea, rhs.m_aLastTokenArea);
214+
return EqualsHelper.equals (m_aFirstTokenArea, rhs.m_aFirstTokenArea) &&
215+
EqualsHelper.equals (m_aLastTokenArea, rhs.m_aLastTokenArea);
218216
}
219217

220218
@Override

ph-css/src/main/java/com/helger/css/ECSSSpecificationStatus.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public enum ECSSSpecificationStatus
3434
REWRITING,
3535
ABANDONED,
3636
/**
37-
* Special status that indicates that a CSS property is defined outside the
38-
* scope of the CSS specifications.
37+
* Special status that indicates that a CSS property is defined outside the scope of the CSS
38+
* specifications.
3939
*/
4040
OUTSIDE_CSS;
4141
}

ph-css/src/main/java/com/helger/css/ICSSSourceLocationAware.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
public interface ICSSSourceLocationAware
2727
{
2828
/**
29-
* @return The source location of this object when it was read by the parser.
30-
* May be <code>null</code> if an object was not read but manually
31-
* created.
29+
* @return The source location of this object when it was read by the parser. May be
30+
* <code>null</code> if an object was not read but manually created.
3231
*/
3332
@Nullable
3433
CSSSourceLocation getSourceLocation ();

0 commit comments

Comments
 (0)