(10/11/19 15:20), Gregor Heinrich wrote:
Dear list -- I was wondering why in the fast-vector-highlighter some fields are 
set package-private
and at the same time don't have accessor methods. Are subclasses supposed to be 
put in the same
package then?

Example: Subclassing ScoreOrderFragmentsBuilder with a new method like this:

@Override
public List<WeightedFragInfo> getWeightedFragInfoList(List<WeightedFragInfo> 
src) {
Collections.sort(src, new ScoreComparator());
super(src);
for (int i = 0; i < src.size(); i++) {
// ??? every field package private in FieldFragList.WeightedFragInfo
WeightedFragInfo u = src.get(i);
u.startOffset -= 20;
u.endOffset += 20;
src.set(i, u);
}
return src;
}

I'd vote for protected access for all those fields in the 11 classes where this 
issue applies. IMO,
the package is worth having this extra flexibility. Then it really deserves its attribute 
"fast"
also in terms of developing with it.

I think it's ok to have accessor methods.
Please open a jira ticket and attach a patch if possible.

Koji

--
http://www.rondhuit.com/en/

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

Reply via email to