# Stubs for zope.schema.vocabulary (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any, Optional

class SimpleTerm:
    value: Any = ...
    token: Any = ...
    title: Any = ...
    def __init__(self, value: Any, token: Optional[Any] = ..., title: Optional[Any] = ...) -> None: ...
    def __eq__(self, other: Any): ...
    def __ne__(self, other: Any): ...
    def __hash__(self): ...

class SimpleVocabulary:
    by_value: Any = ...
    by_token: Any = ...
    def __init__(self, terms: Any, *interfaces: Any, **kwargs: Any) -> None: ...
    @classmethod
    def fromItems(cls, items: Any, *interfaces: Any): ...
    @classmethod
    def fromValues(cls, values: Any, *interfaces: Any): ...
    @classmethod
    def createTerm(cls, *args: Any): ...
    def __contains__(self, value: Any): ...
    def getTerm(self, value: Any): ...
    def getTermByToken(self, token: Any): ...
    def __iter__(self): ...
    def __len__(self): ...
    def __eq__(self, other: Any): ...
    def __ne__(self, other: Any): ...
    def __hash__(self): ...

class TreeVocabulary:
    terms_factory: Any = ...
    path_by_value: Any = ...
    term_by_value: Any = ...
    term_by_token: Any = ...
    def __init__(self, terms: Any, *interfaces: Any) -> None: ...
    def __contains__(self, value: Any): ...
    def __getitem__(self, key: Any): ...
    def __iter__(self): ...
    def __len__(self): ...
    def get(self, key: Any, default: Optional[Any] = ...): ...
    def keys(self): ...
    def values(self): ...
    def items(self): ...
    @classmethod
    def fromDict(cls, dict_: Any, *interfaces: Any): ...
    def getTerm(self, value: Any): ...
    def getTermByToken(self, token: Any): ...
    def getTermPath(self, value: Any): ...

class VocabularyRegistryError(LookupError):
    name: Any = ...
    def __init__(self, name: Any) -> None: ...

class VocabularyRegistry:
    def __init__(self) -> None: ...
    def get(self, context: Any, name: Any): ...
    def register(self, name: Any, factory: Any) -> None: ...

def getVocabularyRegistry(): ...
def setVocabularyRegistry(registry: Any) -> None: ...
