Package org.mariuszgromada.math.mxparser
Class StringModel
java.lang.Object
org.mariuszgromada.math.mxparser.StringModel
A class containing definitions of text strings that are with respect to the user's language.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringResourcesGets currently used user-specific text resource object.static voidprint()Displays the user-defined text resources used and the effect of their use to generate descriptions of the parser elements on the console.static voidPrints to the console the result of applying user-specific text resources to generate parser description and objects.static voidSets default english string resources.static voidSets default string resources.static voidsetStringResources(StringResources stringResources) Sets a user-specific text resource object.
-
Constructor Details
-
StringModel
public StringModel()
-
-
Method Details
-
setStringResources
Sets a user-specific text resource object. Using this object, you can provide your own text model or your own translations. If the provided string resources object is null, no change will be done and the current object will still be used.- Parameters:
stringResources- A user-specific text resource object- See Also:
-
setDefaultStringResources
public static void setDefaultStringResources()Sets default string resources.- See Also:
-
setDefaultEnglishStringResources
public static void setDefaultEnglishStringResources()Sets default english string resources.- See Also:
-
getStringResources
Gets currently used user-specific text resource object.- Returns:
- Currently used StringResources
-
print
public static void print()Displays the user-defined text resources used and the effect of their use to generate descriptions of the parser elements on the console. -
printDescriptions
public static void printDescriptions()Prints to the console the result of applying user-specific text resources to generate parser description and objects. The method can help with debugging when creating your own translations.
-