package com.iformall.domain.vo.invest;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.CompareToBuilder;

import java.io.Serializable;

@EqualsAndHashCode
@Data
@AllArgsConstructor
public class TableTriple<K,L,R> implements Comparable<TableTriple<K,L,R>>, Serializable {
	private K column;
	private L before ;
	private R after ;

	@Override
	public int compareTo(TableTriple<K, L, R> other) {
		return new CompareToBuilder().append(getColumn(), other.getColumn())
				.append(getBefore(), other.getBefore())
				.append(getAfter(), other.getAfter()).toComparison();
	}
}
