def remove(self, obj): try: rc = self.remove_(_jpype.JObject(obj, _jpype.JObject)) if rc is True: return except TypeError: pass raise ValueError("item not in list")
def count(self, obj): try: jo = _jpype.JObject(obj) c = 0 for i in self: if i.equals(jo): c += 1 return c except TypeError: return 0