package greenfoot.importer.scratch;

import java.util.ArrayList;


| Represents a reference to a real ScratchObject | | This class is used when first loading from the store file, but after resolve | is called, a real (non-reference) ScratchObject will be returned, and thus | all instances of ScratchObjectReference will disappear from view. | | @author neil | class ScratchObjectReference extends ScratchObject{ private int index; public ScratchObjectReference(int i) { index = i; } public ScratchObject resolve(ArrayList<ScratchObject> objects) { return objects.get(index - 1); } public String toString() { return "{#" + index + "}"; } }

.   - ScratchObjectReference
.   ScratchObjectReference
.   resolve
.   toString




28 neLoCode + 5 LoComm