package lemming.context.inbound;

import lemming.context.BaseContext;
import lemming.context.Context;

/**
 * A triple of context, inbound context, and the distance between them.
 */
public class Triple {
    /**
     * Context.
     */
    private Context context;

    /**
     * Context index.
     */
    private InboundContext inboundContext;

    /**
     * Index of context.
     */
    private Integer contextIndex;

    /**
     * Index of inbound context.
     */
    private Integer inboundContextIndex;

    /**
     * Distance between context and inbound.
     */
    private Integer distance;

    /**
     * Creates a triple.
     *
     * @param context      context
     * @param contextIndex index of context
     * @param distance      distance between context and inbound context
     * @param inboundContext      inbound context
     * @param inboundContextIndex index of inbound context
     * @see MatchHelper
     */
    public Triple(Context context, Integer contextIndex, Integer distance,
                  InboundContext inboundContext, Integer inboundContextIndex) {
        this.context = context;
        this.contextIndex = contextIndex;
        this.distance = distance;
        this.inboundContext = inboundContext;
        this.inboundContextIndex = inboundContextIndex;
    }

    /**
     * Returns a context.
     *
     * @return A context.
     */
    public BaseContext getContext() {
        return context;
    }

    /**
     * Returns an inbound context.
     *
     * @return An inbound  context.
     */
    public BaseContext getInboundContext() {
        return inboundContext;
    }

    /**
     * Returns index of contex.
     *
     * @return A context index.
     */
    public Integer getContextIndex() {
        return contextIndex;
    }

    /**
     * Returns index of inbound context.
     *
     * @return An inbound context index.
     */
    public Integer getInboundContextIndex() {
        return inboundContextIndex;
    }

    /**
     * Returns the distance between context and inbound context.
     *
     * @return A distance as integer.
     */
    public Integer getDistance() {
        return distance;
    }
}

@@ -50,20 +50,16 @@
 context.
-Base
 Context;
@@ -63,38 +63,36 @@
 xt;%0A
+%0A
 import 
-lemming.context.Context
+java.io.Serializable
 ;%0A%0A/
@@ -190,16 +190,40 @@
  Triple 
+implements Serializable 
 %7B%0A    /*
@@ -1402,36 +1402,32 @@
   */%0A    public 
-Base
 Context getConte
@@ -1573,12 +1573,15 @@
 lic 
-Base
+Inbound
 Cont

Make class Triple serializable. Change return types of some getters.