public void addDimension ( Dimension dim ) { if ( immutable ) throw new IllegalStateException ( "Cant modify" ) ; if ( ! dim . isShared ( ) ) { throw new IllegalArgumentException ( "Dimensions added to a group must be shared." ) ; } if ( findDimensionLocal ( dim . getShortName ( ) ) != null ) throw new IllegalArgumentException ( "Dimension name (" + dim . getShortName ( ) + ") must be unique within Group " + getShortName ( ) ) ; dimensions . add ( dim ) ; dim . setGroup ( this ) ; }
Adds the specified shared dimension to this group .