protected ResourceInst(StatArchiveFile archive, int uniqueId, String name, long id, ResourceType type, boolean loaded) { this.loaded = loaded; this.archive = archive; // this.uniqueId = uniqueId; this.name = name; this.id = id; Assert.assertTrue(type != null); this.type = type; if (loaded) { StatDescriptor[] stats = type.getStats(); this.values = new SimpleValue[stats.length]; for (int i=0; i < stats.length; i++) { if (archive.loadStat(stats[i], this)) { this.values[i] = new SimpleValue(this, stats[i]); } else { this.values[i] = null; } } } else { this.values = null; } }
protected ResourceInst(StatArchiveFile archive, int uniqueId, String name, long id, ResourceType type, boolean loaded) { this.loaded = loaded; this.archive = archive; // this.uniqueId = uniqueId; this.name = name; this.id = id; Assert.assertTrue(type != null); this.type = type; if (loaded) { StatDescriptor[] stats = type.getStats(); this.values = new SimpleValue[stats.length]; for (int i=0; i < stats.length; i++) { if (archive.loadStat(stats[i], this)) { this.values[i] = new SimpleValue(this, stats[i]); } else { this.values[i] = null; } } } else { this.values = null; } }
public StatValue createTrimmed(long startTime, long endTime) { if (startTime == this.startTime && endTime == this.endTime) { return this; } else { return new SimpleValue(this, startTime, endTime); } }
public StatValue createTrimmed(long startTime, long endTime) { if (startTime == this.startTime && endTime == this.endTime) { return this; } else { return new SimpleValue(this, startTime, endTime); } }