Skip to content

Commit

Permalink
fix(ia): inherit from java.util.ArrayList (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarcoatl committed Jun 24, 2024
1 parent 27691f8 commit 048b695
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ from typing import Any, Iterator, List
from com.inductiveautomation.ignition.common import Dataset
from com.inductiveautomation.ignition.common.alarming import AlarmEvent, PyAlarmEvent
from dev.coatl.helper.types import AnyStr
from java.util import ArrayList

class AlarmQueryResult:
def getAssociatedDate(self, uuid: AnyStr) -> Dataset: ...
def getDataSet(self) -> Dataset: ...
def getEvent(self, uuid: AnyStr) -> AlarmEvent: ...

class AlarmQueryResultImpl(AlarmQueryResult):
class AlarmQueryResultImpl(AlarmQueryResult, ArrayList):
def __init__(self, *args: Any) -> None: ...
def __iter__(self) -> Iterator[PyAlarmEvent]: ...
@staticmethod
Expand Down
15 changes: 15 additions & 0 deletions stubs/java/util/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ from java.util.function import (
)

class Collection:
def __getitem__(self, key: Union[int, Any]) -> Any: ...
def __len__(self) -> int: ...
def add(self, e: Any) -> bool: ...
def addAll(self, c: Collection) -> bool: ...
def clear(self) -> None: ...
Expand Down Expand Up @@ -222,6 +224,13 @@ class AbstractCollection(Object, Collection):
def retainAll(self, v: Collection) -> bool: ...
def size(self) -> int: ...

class AbstractList(AbstractCollection):
def indexOf(self, o: Object) -> int: ...
def lastIndexOf(self, o: Object) -> int: ...
def listIterator(self, index: Optional[int] = ...) -> ListIterator: ...
def set(self, index: int, element: Any) -> Any: ...
def subList(self, fromIndex: int, toIndex: int) -> List[Any]: ...

class AbstractMap(Object, Map):
def clear(self) -> None: ...
def containsKey(self, key: Object) -> bool: ...
Expand All @@ -236,6 +245,12 @@ class AbstractMap(Object, Map):
def size(self) -> int: ...
def values(self) -> Collection: ...

class ArrayList(AbstractList):
def __init__(self, *args: Any) -> None: ...
def ensureCapacity(self, minCapacity: int) -> None: ...
def get(self, index: int) -> Any: ...
def trimToSize(self) -> None: ...

class Calendar(Object):
ALL_STYLES: int
AM: int
Expand Down

0 comments on commit 048b695

Please sign in to comment.