class FlowDiff implements Comparable<FlowDiff> {

  public static SortedSet<FlowDiff> returnFlowDiffs(
      @Nullable Flow origForwardFlow, @Nullable Flow transformedForwardFlow) {
    if (origForwardFlow == null
        || transformedForwardFlow == null
        || origForwardFlow.equals(transformedForwardFlow)) {
      return ImmutableSortedSet.of();
    }
    checkArgument(
        origForwardFlow
            .toBuilder()
            .setDstIp(transformedForwardFlow.getDstIp())
            .setSrcIp(transformedForwardFlow.getSrcIp())
            .setDstPort(transformedForwardFlow.getDstPort())
            .setSrcPort(transformedForwardFlow.getSrcPort())
            .build()
            .equals(transformedForwardFlow),
        "returnFlowDiffs only supports differences of src/dst Ip and src/dst Port");
    return getFlowDiffs(
        transformedForwardFlow.getDstIp(),
        transformedForwardFlow.getSrcIp(),
        transformedForwardFlow.getDstPort(),
        transformedForwardFlow.getSrcPort(),
        origForwardFlow.getDstIp(),
        origForwardFlow.getSrcIp(),
        origForwardFlow.getDstPort(),
        origForwardFlow.getSrcPort());
  }

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

}