1 package org.opentrafficsim.kpi.sampling; 2 3 /** 4 * Simple column implementation. 5 * <p> 6 * Copyright (c) 2020-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br> 7 * BSD-style license. See <a href="https://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>. 8 * </p> 9 * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a> 10 * @author <a href="https://www.tudelft.nl/pknoppers">Peter Knoppers</a> 11 * @author <a href="https://www.transport.citg.tudelft.nl">Wouter Schakel</a> 12 * @param <T> value type 13 */ 14 public class SimpleColumn<T> implements Column<T> 15 { 16 17 /** Id. */ 18 private final String id; 19 20 /** Description. */ 21 private final String description; 22 23 /** Value type. */ 24 private final Class<T> valueType; 25 26 /** 27 * Constructor. 28 * @param id String; id 29 * @param description String; description 30 * @param valueType Class<T>; value type 31 */ 32 public SimpleColumn(final String id, final String description, final Class<T> valueType) 33 { 34 this.id = id; 35 this.description = description; 36 this.valueType = valueType; 37 } 38 39 /** {@inheritDoc} */ 40 @Override 41 public String getId() 42 { 43 return this.id; 44 } 45 46 /** {@inheritDoc} */ 47 @Override 48 public String getDescription() 49 { 50 return this.description; 51 } 52 53 /** {@inheritDoc} */ 54 @Override 55 public Class<T> getValueType() 56 { 57 return this.valueType; 58 } 59 60 }