Skip to content

Commit

Permalink
#28 Adapt Chronograph for Passage Operator
Browse files Browse the repository at this point in the history
Remove BrickContainer

Signed-off-by: Alexander Fedorov <[email protected]>
  • Loading branch information
ruspl-afed committed May 17, 2020
1 parent 651c9fe commit 889a69b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 61 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* The Group describes typed container with sequence Brick items
*
*/
public interface Group<D> extends BrickContainer<D>, GroupContainer<D> {
public interface Group<D> extends GroupContainer<D> {

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* The Section describes typed container with sequence of Group and Brick items
*
*/
public interface Section<D> extends GroupContainer<D>, BrickContainer<D> {
public interface Section<D> extends GroupContainer<D> {

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
*******************************************************************************/
package org.eclipse.chronograph.internal.base;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.chronograph.internal.api.graphics.Brick;
import org.eclipse.chronograph.internal.api.graphics.Group;
import org.eclipse.chronograph.internal.api.graphics.GroupContainer;

Expand All @@ -29,36 +27,17 @@ public class GroupImpl<D> implements Group<D> {

private final String id;
private final GroupContainer<D> parent;
private final List<Brick<D>> bricks;

public GroupImpl(String id, GroupContainer<D> parent) {
this.id = id;
this.parent = parent;
this.bricks = new ArrayList<>();
}

public GroupImpl(String id, List<Brick<D>> bricks) {
this.id = id;
this.parent = null;
this.bricks = bricks;
}

public GroupImpl(String id, GroupContainer<D> parent, List<Brick<D>> bricks) {
this.id = id;
this.parent = parent;
this.bricks = bricks;
}

@Override
public String id() {
return id;
}

@Override
public List<? extends Brick<D>> bricks() {
return bricks;
}

@Override
public GroupContainer<D> container() {
return parent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import java.util.ArrayList;
import java.util.List;

import org.eclipse.chronograph.internal.api.graphics.Brick;
import org.eclipse.chronograph.internal.api.graphics.Group;
import org.eclipse.chronograph.internal.api.graphics.Section;

Expand Down Expand Up @@ -50,12 +49,4 @@ public List<Group<D>> groups() {
return groups;
}

@Override
public List<Brick<D>> bricks() {
List<Brick<D>> bricks = new ArrayList<>();
for (Group<D> gr : groups) {
bricks.addAll(gr.bricks());
}
return bricks;
}
}

0 comments on commit 889a69b

Please sign in to comment.