Package 

Interface AssignmentBuilder

    • Method Summary

      Modifier and Type Method Description
      abstract Unit eq(String $self, String value)
      Unit eq(String $self, Object value)
      abstract Unit eq(String $self, Assignee assignee)
      abstract Unit eq(String $self, List<String> strings)
      Unit eq(String $self, AssigneeBuilder assigneeBuilder)
      Unit notEmpty(List<?> $self, Function0<Unit> block) A common pattern is to not add statements if a list is empty.
      Unit notEmpty(Map<?, ?> $self, Function0<Unit> block) A common pattern is to not add statements if a map is empty.
      <T extends Any, R extends Any> R notNullOrEmpty(List<T> $self, Function0<R> default, Function1<List<T>, R> block) Calls the specified function block with this value as its argument and returns its result if this nullable list is either null or empty.
      <R extends Any> R notNullOrBlank(String $self, Function0<R> default, Function1<String, R> block) Calls the specified function block with this value as its argument and returns its result if this nullable string is either null or empty or consists solely of whitespace characters.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • notEmpty

         Unit notEmpty(List<?> $self, Function0<Unit> block)

        A common pattern is to not add statements if a list is empty. This function only executes block if the given list is not empty.

      • notEmpty

         Unit notEmpty(Map<?, ?> $self, Function0<Unit> block)

        A common pattern is to not add statements if a map is empty. This function only executes block if the given map is not empty.

      • notNullOrEmpty

         <T extends Any, R extends Any> R notNullOrEmpty(List<T> $self, Function0<R> default, Function1<List<T>, R> block)

        Calls the specified function block with this value as its argument and returns its result if this nullable list is either null or empty. Otherwise, the specified function default is called and returns its result

      • notNullOrBlank

         <R extends Any> R notNullOrBlank(String $self, Function0<R> default, Function1<String, R> block)

        Calls the specified function block with this value as its argument and returns its result if this nullable string is either null or empty or consists solely of whitespace characters. Otherwise, the specified function default is called and returns its result