/** * Create an empty $sequenceClassname. This method is intended to avoid disambiguation for the * newInstance() with variable list of blocks or tags * * @since 7.6 */ public static SequenceB1 newInstance() { final SequenceB1 result = new SequenceB1(); result.addTag(START_TAG); result.addTag(END_TAG); return result; }
/** * Create a new instance of $sequenceClassname and add the contents of all sequences given * inside. Mainly intended to create a sequence by adding subsequences * * @since 7.6 */ public static SequenceB1 newInstance(final SwiftTagListBlock... sequences) { final SequenceB1 result = new SequenceB1(); result.addTag(START_TAG); if (sequences != null && sequences.length > 0) { for (final SwiftTagListBlock s : sequences) { result.addTags(s.getTags()); } } result.addTag(END_TAG); return result; }
/** * Creates a new instance of this sequence with the given tags inside. * * @param tags may be null, an empty sequence containing only start and end sequence tags will * be returned */ @SequenceStyle(Type.GENERATED_16RS) public static SequenceB1 newInstance(final Tag... tags) { final SequenceB1 result = new SequenceB1(); result.addTag(START_TAG); if (tags != null && tags.length > 0) { for (final Tag t : tags) { result.addTag(t); } } result.addTag(END_TAG); return result; }