package de.ivu.elect.jee.memory;

import java.io.Serializable;

public class MemoryGcData implements Serializable, Comparable<MemoryGcData> {

  private static final long serialVersionUID = 1L;

  private final long zeitpunkt;

  private final MemoryData memoryData;

  private final GcData gcData;

  public MemoryGcData(long zeitpunkt, MemoryData memoryData, GcData gcData) {
    this.zeitpunkt = zeitpunkt;
    this.memoryData = memoryData;
    this.gcData = gcData;
  }

  public long getZeitpunkt() {
    return zeitpunkt;
  }

  public MemoryData getMemoryData() {
    return memoryData;
  }

  public GcData getGcData() {
    return gcData;
  }

  @Override
  public int compareTo(MemoryGcData o) {
    return Long.compare(zeitpunkt, o.zeitpunkt);
  }

  @Override
  public String toString() {
    return "MemoryGcData{" +
        "zeitpunkt=" + zeitpunkt +
        ", memoryData=" + memoryData +
        ", gcData=" + gcData +
        '}';
  }
}
