[jira] [Commented] (CSV-88) Not possible to create a CSVFormat from scratch

2012-10-15 Thread Sebb (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13476554#comment-13476554
 ] 

Sebb commented on CSV-88:
-

I think it's now sorted:

Added ctor with single char delimiter parameter; that solves the original 
issue, and also allows PRISTINE to be private.

Restored DISABLED char, but as a private constant only used in the PRISTINE 
constant.

The DISABLED char is now not needed externally.

 Not possible to create a CSVFormat from scratch
 ---

 Key: CSV-88
 URL: https://issues.apache.org/jira/browse/CSV-88
 Project: Commons CSV
  Issue Type: Bug
Reporter: Sebb
 Fix For: 1.0


 It's not possible to create a CSVFormat except by modifying an existing 
 format.
 Could either make the PRISTINE format public, or provide a constructor with a 
 single parameter (the delimiter).
 Could provide a no-args ctor instead, but there seems little point in that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CSV-88) Not possible to create a CSVFormat from scratch

2012-10-13 Thread Gary D. Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13475677#comment-13475677
 ] 

Gary D. Gregory commented on CSV-88:


Good points, must ponder some more... with adding back the DISABLED nastiness.

 Not possible to create a CSVFormat from scratch
 ---

 Key: CSV-88
 URL: https://issues.apache.org/jira/browse/CSV-88
 Project: Commons CSV
  Issue Type: Bug
Reporter: Sebb
 Fix For: 1.0


 It's not possible to create a CSVFormat except by modifying an existing 
 format.
 Could either make the PRISTINE format public, or provide a constructor with a 
 single parameter (the delimiter).
 Could provide a no-args ctor instead, but there seems little point in that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CSV-88) Not possible to create a CSVFormat from scratch

2012-09-12 Thread Gary D. Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13453994#comment-13453994
 ] 

Gary D. Gregory commented on CSV-88:


Being forced to use an API style (fluent or other) is oh so lame.

Let's just make the ctor public. It does not break the fact that the object is 
immutable.

 Not possible to create a CSVFormat from scratch
 ---

 Key: CSV-88
 URL: https://issues.apache.org/jira/browse/CSV-88
 Project: Commons CSV
  Issue Type: Bug
Reporter: Sebb

 It's not possible to create a CSVFormat except by modifying an existing 
 format.
 Could either make the PRISTINE format public, or provide a constructor with a 
 single parameter (the delimiter).
 Could provide a no-args ctor instead, but there seems little point in that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CSV-88) Not possible to create a CSVFormat from scratch

2012-09-12 Thread Sebb (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13454341#comment-13454341
 ] 

Sebb commented on CSV-88:
-

bq. Being forced to use an API style (fluent or other) is oh so lame.

Not sure what you mean by that. Do you mean being forced to use a single style 
is lame?
If not, I don't see how it's possible to design an API that is totally 
style-free - just as every speaker has an accent.

bq. Let's just make the ctor public. 

The problem is that the DISABLED char then also has to be made public.
As it stands, the char is a hack; exposing it is a bad idea. Ideally it should 
be eliminated.
And it is very messy using the ctor directly. Try it.

 Not possible to create a CSVFormat from scratch
 ---

 Key: CSV-88
 URL: https://issues.apache.org/jira/browse/CSV-88
 Project: Commons CSV
  Issue Type: Bug
Reporter: Sebb

 It's not possible to create a CSVFormat except by modifying an existing 
 format.
 Could either make the PRISTINE format public, or provide a constructor with a 
 single parameter (the delimiter).
 Could provide a no-args ctor instead, but there seems little point in that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CSV-88) Not possible to create a CSVFormat from scratch

2012-06-21 Thread Sven Maier (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13399025#comment-13399025
 ] 

Sven Maier commented on CSV-88:
---

