Skip to content

Commit

Permalink
Add missing javadocs
Browse files Browse the repository at this point in the history
DEVSIX-8872

Autoported commit.
Original commit hash: [2eca9207c]
Manual files:
commons/src/main/java/com/itextpdf/commons/datastructures/ConcurrentHashSet.java
io/src/main/java/com/itextpdf/io/exceptions/ExceptionUtil.java
  • Loading branch information
Dmitry Radchuk committed Feb 7, 2025
1 parent 75f6547 commit 2ee532d
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 2 deletions.
3 changes: 2 additions & 1 deletion itext/itext.io/itext/io/colors/IccProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ You should have received a copy of the GNU Affero General Public License
using iText.IO.Source;

namespace iText.IO.Colors {
/// <summary>Class used to represented the International Color Consortium profile</summary>
/// <summary>Class used to represent the International Color Consortium profile</summary>
public class IccProfile {
protected internal byte[] data;

protected internal int numComponents;

private static IDictionary<String, int?> cstags = new Dictionary<String, int?>();

/// <summary>Creates a new, empty icc profile.</summary>
protected internal IccProfile() {
}

Expand Down
20 changes: 20 additions & 0 deletions itext/itext.io/itext/io/exceptions/FontCompressionException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,34 @@ You should have received a copy of the GNU Affero General Public License
using iText.Commons.Exceptions;

namespace iText.IO.Exceptions {
/// <summary>General compressed font parsing exception.</summary>
public class FontCompressionException : ITextException {
/// <summary>
/// Creates a new
/// <see cref="FontCompressionException"/>.
/// </summary>
public FontCompressionException() {
}

/// <summary>
/// Creates a new
/// <see cref="FontCompressionException"/>.
/// </summary>
/// <param name="message">the detail message</param>
public FontCompressionException(String message)
: base(message) {
}

/// <summary>
/// Creates a new
/// <see cref="FontCompressionException"/>.
/// </summary>
/// <param name="message">the detail message</param>
/// <param name="cause">
/// the cause (which is saved for later retrieval by
/// <see cref="System.Exception.InnerException()"/>
/// method)
/// </param>
public FontCompressionException(String message, Exception cause)
: base(message, cause) {
}
Expand Down
1 change: 1 addition & 0 deletions itext/itext.io/itext/io/font/constants/FontResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ You should have received a copy of the GNU Affero General Public License
using System;

namespace iText.IO.Font.Constants {
/// <summary>Font resources paths.</summary>
public sealed class FontResources {
private FontResources() {
}
Expand Down
1 change: 1 addition & 0 deletions itext/itext.io/itext/io/font/constants/FontStretches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ You should have received a copy of the GNU Affero General Public License
using System;

namespace iText.IO.Font.Constants {
/// <summary>Font stretch constants and ids</summary>
public sealed class FontStretches {
private FontStretches() {
}
Expand Down
1 change: 1 addition & 0 deletions itext/itext.io/itext/io/font/constants/FontStyles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace iText.IO.Font.Constants {
/// <summary>Font styles ids</summary>
public sealed class FontStyles {
private FontStyles() {
}
Expand Down
18 changes: 18 additions & 0 deletions itext/itext.io/itext/io/font/constants/FontWeights.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ You should have received a copy of the GNU Affero General Public License
using System;

namespace iText.IO.Font.Constants {
/// <summary>Font weight values and utility methods</summary>
public sealed class FontWeights {
private FontWeights() {
}
Expand Down Expand Up @@ -54,6 +55,9 @@ private FontWeights() {
// Font weight Black (Heavy)
public const int BLACK = 900;

/// <summary>Parses font weight constant to corresponding value.</summary>
/// <param name="weight">weight constant</param>
/// <returns>corresponding weight int value</returns>
public static int FromType1FontWeight(String weight) {
int fontWeight = NORMAL;
switch (weight.ToLowerInvariant()) {
Expand Down Expand Up @@ -119,6 +123,20 @@ public static int FromType1FontWeight(String weight) {
return fontWeight;
}

/// <summary>
/// Normalize font weight to either
/// <see cref="THIN"/>
/// or
/// <see cref="BLACK"/>.
/// </summary>
/// <param name="fontWeight">font weight int value</param>
/// <returns>
/// either
/// <see cref="THIN"/>
/// or
/// <see cref="BLACK"/>
/// based on a given weight value
/// </returns>
public static int NormalizeFontWeight(int fontWeight) {
fontWeight = (fontWeight / 100) * 100;
if (fontWeight < iText.IO.Font.Constants.FontWeights.THIN) {
Expand Down
2 changes: 1 addition & 1 deletion port-hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dfcc46546d23280484f6c391364b455879cadb5d
2eca9207caa3e4bbf69409e58168ce59a6cd1c64

0 comments on commit 2ee532d

Please sign in to comment.