https://github.com/mause/guava_preconditions
https://github.com/mause/guava_preconditions
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/mause/guava_preconditions
- Owner: Mause
- License: mit
- Created: 2021-10-09T10:53:02.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-27T23:02:37.000Z (over 1 year ago)
- Last Synced: 2024-10-28T03:13:05.113Z (over 1 year ago)
- Language: Python
- Homepage: https://pypi.org/project/guava_preconditions
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# guava_preconditions
This library provides some simple functions from guava
# Module guava_preconditions
## Functions
`checkArgument(expression: bool, errorMessageTemplate: Optional[str] = None, *errorMessageArgs: Any) ‑> None`
: Ensures the truth of an expression involving one or more parameters to the calling method.
`checkElementIndex(index: int, size: int, desc: str = None) ‑> int`
: Ensures that index specifies a valid element in an array, list or string of size size.
`checkNotNull(reference: Optional[~T], errorMessageTemplate: str, *errorMessageArgs: Any) ‑> ~T`
: Ensures that an object reference passed as a parameter to the calling method is not null.
`checkPositionIndex(index: int, size: int, desc: str = None) ‑> int`
: Ensures that index specifies a valid position in an array, list or string of size size.
`checkPositionIndexes(start: int, end: int, size: int) ‑> None`
: Ensures that start and end specify a valid positions in an array, list or string of size size, and are in order.
`checkState(expression: bool, errorMessageTemplate: str = None, *errorMessageArgs: Any) ‑> None`
: Ensures the truth of an expression involving the state of the calling instance, but not involving any parameters to the calling method.
## Classes
`IllegalArgumentException(*args, **kwargs)`
: Common base class for all non-exit exceptions.
### Ancestors (in MRO)
* builtins.Exception
* builtins.BaseException
`IllegalStateException(*args, **kwargs)`
: Common base class for all non-exit exceptions.
### Ancestors (in MRO)
* builtins.Exception
* builtins.BaseException