@Test public void testToLinkTypes() { List<String> in = Arrays.asList("@WIRING 0", "{", "# max_buffer_size", "491", "}"); LinkTypes<Link> linkTypes = new ReaderTGFF().toLinkTypes(in); Assert.assertEquals(1, linkTypes.size()); Assert.assertTrue(linkTypes.containsKey(ReaderTGFF.WIRE)); Assert.assertNotNull(linkTypes.get(ReaderTGFF.WIRE).getAttribute("max_buffer_size")); }
protected LinkTypes<Link> toLinkTypes(List<String> in) { LinkTypes<Link> linkTypes = new LinkTypes<Link>(); Iterator<String> it = in.iterator(); String currentLine; while (it.hasNext()) { currentLine = it.next(); if (currentLine.contains(WIRE)) { importLink(it, linkTypes); } } return linkTypes; }
ReaderTGFF { protected LinkTypes<Link> toLinkTypes(List<String> in) { LinkTypes<Link> linkTypes = new LinkTypes<Link>(); Iterator<String> it = in.iterator(); String currentLine; while (it.hasNext()) { currentLine = it.next(); if (currentLine.contains(WIRE)) { importLink(it, linkTypes); } } return linkTypes; } }
ReaderTGFF { protected LinkTypes<Link> toLinkTypes(List<String> in) { LinkTypes<Link> linkTypes = new LinkTypes<Link>(); Iterator<String> it = in.iterator(); String currentLine; while (it.hasNext()) { currentLine = it.next(); if (currentLine.contains(WIRE)) { importLink(it, linkTypes); } } return linkTypes; }  }
ReaderTGFF { protected LinkTypes<Link> toLinkTypes(List<String> in) { LinkTypes<Link> linkTypes = new LinkTypes<Link>(); Iterator<String> it = in.iterator(); String currentLine; while (it.hasNext()) { currentLine = it.next(); if (currentLine.contains(WIRE)) { importLink(it, linkTypes); } } return linkTypes; }  SpecificationTypeBased read(String filename); SpecificationTypeBased read(File file); SpecificationTypeBased read(InputStream in); SpecificationTypeBased toSpecification(List<String> in); }
ReaderTGFF { protected LinkTypes<Link> toLinkTypes(List<String> in) { LinkTypes<Link> linkTypes = new LinkTypes<Link>(); Iterator<String> it = in.iterator(); String currentLine; while (it.hasNext()) { currentLine = it.next(); if (currentLine.contains(WIRE)) { importLink(it, linkTypes); } } return linkTypes; }  SpecificationTypeBased read(String filename); SpecificationTypeBased read(File file); SpecificationTypeBased read(InputStream in); SpecificationTypeBased toSpecification(List<String> in); static final String TGFF_TYPE; static final String PERIOD; static final String MSG_SIZE; static final String RES_ATTRIBUTES; static final String RES_VALUES; static final String HARD_DEADLINE; static final String SOFT_DEADLINE; static final String WIRE; }