com.mindprod.csv
Class ColumnDescriptor

java.lang.Object
  extended by com.mindprod.csv.ColumnDescriptor

final class ColumnDescriptor
extends java.lang.Object

Facts about a single column in the CSV file, used internally by CSVAlign

created with Intellij Idea

Author:
Roedy Green, Canadian Mind Products

Field Summary
 boolean isAwkward
          true if one or more fields in this column require surrounding quotes.
 boolean isNumeric
          if true all fields contain only digits dot, plus and minus.
 int maxWidth
          widest field in the column.
 int startCol
          0-based char column where this column starts
 
Constructor Summary
ColumnDescriptor()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isAwkward

public boolean isAwkward
true if one or more fields in this column require surrounding quotes. On output, all fields in an awkward column will get surrounding quotes. If a field contains , or quote it needs the surrounding quotes.


isNumeric

public boolean isNumeric
if true all fields contain only digits dot, plus and minus. Assume column is numeric until proven otherwise by finding a non-numeric char.


maxWidth

public int maxWidth
widest field in the column. Not including comma or space. If a column is "awkward" (needs surrounding quotes), then the length includes the quotes and any internal quoting.


startCol

public int startCol
0-based char column where this column starts

Constructor Detail

ColumnDescriptor

ColumnDescriptor()