/** * Constructs a new {@code Header} using the specified * {@link ValueList} * * @param input 3 rows of data describing the input */ public Header(IValueList input) { if (input.Size() != 3) { throw new ArgumentException("Input did not have 3 rows"); } _rawTupleList = input; _fieldNames = input.GetRow(0).All().Select(o => o.ToString().Trim()).ToList(); _fieldMeta = input.GetRow(1).All().Select(FieldMetaTypeHelper.FromString).ToList(); _sensorFlags = input.GetRow(2).All().Select(SensorFlagsHelper.FromString).ToList(); InitIndexes(); }
/** * Returns the number of configuration lines contained. * WARNING: Must be size == 3 */ public int Size() { return(_rawTupleList.Size()); }