@Test public void testCopy() { final Relation source = new Relation( new Id(RELATION_ID), new Description(DESCRIPTION), BuiltInType.BOOLEAN.asQName(), new ArrayList<>(), new ArrayList<>() ); final Relation target = source.copy(); assertNotNull(target); assertNotEquals(RELATION_ID, target.getId()); assertEquals(DESCRIPTION, target.getDescription().getValue()); assertEquals(BuiltInType.BOOLEAN.asQName(), target.getTypeRef()); assertTrue(target.getColumn().isEmpty()); assertTrue(target.getRow().isEmpty()); }
@Override public Relation copy() { final Relation clonedRelation = new Relation(); clonedRelation.description = Optional.ofNullable(description).map(Description::copy).orElse(null); clonedRelation.typeRef = Optional.ofNullable(typeRef).map(QName::copy).orElse(null); clonedRelation.componentWidths = new ArrayList<>(componentWidths); clonedRelation.column = column.stream().map(InformationItem::copy).collect(Collectors.toList()); clonedRelation.row = row.stream().map(List::copy).collect(Collectors.toList()); return clonedRelation; }
Relation extends Expression { @Override public Relation copy() { final Relation clonedRelation = new Relation(); clonedRelation.description = Optional.ofNullable(description).map(Description::copy).orElse(null); clonedRelation.typeRef = Optional.ofNullable(typeRef).map(QName::copy).orElse(null); clonedRelation.componentWidths = new ArrayList<>(componentWidths); clonedRelation.column = column.stream().map(InformationItem::copy).collect(Collectors.toList()); clonedRelation.row = row.stream().map(List::copy).collect(Collectors.toList()); return clonedRelation; } }
Relation extends Expression { @Override public Relation copy() { final Relation clonedRelation = new Relation(); clonedRelation.description = Optional.ofNullable(description).map(Description::copy).orElse(null); clonedRelation.typeRef = Optional.ofNullable(typeRef).map(QName::copy).orElse(null); clonedRelation.componentWidths = new ArrayList<>(componentWidths); clonedRelation.column = column.stream().map(InformationItem::copy).collect(Collectors.toList()); clonedRelation.row = row.stream().map(List::copy).collect(Collectors.toList()); return clonedRelation; } Relation();  Relation(final Id id,
                    final Description description,
                    final QName typeRef,
                    final java.util.List<InformationItem> column,
                    final java.util.List<List> row); }
Relation extends Expression { @Override public Relation copy() { final Relation clonedRelation = new Relation(); clonedRelation.description = Optional.ofNullable(description).map(Description::copy).orElse(null); clonedRelation.typeRef = Optional.ofNullable(typeRef).map(QName::copy).orElse(null); clonedRelation.componentWidths = new ArrayList<>(componentWidths); clonedRelation.column = column.stream().map(InformationItem::copy).collect(Collectors.toList()); clonedRelation.row = row.stream().map(List::copy).collect(Collectors.toList()); return clonedRelation; } Relation();  Relation(final Id id,
                    final Description description,
                    final QName typeRef,
                    final java.util.List<InformationItem> column,
                    final java.util.List<List> row); @Override Relation copy(); java.util.List<InformationItem> getColumn(); java.util.List<List> getRow(); @Override java.util.List<HasTypeRef> getHasTypeRefs(); @Override int getRequiredComponentWidthCount(); @Override boolean equals(final Object o); @Override int hashCode(); }
Relation extends Expression { @Override public Relation copy() { final Relation clonedRelation = new Relation(); clonedRelation.description = Optional.ofNullable(description).map(Description::copy).orElse(null); clonedRelation.typeRef = Optional.ofNullable(typeRef).map(QName::copy).orElse(null); clonedRelation.componentWidths = new ArrayList<>(componentWidths); clonedRelation.column = column.stream().map(InformationItem::copy).collect(Collectors.toList()); clonedRelation.row = row.stream().map(List::copy).collect(Collectors.toList()); return clonedRelation; } Relation();  Relation(final Id id,
                    final Description description,
                    final QName typeRef,
                    final java.util.List<InformationItem> column,
                    final java.util.List<List> row); @Override Relation copy(); java.util.List<InformationItem> getColumn(); java.util.List<List> getRow(); @Override java.util.List<HasTypeRef> getHasTypeRefs(); @Override int getRequiredComponentWidthCount(); @Override boolean equals(final Object o); @Override int hashCode(); static final int STATIC_COLUMNS; }