src/main/java/org/tinyradius/dictionary/MemoryDictionary.java
@Override
    public void addAttributeType(AttributeType attributeType) {
        if (attributeType == null) {
            throw new IllegalArgumentException("attribute type must not be null");
        }

        Integer vendorId = attributeType.getVendorId();
        Integer typeCode = attributeType.getTypeCode();
        String attributeName = attributeType.getName();

        if (attributesByName.containsKey(attributeName)) {
            throw new IllegalArgumentException("duplicate attribute name: " + attributeName);
        }

        Map<Integer, AttributeType> vendorAttributes = attributesByCode.computeIfAbsent(vendorId, k -> new HashMap<>());

        if (vendorAttributes.containsKey(typeCode)) {
            throw new IllegalArgumentException("duplicate type code: " + typeCode);
        }

        attributesByName.put(attributeName, attributeType);
        vendorAttributes.put(typeCode, attributeType);
    }
/**
     * Adds an AttributeType object to the cache.
     *
     * @param attributeType AttributeType object
     * @throws IllegalArgumentException duplicate attribute name/type code
     */
Adds an AttributeType object to the cache.

@param attributeType AttributeType object
@throws IllegalArgumentException duplicate attribute name/type code
Adds an AttributeType object to the cache . @param attributeType AttributeType object @throws IllegalArgumentException duplicate attribute name / type code
@Override
    public void addAttributeType(AttributeType attributeType) {
        if (attributeType == null) {
            throw new IllegalArgumentException("attribute type must not be null");
        }
        Integer vendorId = attributeType.getVendorId();
        Integer typeCode = attributeType.getTypeCode();
        String attributeName = attributeType.getName();
        if (attributesByName.containsKey(attributeName)) {
            throw new IllegalArgumentException("duplicate attribute name: " + attributeName);
        }
        Map<Integer, AttributeType> vendorAttributes = attributesByCode.computeIfAbsent(vendorId, k -> new HashMap<>());
        if (vendorAttributes.containsKey(typeCode)) {
            throw new IllegalArgumentException("duplicate type code: " + typeCode);
        }
        attributesByName.put(attributeName, attributeType);
        vendorAttributes.put(typeCode, attributeType);
    }
@ Override public void addAttributeType ( AttributeType attributeType ) { if ( attributeType == null ) { throw new IllegalArgumentException ( "attribute type must not be null" ) ; } Integer vendorId = attributeType . getVendorId ( ) ; Integer typeCode = attributeType . getTypeCode ( ) ; String attributeName = attributeType . getName ( ) ; if ( attributesByName . containsKey ( attributeName ) ) { throw new IllegalArgumentException ( "duplicate attribute name: " + attributeName ) ; } Map < Integer , AttributeType > vendorAttributes = attributesByCode . computeIfAbsent ( vendorId , k -> new HashMap < > ( ) ) ; if ( vendorAttributes . containsKey ( typeCode ) ) { throw new IllegalArgumentException ( "duplicate type code: " + typeCode ) ; } attributesByName . put ( attributeName , attributeType ) ; vendorAttributes . put ( typeCode , attributeType ) ; }
Adds an AttributeType object to the cache.
Adds an AttributeType object to the cache .