/** * Clones this map. * * @return the cloned map. * @throws CloneNotSupportedException */ public Object clone() throws CloneNotSupportedException { final LinkedMap map = (LinkedMap) super.clone(); map.backend = backend.clone(); Arrays.fill( map.backend, null ); map.firstEntry = null; map.lastEntry = null; map.size = 0; MapEntry entry = firstEntry; while ( entry != null ) { map.put( entry.key, entry.value ); entry = entry.getNext(); } return map; }
/** * Clones this map. * * @return the cloned map. * @throws CloneNotSupportedException */ public Object clone() throws CloneNotSupportedException { final LinkedMap map = (LinkedMap) super.clone(); map.backend = backend.clone(); Arrays.fill(map.backend, null); map.firstEntry = null; map.lastEntry = null; map.size = 0; MapEntry entry = firstEntry; while (entry != null) { map.put(entry.key, entry.value); entry = entry.getNext(); } return map; }
public String[] getQueryNames() { final LinkedMap nameSet = new LinkedMap(); for ( int i = 0; i < dataFactories.size(); i++ ) { final DataFactory dataFactory = dataFactories.get( i ); final String[] queryNames = dataFactory.getQueryNames(); for ( int j = 0; j < queryNames.length; j++ ) { final String queryName = queryNames[j]; nameSet.put( queryName, queryName ); } } return (String[]) nameSet.keys( new String[nameSet.size()] ); }
/** * Defines an attribute. * * @param namespace the namespace of the attribute. * @param name the name of the attribute to be defined * @param value the value of the attribute. */ public void setAttribute( final String namespace, final String name, final String value ) { if ( value == null ) { removeAttribute( namespace, name ); return; } final AttributeEntry entry = new AttributeEntry( namespace, name, value ); this.arrayCache = null; this.entryList.put( entry, entry ); }
@Deprecated public static LinkedMap computeParameterValueSet( final MasterReport report ) { final LinkedMap retval = new LinkedMap(); retval.put( MasterReport.REPORT_DATE_PROPERTY, new Date() ); final ReportParameterValues reportParameterValues = report.getParameterValues(); final ParameterDefinitionEntry[] columnNames = report.getParameterDefinition().getParameterDefinitions(); for ( int i = 0; i < columnNames.length; i++ ) { final ParameterDefinitionEntry parameter = columnNames[i]; final String columnName = parameter.getName(); if ( columnName == null ) { continue; } retval.put( columnName, reportParameterValues.get( columnName ) ); } return retval; }
protected LinkedMap computeParameterValueMap( final MasterReport report ) { final LinkedMap retval = new LinkedMap(); retval.put( MasterReport.REPORT_DATE_PROPERTY, new Date() ); final ReportParameterValues reportParameterValues = report.getParameterValues(); final ParameterDefinitionEntry[] columnNames = report.getParameterDefinition().getParameterDefinitions(); for ( int i = 0; i < columnNames.length; i++ ) { final ParameterDefinitionEntry parameter = columnNames[i]; final String columnName = parameter.getName(); if ( columnName == null ) { continue; } retval.put( columnName, reportParameterValues.get( columnName ) ); } return retval; }
public synchronized StyleKey createKey( final String name, final boolean trans, final boolean inherited, final int validity ) { final StyleKey existingKey = findKeyByName( name ); if ( existingKey != null ) { return existingKey; } if ( locked ) { throw new IllegalStateException ( "All StyleKeys must be registered during the bootup. The registry is locked now." ); } final StyleKey createdKey = new StyleKey ( name, trans, inherited, knownStyleKeys.size(), validity ); knownStyleKeys.put( name, createdKey ); return createdKey; }
/** * Returns the known column names, this data-row understands. The column names may change over time but do not change * while a event is processed by a function. The array returned is a copy of the internal data-storage and can be * safely modified. * * @return the column names as array. */ public String[] getColumnNames() { final LinkedMap columnSources = new LinkedMap(); final String[] dataRowNames = dataRow.getColumnNames(); for ( int i = 0; i < dataRowNames.length; i++ ) { final String dataRowName = dataRowNames[i]; columnSources.put( dataRowName, Boolean.TRUE ); } final String[] envRowNames = envDataRow.getColumnNames(); for ( int i = 0; i < envRowNames.length; i++ ) { final String dataRowName = envRowNames[i]; columnSources.put( dataRowName, Boolean.FALSE ); } return (String[]) columnSources.keys( new String[columnSources.size()] ); }