Sha256: 733a92c717f8bd91e15a44f5c32f1baf00ad7bf6d306f4045a9000d58003d520

Contents?: true

Size: 817 Bytes

Versions: 20

Compression:

Stored size: 817 Bytes

Contents

from javonet.core.handler.CommandHandler.AbstractCommandHandler import AbstractCommandHandler


class ArraySetItemHandler(AbstractCommandHandler):
    def __init__(self):
        self._required_parameters_count = 3

    def process(self, command):
        try:
            if len(command.payload) < self._required_parameters_count:
                raise Exception("ArraySetItemHandler parameters mismatch!")

            array = command.payload[0]
            value = command.payload[1]
            indexes = command.payload[2:]
            if len(indexes) == 1:
                array[indexes[0]] = value
                return 0

        except Exception as e:
            exc_type, exc_value = type(e), e
            new_exc = exc_type(exc_value).with_traceback(e.__traceback__)
            raise new_exc from None

Version data entries

20 entries across 10 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.1.10 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.10 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.9 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.9 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.8 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.8 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.7 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.7 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.6 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.6 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.5 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.5 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.4 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.4 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.3 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.3 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.2 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.2 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.1 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py
javonet-ruby-sdk-2.1.1 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/CommandHandler/ArraySetItemHandler.py