class FlowDiff implements Comparable<FlowDiff> {

  public static SortedSet<FlowDiff> flowDiffs(@Nullable Flow flow1, @Nullable Flow flow2) {
    if (flow1 == null || flow2 == null || flow1.equals(flow2)) {
      return ImmutableSortedSet.of();
    }

    checkArgument(
        flow1
            .toBuilder()
            .setDstIp(flow2.getDstIp())
            .setSrcIp(flow2.getSrcIp())
            .setDstPort(flow2.getDstPort())
            .setSrcPort(flow2.getSrcPort())
            .build()
            .equals(flow2),
        "flowDiff only supports differences of src/dst Ip and src/dst Port");

    return getFlowDiffs(
        flow1.getSrcIp(),
        flow1.getDstIp(),
        flow1.getSrcPort(),
        flow1.getDstPort(),
        flow2.getSrcIp(),
        flow2.getDstIp(),
        flow2.getSrcPort(),
        flow2.getDstPort());
  }

  @VisibleForTesting  FlowDiff(String fieldName, String oldValue, String newValue);

}