Class BddFormatter
java.lang.Object
software.amazon.smithy.rulesengine.logic.bdd.BddFormatter
Formats BDD node structures to a writer.
-
Constructor Summary
ConstructorsConstructorDescriptionBddFormatter
(Bdd bdd, Writer writer, String indent) Creates a BDD formatter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
format()
Formats the BDD structure.static String
Formats a BDD to a string.static String
Formats a BDD to a string with custom indent.static String
formatReference
(int ref) Formats a BDD reference (node pointer) to a human-readable string.
-
Constructor Details
-
BddFormatter
Creates a BDD formatter.- Parameters:
bdd
- the BDD to formatwriter
- the writer to format toindent
- the indentation string
-
-
Method Details
-
format
Formats a BDD to a string.- Parameters:
bdd
- the BDD to format- Returns:
- a formatted string representation
-
format
Formats a BDD to a string with custom indent.- Parameters:
bdd
- the BDD to formatindent
- the indentation string- Returns:
- a formatted string representation
-
format
Formats the BDD structure.- Throws:
IOException
- if writing fails
-
formatReference
Formats a BDD reference (node pointer) to a human-readable string.- Parameters:
ref
- the reference to format- Returns:
- the formatted reference string
-