/** * Static construction of Meta with some errors. * * @param errors A non-null list of {@link BulletError} objects. * @return The Meta object with the errors. */ public static Meta of(List<BulletError> errors) { Meta meta = new Meta(); meta.addErrors(errors); return meta; }
/** * Makes this into a {@link Meta} object. * * @return A meta object containing this error. */ public Meta makeMeta() { return new Meta().addErrors(Collections.singletonList(this)); } }
/** * Static construction of Meta with some errors. * * @param errors A non-null {@link List} of {@link BulletError} objects. * @return The Meta object with the errors. */ public static Meta of(BulletError... errors) { Meta meta = new Meta(); meta.addErrors(asList(errors)); return meta; }