Class EventCode<T extends EventCode<T>>

    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Returns:
        true if code is empty
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • append

        public T append​(String part)
        Append the given part to the code
        Parameters:
        part -
        Returns:
        the newly created code
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • append

        public T append​(T part)
        Append the given part to the code
        Parameters:
        part -
        Returns:
        the newly created code
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • countParts

        public int countParts()

        Counts the parts of a code.

        Example:

         import ch.ivyteam.ivy.process.model.value.SignalCode;
         Number count = new SignalCode("user:created:33").countParts();
         // count is 3
         
        Returns:
        the number of parts
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getPart

        public String getPart​(int pos)

        Gets a part of the code.

        Example:
         import ch.ivyteam.ivy.process.model.value.SignalCode;
         String part = new SignalCode("user:created").getPart(1);
         // part is "created"
         
        Parameters:
        pos - The position of the part that is requested. Counting starts with 0.
        Returns:
        The requested part
        Throws:
        IllegalArgumentException - if position is not in range
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getPartAsNumber

        public long getPartAsNumber​(int pos)

        Gets a part of the code as number

        Example:
         import ch.ivyteam.ivy.process.model.value.SignalCode;
         Number num = new SignalCode("signal:code:42").getPartAsNumber(2);
         // num is 42
         
        Parameters:
        pos - The position of the part that is requested. Counting starts with 0.
        Returns:
        The requested part as number
        Throws:
        IllegalArgumentException - if position is not in range
        NumberFormatException - if part cannot be converted to number
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.