//2012-03-16 johnpfeiffer INCOMPLETE requires Block
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.ListIterator;
class Resource
{
private static String uuid;
private static ArrayList <Block> blocks;
Resource( String id )
{
if( !id.isEmpty() )
{
this.uuid = id;
blocks = new ArrayList();
}else
{ throw new IllegalArgumentException( "Must have an identifier" );
}
}
String getId()
{ return uuid;
}
void addBlock( Block b )
{ blocks.add( b );
}
void displayBlocks( PrintWriter out )
{
ListIterator <Block> it = blocks.listIterator() ;
while ( it.hasNext() )
{
Block temp = it.next();
out.println( temp.getId() );
}
}
int getBlockCount()
{ return blocks.size();
}
}