values.put( parameterName, value );
/** * Creates a paper by using the paper size in points found in the int-array. The array must have a length of 2 and the * first value of this array has to contain the width and the second the height parameter. The created Paper has no * ImagableArea defined. * * @param papersize * the definition of the papersize in a 2-element int-array * @return the created paper */ public Paper createPaper( final PageSize papersize ) { return createPaper( papersize.getWidth(), papersize.getHeight() ); }
public SimpleStyleResolver( final boolean designTime ) { this.designTime = designTime; usageCounter = new SingleKeyedCounter<String>(); extendedCounter = new DoubleKeyedCounter<String, Long>(); }
public void testAdding() { final RingBuffer<Integer> tc = new RingBuffer<Integer>( 3 ); tc.add( 10 ); tc.add( 20 ); tc.add( 30 ); tc.add( 40 ); assertEquals( 40, (int) tc.getLastValue() ); assertEquals( 20, (int) tc.getFirstValue() ); }
public void testClassification() { { Stroke stroke = StrokeUtility.createStroke( 4, 1 ); int recognizedType = StrokeUtility.getStrokeType( stroke ); assertEquals( "Stroke Type", 4, recognizedType ); } for ( int type = 0; type < 5; type += 1 ) { Stroke stroke = StrokeUtility.createStroke( type, 1 ); int recognizedType = StrokeUtility.getStrokeType( stroke ); assertEquals( "Stroke Type", type, recognizedType ); } } }
public TableModel queryData( final String query, final DataRow parameters ) throws ReportDataFactoryException { final TypedTableModel tableModel = new TypedTableModel(); tableModel.addRow(); return tableModel; }
/** * Constructs an unnamed function. Make sure to set a Name or function initialisation will fail. */ public ItemSumFunction() { sum = new Sequence<BigDecimal>(); }
/** * Returns the computed maximum value. * * @return The computed maximum value. */ public Object getValue() { if ( result == null ) { return null; } return result.get( lastGroupSequenceNumber ); }
public int getLogicalPageCount() { if ( logicalMapping == null ) { return -1; } return logicalMapping.size(); }
private Object readResolve() throws ObjectStreamException { this.stateKeys = new BulkArrayList<>( CAPACITY ); this.sequences = new BulkArrayList<>( CAPACITY ); return this; } }
public void foreach( Func<T> func, int start, int end ) { for ( int i = start; i < end; i += 1 ) { func.process( (T) data[i], i ); } } }
/** * @param response the httpresponse for processing * @param charset the charset used for getting HttpEntity * @return HttpEntity in decoded String representation using provided charset * @throws IOException */ public static String responseToString( HttpResponse response, Charset charset ) throws IOException { return responseToString( response, charset, false ); }
public void testAdding2() { final RingBuffer<Integer> tc = new RingBuffer<Integer>( 3 ); tc.add( 10 ); tc.add( 20 ); tc.add( 30 ); assertEquals( 30, (int) tc.getLastValue() ); assertEquals( 10, (int) tc.getFirstValue() ); }
/** * Constructs an unnamed function. Make sure to set a Name or function initialisation will fail. */ public ItemMaxFunction() { max = new Sequence<Comparable>(); }
/** * Returns the function value, in this case the running total of a specific column in the report's data-set. * * @return The function value. */ public Object getValue() { return max.get( lastGroupSequenceNumber ); }
public void testReplaceFirst() { final RingBuffer<Integer> tc = new RingBuffer<Integer>( 3 ); tc.replaceLastAdded( 10 ); assertEquals( 10, (int) tc.getFirstValue() ); assertEquals( 10, (int) tc.getLastValue() ); tc.add( 10 ); tc.add( 20 ); tc.add( 30 ); tc.add( 40 ); assertEquals( 40, (int) tc.getLastValue() ); assertEquals( 20, (int) tc.getFirstValue() ); }
public void testReplace() { final RingBuffer<Integer> tc = new RingBuffer<Integer>( 3 ); tc.add( 10 ); tc.add( 20 ); tc.add( 30 ); assertEquals( 30, (int) tc.getLastValue() ); assertEquals( 10, (int) tc.getFirstValue() ); tc.replaceLastAdded( 40 ); assertEquals( 40, (int) tc.getLastValue() ); assertEquals( 10, (int) tc.getFirstValue() ); tc.add( 50 ); assertEquals( 50, (int) tc.getLastValue() ); assertEquals( 20, (int) tc.getFirstValue() ); }