private boolean objectsAreEqual(SMPLContainer e1, SMPLContainer e2) {

        if (!e1.getType().equals(e2.getType())) {
            return false;
        } else {
            if ("Vector".equals(e1.getType())) {
                SMPLVector v1 = (SMPLVector) e1.getValue();
                SMPLVector v2 = (SMPLVector) e2.getValue();

                if (getVectorSize(v1) != getVectorSize(v2)) {
                    return false;
                }

                ArrayList<SMPLContainer> fv1 = flatten(v1);
                ArrayList<SMPLContainer> fv2 = flatten(v2);

                for (int i = 0; i < fv1.size(); i++) {
                    if (!objectsAreEqual(fv1.get(i), fv2.get(i))) {
                        return false;
                    }
                }

                return true;
            } else if ("Boolean".equals(e1.getType())) {
                SMPLBoolean b1 = (SMPLBoolean) e1.getValue();
                SMPLBoolean b2 = (SMPLBoolean) e2.getValue();

                return b1.isValue() == b2.isValue();
            } else if ("Float".equals(e1.getType())) {
                SMPLFloat f1 = (SMPLFloat) e1.getValue();
                SMPLFloat f2 = (SMPLFloat) e2.getValue();

                return f1.getValue() == f2.getValue();
            } else if ("Integer".equals(e1.getType())) {
                SMPLInt i1 = (SMPLInt) e1.getValue();
                SMPLInt i2 = (SMPLInt) e2.getValue();

                return i1.getValue() == i2.getValue();
            } else if ("String".equals(e1.getType())) {
                SMPLString s1 = (SMPLString) e1.getValue();
                SMPLString s2 = (SMPLString) e2.getValue();

                return s1.toString().equals(s2.toString());
            }

            return false;
        }
    }