class PDRadioButton extends PDButton
{
    /**
     * A Ff flag.
     */
    private static final int FLAG_NO_TOGGLE_TO_OFF = 1 << 14;
    
    /**
     * @see PDField#PDField(PDAcroForm)
     *
     * @param acroForm The acroform.
     */
    public PDRadioButton(PDAcroForm acroForm)
    {
        super(acroForm);
        getCOSObject().setFlag(COSName.FF, FLAG_RADIO, true);
    }
    
    /**
     * Constructor.
     * 
     * @param acroForm The form that this field is part of.
     * @param field the PDF object to represent as a field.
     * @param parent the parent node of the node
     */
    PDRadioButton(PDAcroForm acroForm, COSDictionary field, PDNonTerminalField parent)
    {
        super(acroForm, field, parent);
    }

    /**
     * From the PDF Spec <br>
     * If set, a group of radio buttons within a radio button field that use the same value for the on state will turn
     * on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually
     * exclusive (the same behavior as HTML radio buttons).
     *
     * @param radiosInUnison The new flag for radiosInUnison.
     */
    public void setRadiosInUnison(boolean radiosInUnison)
    {
        getCOSObject().setFlag(COSName.FF, FLAG_RADIOS_IN_UNISON, radiosInUnison);
    }

    /**
     *
     * @return true If the flag is set for radios in unison.
     */
    public boolean isRadiosInUnison()
    {
        return getCOSObject().getFlag(COSName.FF, FLAG_RADIOS_IN_UNISON);
    }

    /**
     * This will get the selected index.
     * <p>
     * A RadioButton might have multiple same value options which are not selected jointly if
     * they are not set in unison {@link #isRadiosInUnison()}.</p>
     * 
     * <p>
     * The method will return the first selected index or -1 if no option is selected.</p>
     * 
     * @return the first selected index or -1.
     */
    public int getSelectedIndex()
    {
        int idx = 0;
        for (PDAnnotationWidget widget : getWidgets())
        {
            if (!COSName.Off.equals(widget.getAppearanceState()))
            {
                return idx;
            }
            idx ++;
        }
        return -1;
    }

    /**
     * This will get the selected export values.
     * <p>
     * A RadioButton might have an export value to allow field values
     * which can not be encoded as PDFDocEncoding or for the same export value 
     * being assigned to multiple RadioButtons in a group.<br>
     * To define an export value the RadioButton must define options {@link #setExportValues(List)}
     * which correspond to the individual items within the RadioButton.</p>
     * <p>
     * The method will either return the corresponding values from the options entry or in case there
     * is no such entry the fields value</p>
     * 
     * @return the export value of the field.
     */
    public List<String> getSelectedExportValues()
    {<FILL_FUNCTION_BODY>}
}

        List<String> exportValues = getExportValues();
        List<String> selectedExportValues = new ArrayList<>();
        if (exportValues.isEmpty())
        {
            selectedExportValues.add(getValue());
            return selectedExportValues;
        }
        else
        {
            String fieldValue = getValue();
            int idx = 0;
            for (String onValue : getOnValues())
            {
                if (onValue.compareTo(fieldValue) == 0)
                {
                    selectedExportValues.add(exportValues.get(idx));
                }
                ++idx;
            }
            return selectedExportValues;
        }
    
<methods>public java.lang.String getDefaultValue() ,public List<java.lang.String> getExportValues() ,public Set<java.lang.String> getOnValues() ,public java.lang.String getValue() ,public java.lang.String getValueAsString() ,public boolean isPushButton() ,public boolean isRadioButton() ,public void setDefaultValue(java.lang.String) ,public void setExportValues(List<java.lang.String>) ,public void setValue(java.lang.String) throws java.io.IOException,public void setValue(int) throws java.io.IOException<variables>static final int FLAG_PUSHBUTTON,static final int FLAG_RADIO,static final int FLAG_RADIOS_IN_UNISON