@Test public void testGetChunks() { final ChunkContainer container = createFilledChunk(); final Collection<Chunk> chunks = container.getChunks(); final Set<GUID> known = new HashSet<GUID>(Arrays .asList(GUID.KNOWN_GUIDS)); for (Chunk curr : chunks) { known.remove(curr.getGuid()); } Assert.assertTrue(known.isEmpty()); }
public Collection<Chunk> getChunks() { final List<Chunk> result = new ArrayList<Chunk>(); for (final List<Chunk> curr : this.chunkTable.values()) { result.addAll(curr); } return result; }
ChunkContainer extends Chunk { public Collection<Chunk> getChunks() { final List<Chunk> result = new ArrayList<Chunk>(); for (final List<Chunk> curr : this.chunkTable.values()) { result.addAll(curr); } return result; } }
ChunkContainer extends Chunk { public Collection<Chunk> getChunks() { final List<Chunk> result = new ArrayList<Chunk>(); for (final List<Chunk> curr : this.chunkTable.values()) { result.addAll(curr); } return result; } ChunkContainer(final GUID chunkGUID, final long pos, final BigInteger length); }
ChunkContainer extends Chunk { public Collection<Chunk> getChunks() { final List<Chunk> result = new ArrayList<Chunk>(); for (final List<Chunk> curr : this.chunkTable.values()) { result.addAll(curr); } return result; } ChunkContainer(final GUID chunkGUID, final long pos, final BigInteger length); void addChunk(final Chunk toAdd); Collection<Chunk> getChunks(); boolean hasChunkByGUID(final GUID lookFor); @Override String prettyPrint(final String prefix); String prettyPrint(final String prefix, final String containerInfo); }
ChunkContainer extends Chunk { public Collection<Chunk> getChunks() { final List<Chunk> result = new ArrayList<Chunk>(); for (final List<Chunk> curr : this.chunkTable.values()) { result.addAll(curr); } return result; } ChunkContainer(final GUID chunkGUID, final long pos, final BigInteger length); void addChunk(final Chunk toAdd); Collection<Chunk> getChunks(); boolean hasChunkByGUID(final GUID lookFor); @Override String prettyPrint(final String prefix); String prettyPrint(final String prefix, final String containerInfo);  }