private void processElementUniform ( GeneratorSingleCluster cluster , Node cur ) { double min = 0.0 ; double max = 1.0 ; String minstr = ( ( Element ) cur ) . getAttribute ( ATTR_MIN ) ; if ( minstr != null && minstr . length ( ) > 0 ) { min = ParseUtil . parseDouble ( minstr ) ; } String maxstr = ( ( Element ) cur ) . getAttribute ( ATTR_MAX ) ; if ( maxstr != null && maxstr . length ( ) > 0 ) { max = ParseUtil . parseDouble ( maxstr ) ; } // *** new uniform generator Random random = cluster . getNewRandomGenerator ( ) ; Distribution generator = new UniformDistribution ( min , max , random ) ; cluster . addGenerator ( generator ) ; // TODO: check for unknown attributes. XMLNodeIterator iter = new XMLNodeIterator ( cur . getFirstChild ( ) ) ; while ( iter . hasNext ( ) ) { Node child = iter . next ( ) ; if ( child . getNodeType ( ) == Node . ELEMENT_NODE ) { LOG . warning ( "Unknown element in XML specification file: " + child . getNodeName ( ) ) ; } } }
Process a uniform Element in the XML stream .