api/src/main/java/com/tersesystems/echopraxia/api/Value.java
/**
   * Wraps a list of fields with a Value as an object.
   *
   * @param fields the list of fields.
   * @return the Value.
   */
Wraps a list of fields with a Value as an object.
@param fields the list of fields.
@return the Value.
Wraps a list of fields with a Value as an object . @param fields the list of fields . @return the Value .
@NotNull
  public static ObjectValue object(@NotNull List<Field> fields) {
    if (fields == null || fields.size() == 0) {
      return ObjectValue.EMPTY;
    }
    final List<Field> nonNullList = new ArrayList<>(fields.size());
    for (Field field : fields) {
      if (field != null) {
        nonNullList.add(field);
      }
    }
    return new ObjectValue(nonNullList);
  }
@ NotNull public static ObjectValue object ( @ NotNull List < Field > fields ) { if ( fields == null || fields . size ( ) == 0 ) { return ObjectValue . EMPTY ; } final List < Field > nonNullList = new ArrayList < > ( fields . size ( ) ) ; for ( Field field : fields ) { if ( field != null ) { nonNullList . add ( field ) ; } } return new ObjectValue ( nonNullList ) ; }
Wraps a list of fields with a Value as an object.
Wraps a list of fields with a Value as an object .
// Null fields are not allowed.