diff --git a/src/UglyToad.PdfPig/Tokens/BooleanToken.cs b/src/UglyToad.PdfPig/Tokens/BooleanToken.cs
index 93489a73..138b9a0c 100644
--- a/src/UglyToad.PdfPig/Tokens/BooleanToken.cs
+++ b/src/UglyToad.PdfPig/Tokens/BooleanToken.cs
@@ -1,16 +1,61 @@
namespace UglyToad.PdfPig.Tokens
{
+ using Util.JetBrains.Annotations;
+
+ ///
+ /// The boolean object either () or ().
+ ///
internal class BooleanToken : IDataToken
{
+ ///
+ /// The boolean token corresponding to .
+ ///
+ [NotNull]
public static BooleanToken True { get; } = new BooleanToken(true);
+ ///
+ /// The boolean token corresponding to
+ ///
+ [NotNull]
public static BooleanToken False { get; } = new BooleanToken(false);
+ ///
+ /// The value true/false of this boolean token.
+ ///
public bool Data { get; }
+ ///
+ /// Create a new .
+ ///
+ /// The value of the boolean.
private BooleanToken(bool data)
{
Data = data;
}
+
+ public override bool Equals(object obj)
+ {
+ if (!(obj is BooleanToken other))
+ {
+ return false;
+ }
+
+ return other.Data == Data;
+ }
+
+ protected bool Equals(BooleanToken other)
+ {
+ return Data == other.Data;
+ }
+
+ public override int GetHashCode()
+ {
+ return Data.GetHashCode();
+ }
+
+ public override string ToString()
+ {
+ return Data.ToString();
+ }
}
}
\ No newline at end of file
diff --git a/src/UglyToad.PdfPig/Tokens/CommentToken.cs b/src/UglyToad.PdfPig/Tokens/CommentToken.cs
index 54c84360..9bcdfef6 100644
--- a/src/UglyToad.PdfPig/Tokens/CommentToken.cs
+++ b/src/UglyToad.PdfPig/Tokens/CommentToken.cs
@@ -1,10 +1,24 @@
namespace UglyToad.PdfPig.Tokens
{
+ using Util.JetBrains.Annotations;
+
+ ///
+ /// A comment from a PDF document. Any occurrence of the percent sign character (%) outside a string or stream
+ /// introduces a comment. The comment consists of all characters between the percent sign and the end of the line.
+ ///
internal class CommentToken : IDataToken
{
+ ///
+ /// The text of the comment (excluding the initial percent '%' sign).
+ ///
+ [CanBeNull]
public string Data { get; }
- public CommentToken(string data)
+ ///
+ /// Create a new .
+ ///
+ /// The text of the comment.
+ public CommentToken([CanBeNull]string data)
{
Data = data;
}