This method is called to format a relation list.

@param value relation list instance
@return formatted relation list
542728
private String formatRelationList(List<Relation> value)
   {
      String result = null;

      if (value != null && value.size() != 0)
      {
         StringBuilder sb = new StringBuilder();
         for (Relation relation : value)
         {
            if (sb.length() != 0)
            {
               sb.append(m_delimiter);
            }

            sb.append(formatRelation(relation));
         }

         result = sb.toString();
      }

      return (result);
   }
1248339
public static String formatDate(long value) {
        synchronized (HttpDateFormat.class) {
            Date dateValue = new Date(value);
            return FORMAT.format(dateValue);
        }
    }
3971
public function setRelations($value)
    {
        if (is_array($value)) {
            $bag = new Bag();
            foreach ($value as $itemParameters) {
                $bag->add(new Relation($itemParameters));
            }
            $value = $bag;
        }
        return $this->setParameter('relations', $value);
    }
701161
@SafeVarargs
  static <T> String sqlArgumentList(T... values) {
    StringBuilder sb = new StringBuilder();
    if (values.length != 0) {
      sb.append(values[0]);
      for (int i=1; i < values.length; i++) {
        sb.append(',').append(' ').append(values[i]);
      }
    }
    return sb.toString();
  }
1317490
<T extends ListValue> void setListRelation(String attributeName,
            String value, Class<T> valuesClass) {
        instance.setListRelation(this, attributeName, value, valuesClass);
    }
1170006
public static RelationalBinding notEqualBinding(
            final String property,
            final Object value
            )
    {
        return (new RelationalBinding( property, Relation.NOT_EQUAL, value ));
    }
1279941
private List<GregorianCalendar> parseDates(String value) {
        String[] parts = value.split(",");
        List<GregorianCalendar> result = new ArrayList<>();
        for (String part : parts) {
            if (part.isEmpty()) {
                continue;
            }
            String[] subparts = part.split(":");
            GregorianCalendar cal = new GregorianCalendar();
            for (int i = 0; i < subparts.length; i++) {
                switch (i) {
                    case 0:
                        cal.set(GregorianCalendar.HOUR_OF_DAY, Integer.parseInt(subparts[i]));
                        break;
                    case 1:
                        cal.set(GregorianCalendar.MINUTE, Integer.parseInt(subparts[i]));
                        break;
                    case 2:
                        cal.set(GregorianCalendar.SECOND, Integer.parseInt(subparts[i]));
                        break;
                    case 3:
                        cal.set(GregorianCalendar.MILLISECOND, Integer.parseInt(subparts[i]));
                        break;
                }
            }
            result.add(cal);
        }
        return result;
    }
942930
public function setRelated($value)
    {
        $this->loadData(true);

        if (is_null($value)) {
            $value = [];
        }

        if (!is_array($value)) {
            throw new RelationException("HasMany relation can only be set with array of entities");
        }

        //Do not add items twice
        $matched = [];
        foreach ($value as $index => $item) {
            if (is_null($item)) {
                unset($value[$index]);
                continue;
            }

            $this->assertValid($item);
            if (!empty($instance = $this->matchOne($item))) {
                $matched[] = $instance;
                unset($value[$index]);
            }
        }

        $this->deleteInstances = array_diff($this->instances, $matched);
        $this->instances = $matched + $value;
    }
1118626
private Object convertParameter(Object value) {
        if (entityInstanceManager.isInstance(value)) {
            return entityInstanceManager.getDatastoreType(value);
        } else if (relationInstanceManager.isInstance(value)) {
            return relationInstanceManager.getDatastoreType(value);
        } else if (value instanceof Collection) {
            Collection collection = (Collection) value;
            List<Object> values = new ArrayList<>();
            for (Object o : collection) {
                values.add(convertParameter(o));
            }
            return values;
        }
        return value;
    }
945149
private List<Character> asCharList(Object value) {
        char[] values = (char[]) value;
        List<Character> list = new ArrayList<Character>(values.length);
        for (char charValue : values) {
            list.add(charValue);
        }
        return list;
    }
406192
public String format(String value) {
        StringBuilder s = new StringBuilder();

        if (value != null && value.trim().length() > 0) {
            boolean continuationLine = false;

            s.append(getName()).append(":");
            if (isFirstLineEmpty()) {
                s.append("\n");
                continuationLine = true;
            }

            try {
                BufferedReader reader = new BufferedReader(new StringReader(value));
                String line;
                while ((line = reader.readLine()) != null) {
                    if (continuationLine && line.trim().length() == 0) {
                        // put a dot on the empty continuation lines
                        s.append(" .\n");
                    } else {
                        s.append(" ").append(line).append("\n");
                    }

                    continuationLine = true;
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        return s.toString();
    }
768538
public static<R> Result<List<R>> ok(List<R> value) {
    	return new Result<List<R>>(value,OK,SUCCESS,null).emptyList(value.size()==0);
    }
518309
@SafeVarargs
	public static <T> LinkedList<T> newLinkedList(T... values) {
		return (LinkedList<T>) list(true, values);
	}
903358
@SuppressWarnings("unchecked")
    public static <V> MorphiaReference<V> wrap(final V value) {
        if (value instanceof List) {
            return (MorphiaReference<V>) new ListReference<V>((List<V>) value);
        } else if (value instanceof Set) {
            return (MorphiaReference<V>) new SetReference<V>((Set<V>) value);
        } else if (value instanceof Map) {
            return (MorphiaReference<V>) new MapReference<V>((Map<String, V>) value);
        } else {
            return new SingleReference<V>(value);
        }
    }
961196
protected<T> List<T> toList (T value) {

        if (value == null) {
            return null;
        }

        return Arrays.asList(value);
    }
429142
private String replaceOrdinals(String value, String commaSeparatedList) {
        String[] list = StringUtils.commaDelimitedListToStringArray(commaSeparatedList);
        for (int i = 0; i < list.length; i++) {
            String item = list[i].toUpperCase();
            value = StringUtils.replace(value.toUpperCase(), item, Integer.toString(i));
        }
        return value;
    }
1316720
public static RelationalBinding greaterThanBinding(
            final String property,
            final Object value
            )
    {
        return (new RelationalBinding( property, Relation.GREATER_THAN, value ));
    }