Skip to content

Commit

Permalink
Add JavaDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
QuickWrite committed Sep 17, 2023
1 parent 71be468 commit beb547b
Showing 1 changed file with 57 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,21 @@ interface EndChecker {
boolean check(final ContentIterator iterator);
}

/**
* The interface to declare that the object
* can be sanitized and implements custom logic for
* that exact step.
*/
interface Sanitizable {
/**
* Adds the element to the current result.
*
* @param index The position the element is az in the unsanitized list
* @param start The position that the sanitization started at.
* @param unsanitizedPatternList The list that is being generated from the previous steps
* @param builder The builder that is being used for the sanitization step
* @param whitespace The amount of whitespace that was being calculated
*/
void sanitize(
final int index,
final int start,
Expand All @@ -40,15 +54,58 @@ void sanitize(
);
}

/**
* The builder for the sanitized list
* of elements for the content.
*
* <p>
* This step is being done as it
* allows for better performance and
* better handling of the data at runtime.
* </p>
*/
interface ListBuilder {
/**
* Returns the list that is currently being operated upon.
*
* @return The current list of items
*/
List<FluentPattern> currentList();

/**
* Appends a string towards the current string builder.
*
* @param charSequence The characters that should be added
* @return The ListBuilder itself
*/
ListBuilder appendString(final CharSequence charSequence);

/**
* Appends a character towards the current string builder.
*
* @param character The character that should be added
* @return The ListBuilder itself
*/
ListBuilder appendString(final char character);

/**
* Adds an element to the current list and flushes
* the string to ensure the correct order of elements.
*
* @param pattern The pattern that should be added.
* @return The ListBuilder itself
*/
ListBuilder appendElement(final FluentPattern pattern);

/**
* Adds the current string that is being built
* to the list of elements.
*
* <p>
* If the current string is empty it won't
* get added as a new item.
* </p>
*/
void flushString();
}

Expand Down

0 comments on commit beb547b

Please sign in to comment.