code: public boolean appendValue(StringBuilder builder, Class fieldClazz, Object value, boolean isPresent,
              boolean useToken)
      {
          if (List.class.isAssignableFrom(fieldClazz))
          {
              isPresent = appendList(builder, value != null ? value : new ArrayList());
          }
  
          else if (Set.class.isAssignableFrom(fieldClazz))
          {
              isPresent = appendSet(builder, value != null ? value : new HashSet());
          }
  
          else if (Map.class.isAssignableFrom(fieldClazz))
          {
              isPresent = appendMap(builder, value != null ? value : new HashMap());
          }
          else
          {
              isPresent = true;
              appendValue(builder, fieldClazz, value, useToken);
          }
          return isPresent;
      }
docs: Appends value to builder object for given class type.
  
  @param builder
  string builder.
  @param fieldClazz
  field class.
  @param value
  value to be appended.
  @param isPresent
  if field is present.
  @param useToken
  the use token
  @return true, if value is not null else false.