[root]/cdx/scorebot/util/translator
Author | Changes | Lines of Code | Lines per Change |
---|---|---|---|
dound | 27 (100.0%) | 965 (100.0%) | 35.7 |
Fixed/removed checks for null pointers after having previously dereferenced the object.
4 lines of code changed in:
Stores a value as a Integer and can translate to and from an String. The String may specify the unit of time using its last character. That String is resulting from the translation from an Integer will be in the base unit. The String may be specified as a Double, though any fraction of a second will be rounded to the nearest integer value.
88 lines of code changed in:
Spaces are now replaced with underscores as intended.
3 lines of code changed in:
Provides validation/translation between a String which is a valid identifier and an arbitrary String.
63 lines of code changed in:
Now tracks the last exception which occurred when calling the canTranslate1/2 methods -- this is retrieved by those interested in what the exception was after the method returns false.
12 lines of code changed in:
This class allows the user to specify multiple translators and this translator will choose which one to use based on what value it is actually given. Useful for when a mix of Object types are contained in a list, etc.
89 lines of code changed in:
no message
2 lines of code changed in:
If the type T isn't known and Object is used, the type will need to be ascertained when something is actually translated -- so type is now updated whenever translate1 is called. If translate2 is called before translate1, the constructor will not be found because Object itself will be searched for a string constructor which it does not have.
11 lines of code changed in:
Changed the name of TranslatorObjectString to clarify its use. Add TranslatorInsanceString to translate between an Object and a string using a string constructor.
230 lines of code changed in:
Can now take one, two, or a list of objects to pass as parameters to the appropriate constructor vice always having to use the default constructor.
71 lines of code changed in:
This new translator translates a String representation of an Object (package.class) and the Object itself (created from the default constructor for that Object).
5 lines of code changed in:
Updated translators so they return null vice die when they are given a null pointer to convert. Also added some a new "self-translator" which is a placeholder class which simply returns the values that are passed in.
61 lines of code changed in:
Fixed ConfingOption design flaw so it now allows its values to be set and retrieved from their string representations. Translators now do the translation.
326 lines of code changed in: