I agree that the methods feel a bit weird.

The API that would ideally be what I'd like would be:

public List<XWPFHeader> getHeaders()
public XWPFHeader getHeader(int) 

I'd expect moving to this would not be trivial, and having the current API as 
deprecated alongside the new API would be a pain.

Rob
-----Original Message-----
From: "Nick Burch" <[email protected]>
Sent: Tuesday, February 24, 2015 9:37pm
To: [email protected]
Subject: XWPFDocument.getXXXXArray(int) method naming?

Hi All

I've just been looking at github pull request 18, and in the process 
noticed the naming of quite a few methods on XWPFDocument. We have, for 
things like Headers, methods such as getHeaderList() and 
getHeaderArray(int)

Based on the naming in HWPF, and HSSF/XSSF, I wonder if the naming would 
be more intuative if it was instead something like

public XWPFHeader getHeader(int)

or perhaps

public XWPFHeader getHeaderAt(int)


If the former, we could potentially also change the list one to

public List<XWPFHeader> getHeaders()


(With any change like that, we'd @deprecate the old one to preserve 
compatibilty!)

What do people think?

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to