diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-01-06 22:11:12 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-01-06 22:11:12 +0000 |
| commit | b81b68e59c6d34ccd109ec9aa517c4ead3c56ebd (patch) | |
| tree | 09a98bf42ed1be289a6501241322eb6d438f1e5a /src/main/resources/python/runtime | |
| parent | 45ae597f7751b7e9d12ef00cf394a9cf0155176c (diff) | |
Implement overloading by argument type in Python backend
Diffstat (limited to 'src/main/resources/python/runtime')
| -rw-r--r-- | src/main/resources/python/runtime/java/lang/Integer.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/resources/python/runtime/java/lang/Integer.py b/src/main/resources/python/runtime/java/lang/Integer.py index 0cf55af..b9e9097 100644 --- a/src/main/resources/python/runtime/java/lang/Integer.py +++ b/src/main/resources/python/runtime/java/lang/Integer.py @@ -1,12 +1,16 @@ class Integer(object): @staticmethod - def parseInt_1(value): + def parseInt__java_lang_String(value): return int(value) + + @staticmethod + def valueOf__int(value): + return value def __init__(self, value): self._value = value - def equals_1(self, other): + def equals__java_lang_Object(self, other): # TODO: test this properly return isinstance(other, Integer) and other._value == self._value |
