javaslang.collection.List.append()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中javaslang.collection.List.append()方法的一些代码示例,展示了List.append()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。List.append()方法的具体详情如下:
包路径:javaslang.collection.List
类名称:List
方法名:append

List.append介绍

暂无

代码示例

代码示例来源:origin: org.immutables.javaslang/javaslang-encodings

@Encoding.Naming(standard = Encoding.StandardNaming.ADD)
@Encoding.Init
void add(
 final T element)
{
 this.list = this.list.append(element);
}

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.validation.main

"Unrecognized schema statement: " + name,
 Optional.empty());
return errors.append(error);

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.processing.api

@Override
public void onError(
 final SMFErrorType e)
{
 this.errors = this.errors.append(e);
}

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.validation.api

error_x = checkComponentCount(error_x, name, attr_schema, attribute);
} else if (schema.allowExtraAttributes() == SMF_EXTRA_ATTRIBUTES_DISALLOWED) {
 error_x = errors.append(errorExtraAttribute(name));

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.processing.api

@Override
public void onWarning(
 final SMFWarningType w)
{
 this.warnings = this.warnings.append(w);
}

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.core

public Builder addAttributesInOrder(SMFAttribute element) {
 this.attributesInOrder_list = this.attributesInOrder_list.append(element);
 return this;
}

代码示例来源:origin: com.io7m.smfj/io7m-smfj-core

public Builder addAttributesInOrder(SMFAttribute element) {
 this.attributesInOrder_list = this.attributesInOrder_list.append(element);
 return this;
}

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.bytebuffer

@Override
public void onWarning(
 final SMFWarningType w)
{
 LOG.warn("parse warning: {}", w.fullMessage());
 this.warnings = this.warnings.append(w);
}

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.bytebuffer

@Override
public void onError(
 final SMFErrorType e)
{
 LOG.error("parse error: {}", e.fullMessage());
 this.errors = this.errors.append(e);
}

代码示例来源:origin: com.io7m.smfj.jcanephora/io7m-smfj-jcanephora-core

@Override
public void onError(
 final SMFParseError e)
{
 final LexicalPosition<Path> lex = e.lexical();
 LOG.error(
  "parse error: {}:{}:{}: {}",
  lex.file(),
  Integer.valueOf(lex.line()),
  Integer.valueOf(lex.column()),
  e.message());
 this.errors = this.errors.append(e);
}

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.validation.api

private static List<SMFErrorType> checkCoordinateSystem(
 final SMFHeader header,
 final SMFSchema schema,
 final List<SMFErrorType> errors)
{
 List<SMFErrorType> error_accum = errors;
 final Optional<SMFCoordinateSystem> coords_opt =
  schema.requiredCoordinateSystem();
 if (coords_opt.isPresent()) {
  final SMFCoordinateSystem req_coords = coords_opt.get();
  if (!Objects.equals(req_coords, header.coordinateSystem())) {
   error_accum =
    error_accum.append(errorWrongCoordinateSystem(
     req_coords,
     header.coordinateSystem()));
  }
 }
 return error_accum;
}

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.validation.api

private static List<SMFErrorType> checkComponentSize(
 final List<SMFErrorType> errors,
 final SMFAttributeName name,
 final SMFSchemaAttribute attr_schema,
 final SMFAttribute attr)
{
 final OptionalInt req_size_opt = attr_schema.requiredComponentSize();
 if (req_size_opt.isPresent()) {
  final int req_size = req_size_opt.getAsInt();
  if (attr.componentSizeBits() != req_size) {
   return errors.append(errorWrongComponentSize(
    name,
    req_size,
    attr.componentSizeBits()));
  }
 }
 return errors;
}

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.validation.api

private static List<SMFErrorType> checkComponentCount(
 final List<SMFErrorType> errors,
 final SMFAttributeName name,
 final SMFSchemaAttribute attr_schema,
 final SMFAttribute attr)
{
 final OptionalInt req_count_opt = attr_schema.requiredComponentCount();
 if (req_count_opt.isPresent()) {
  final int req_count = req_count_opt.getAsInt();
  if (attr.componentCount() != req_count) {
   return errors.append(errorWrongComponentCount(
    name,
    req_count,
    attr.componentCount()));
  }
 }
 return errors;
}

代码示例来源:origin: dswarm/dswarm

javaslang.collection.List currentAttributes = currentAttributePath.append(currentAttribute);

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.validation.api

private static List<SMFErrorType> checkComponentType(
 final List<SMFErrorType> errors,
 final SMFAttributeName name,
 final SMFSchemaAttribute attr_schema,
 final SMFAttribute attr)
{
 final Optional<SMFComponentType> req_type_opt =
  attr_schema.requiredComponentType();
 if (req_type_opt.isPresent()) {
  final SMFComponentType req_type = req_type_opt.get();
  if (attr.componentType() != req_type) {
   return errors.append(errorWrongComponentType(
    name,
    req_type,
    attr.componentType()));
  }
 }
 return errors;
}

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.validation.api

private static List<SMFErrorType> checkVerticesAndTriangles(
 final SMFHeader header,
 final SMFSchema schema,
 final List<SMFErrorType> errors)
{
 List<SMFErrorType> error_accum = errors;
 if (schema.requireTriangles() == SMF_TRIANGLES_REQUIRED) {
  if (header.triangles().triangleCount() == 0L) {
   error_accum = error_accum.append(errorTrianglesRequiredButEmpty());
  }
 }
 if (schema.requireVertices() == SMF_VERTICES_REQUIRED) {
  if (header.vertexCount() == 0L) {
   error_accum = error_accum.append(errorVerticesRequiredButEmpty());
  }
 }
 return error_accum;
}

代码示例来源:origin: com.io7m.smfj/io7m-smfj-format-text

this.attributes_list = this.attributes_list.append(attr);
} catch (final IllegalArgumentException e) {
 super.failExpectedGot(

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.validation.api

@Override
public Validation<List<SMFErrorType>, SMFHeader> validate(
 final SMFHeader header,
 final SMFSchema schema)
{
 NullCheck.notNull(header, "Header");
 NullCheck.notNull(schema, "Schema");
 List<SMFErrorType> errors = List.empty();
 final Optional<SMFSchemaIdentifier> file_id_opt = header.schemaIdentifier();
 if (file_id_opt.isPresent()) {
  final SMFSchemaIdentifier file_id = file_id_opt.get();
  final SMFSchemaIdentifier schema_id = schema.schemaIdentifier();
  if (!Objects.equals(schema_id, file_id)) {
   errors = errors.append(errorWrongSchemaID(schema_id, file_id));
  }
 }
 errors = checkVerticesAndTriangles(header, schema, errors);
 errors = checkAttributes(header, schema, errors);
 errors = checkCoordinateSystem(header, schema, errors);
 if (errors.isEmpty()) {
  return valid(header);
 }
 return invalid(errors);
}

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.validation.main

errors = errors.append(
 SMFParseError.of(
  this.reader.position(),
 return invalid(errors.append(SMFParseError.of(
  this.reader.position(),
  "Must specify a schema identifier",

代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.processing.main

errors = errors.append(nonexistentVertex(index, v0));
errors = errors.append(nonexistentVertex(index, v1));
errors = errors.append(nonexistentVertex(index, v2));

相关文章