package com.nedap.archie.aom;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by pieter.bos on 15/10/15.
 */
public class CAttributeTuple extends CSecondOrder<CAttribute> {

    private List<CPrimitiveTuple> tuples = new ArrayList<>();

    public List<CPrimitiveTuple> getTuples() {
        return tuples;
    }

    public void setTuples(List<CPrimitiveTuple> tuples) {
        this.tuples = tuples;
    }

    public void addTuple(CPrimitiveTuple tuple) {
        this.tuples.add(tuple);
    }
}

@@ -509,11 +509,824 @@
 );%0A    %7D
+%0A%0A    public CAttribute getMember(String attributeName) %7B%0A        for(CAttribute member:getMembers()) %7B%0A            if(member.getRmAttributeName().equals(attributeName)) %7B%0A                return member;%0A            %7D%0A        %7D%0A        return null;%0A    %7D%0A%0A    /**%0A     * Get the index of the tuple with the given named attribute. For example, %22%5Bmagnitude, units%5D matches %7B%0A     %5B%7B%7C0.0..1000.0%7C%7D, %7B%22cm%22%7D%5D,%22 .getMemberIndex(%22magnitude%22) returns 0. getMemberIndex(%22units%22) returns 1%0A     * @param attributeName%0A     * @return%0A     */%0A    public Integer getMemberIndex(String attributeName) %7B%0A        int i =0;%0A        for(CAttribute member:getMembers()) %7B%0A            if(member.getRmAttributeName().equals(attributeName)) %7B%0A                return 0;%0A            %7D%0A            i++;%0A        %7D%0A        return null;%0A    %7D
 %0A%7D%0A

Add tuple convenience methods