As it is now it is not possible to have a format w/o an encapsulator,thus 
isEncapsulating() always is true. 

 Not possible to create a CSVFormat from scratch
 ---

 Key: CSV-88
 URL: https://issues.apache.org/jira/browse/CSV-88
 Project: Commons CSV
  Issue Type: Bug
Reporter: Sebb

 It's not possible to create a CSVFormat except by modifying an existing 
 format.
 Could either make the PRISTINE format public, or provide a constructor with a 
 single parameter (the delimiter).
 Could provide a no-args ctor instead, but there seems little point in that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CSV-88) Not possible to create a CSVFormat from scratch

2012-03-29 Thread Sebb (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13241526#comment-13241526
 ] 

Sebb commented on CSV-88:
-

bq. PRISTINE is useless as a base format because all properties have to be 
defined.

No, it's not useless; that's why it was created as empty.

The PRISTINE format provides a base that is untainted by existing settings, 
which is why it works well for creating the pre-defined public formats.

The only setting that is absolutely required is the delimiter, which is why I 
suggested providing a ctor which takes the delimiter as its only parameter.

As I see it, there are the following possibilities for creating a new basic 
format using : as the delimiter.

{code}
fmt1 = new CSVFormat(':');
fmt2 = new CSVFormat().withDelimiter(':');
fmt3 = CSVFormat.PRISTINE.withDelimiter(':');
fmt4 = CSVFormat.newInstance(':');
fmt5 = CSVFormat.newInstance().withDelimiter(':');
{code}

Obviously the constant name PRISTINE can be changed, or the newInstance() 
method could be renamed.

 Not possible to create a CSVFormat from scratch
 ---

 Key: CSV-88
 URL: https://issues.apache.org/jira/browse/CSV-88
 Project: Commons CSV
  Issue Type: Bug
Reporter: Sebb

 It's not possible to create a CSVFormat except by modifying an existing 
 format.
 Could either make the PRISTINE format public, or provide a constructor with a 
 single parameter (the delimiter).
 Could provide a no-args ctor instead, but there seems little point in that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CSV-88) Not possible to create a CSVFormat from scratch

2012-03-27 Thread Emmanuel Bourg (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13239341#comment-13239341
 ] 

Emmanuel Bourg commented on CSV-88:
---

+0 for a no arg constructor equivalent to the default format.

-1 for more constructors or making PRISTINE public. More constructors defeats 
the purpose of the fluent API, and PRISTINE is useless as a base format because 
all properties have to be defined.


 Not possible to create a CSVFormat from scratch
 ---

 Key: CSV-88
 URL: https://issues.apache.org/jira/browse/CSV-88
 Project: Commons CSV
  Issue Type: Bug
Reporter: Sebb

 It's not possible to create a CSVFormat except by modifying an existing 
 format.
 Could either make the PRISTINE format public, or provide a constructor with a 
 single parameter (the delimiter).
 Could provide a no-args ctor instead, but there seems little point in that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CSV-88) Not possible to create a CSVFormat from scratch

2012-03-27 Thread Sebb (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CSV-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13239359#comment-13239359
 ] 

Sebb commented on CSV-88:
-

bq. +0 for a no arg constructor equivalent to the default format.

If you mean the DEFAULT format here then that achieves nothing, as the user 
would have to override any unwanted settings - and the use would have to know 
which ones to override. If the DEFAULT format were ever later updated, that 
could invalidate the user's format.

I meant that the ctor should be equivalent to PRISTINE or perhaps PRISTINE + 
CRLF.

To fit in with the fluent API, there needs to be a static method.
For example, withDefault(char) would do.

 Not possible to create a CSVFormat from scratch
 ---

 Key: CSV-88
 URL: https://issues.apache.org/jira/browse/CSV-88
 Project: Commons CSV
  Issue Type: Bug
Reporter: Sebb

 It's not possible to create a CSVFormat except by modifying an existing 
 format.
 Could either make the PRISTINE format public, or provide a constructor with a 
 single parameter (the delimiter).
 Could provide a no-args ctor instead, but there seems little point in that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira