private AttributeDefinitionSpecification[] getADs(boolean isRequired) {
        AttributeDefinitionSpecification[] retVal = null;
        Vector<AttributeDefinitionSpecification> vector = new Vector<AttributeDefinitionSpecification>();
        for (Map.Entry<String, AttributeDefinitionSpecification> entry : attributes.entrySet()) {
            AttributeDefinitionSpecification ad = entry.getValue();
            if (isRequired == ad.isRequired()) {
                vector.add(ad);
            }
        }
        retVal = new AttributeDefinitionSpecification[vector.size()];
        vector.toArray(retVal);
        return retVal;
    }
private AttributeDefinitionSpecification [ ] getADs ( boolean isRequired ) { AttributeDefinitionSpecification [ ] retVal = null ; Vector < AttributeDefinitionSpecification > vector = new Vector < AttributeDefinitionSpecification > ( ) ; for ( Map . Entry < String , AttributeDefinitionSpecification > entry : attributes . entrySet ( ) ) { AttributeDefinitionSpecification ad = entry . getValue ( ) ; if ( isRequired == ad . isRequired ( ) ) { vector . add ( ad ) ; } } retVal = new AttributeDefinitionSpecification [ vector . size ( ) ] ; vector . toArray ( retVal ) ; return retVal ; }
Helper method to filter between required and optional ADs

@param isRequired
@return