Package ai.timefold.jpyinterpreter.util
Class StringFormatter
java.lang.Object
ai.timefold.jpyinterpreter.util.StringFormatter
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddGroupings(StringBuilder out, DefaultFormatSpec formatSpec, int groupSize) static voidalign(StringBuilder out, DefaultFormatSpec formatSpec, DefaultFormatSpec.AlignmentOption defaultAlignment) static voidalignWithPrefixRespectingSign(StringBuilder out, String prefix, DefaultFormatSpec formatSpec, DefaultFormatSpec.AlignmentOption defaultAlignment) static voidcenter(StringBuilder builder, String fillCharAsString, int width) static Stringformat(String text, List<PythonLikeObject> positionalArguments, Map<? extends PythonLikeObject, PythonLikeObject> namedArguments) static voidleftAlign(StringBuilder builder, String fillCharAsString, int width) static StringprintfInterpolate(CharSequence value, PythonLikeDict dict, StringFormatter.PrintfStringType stringType) static StringprintfInterpolate(CharSequence value, List<PythonLikeObject> tuple, StringFormatter.PrintfStringType stringType) static voidrespectSignRightAlign(StringBuilder builder, String fillCharAsString, int width) static voidrightAlign(StringBuilder builder, String fillCharAsString, int width)
-
Constructor Details
-
StringFormatter
public StringFormatter()
-
-
Method Details
-
printfInterpolate
public static String printfInterpolate(CharSequence value, List<PythonLikeObject> tuple, StringFormatter.PrintfStringType stringType) -
printfInterpolate
public static String printfInterpolate(CharSequence value, PythonLikeDict dict, StringFormatter.PrintfStringType stringType) -
format
public static String format(String text, List<PythonLikeObject> positionalArguments, Map<? extends PythonLikeObject, PythonLikeObject> namedArguments) -
addGroupings
-
align
public static void align(StringBuilder out, DefaultFormatSpec formatSpec, DefaultFormatSpec.AlignmentOption defaultAlignment) -
alignWithPrefixRespectingSign
public static void alignWithPrefixRespectingSign(StringBuilder out, String prefix, DefaultFormatSpec formatSpec, DefaultFormatSpec.AlignmentOption defaultAlignment) -
leftAlign
-
rightAlign
-
respectSignRightAlign
-
center
-