[
https://issues.apache.org/jira/browse/UIMA-5769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16447371#comment-16447371
]
Marshall Schor edited comment on UIMA-5769 at 4/22/18 9:07 PM:
---------------------------------------------------------------
It seems that this object, "FeatureStructureSelection" is all about having a
selection of Feature Structures.
I agree that the "toList()" method intuitively seems to mean that one object
can be converted to a list of FeatureStructures. If we consider the "one
object" to be a FeatureStructureSelection instance, it seems like this fits;
This method starts with one object, a FeatureStructureSelection, and converts
it to a list.
was (Author: schor):
It seems that this object, "FeatureStructureSelection" is all about having a
selection of Feature Structures.
I agree that the "toList()" method intuitively seems to mean that this object
can be converted to a list of FeatureStructures. So, in that sense, this
method starts with one object, a FeatureStructureSelection, and converts it to
a list. So, to me, this seems like a better name than getList.
> Inconsistent method name
> ------------------------
>
> Key: UIMA-5769
> URL: https://issues.apache.org/jira/browse/UIMA-5769
> Project: UIMA
> Issue Type: Improvement
> Components: CAS Editor
> Reporter: KuiLIU
> Priority: Major
>
> The following method is named "toList" that seems like to convert one object
> to a list, but the method just returns a list of FeatureStructure objects, so
> that the method name "getList" should be more clear than "toList".
> {code:java}
> /**
> * Retrieves a list of {@link FeatureStructure} objects.
> *
> * @return all selected {@link FeatureStructure} objects
> */
> public List<FeatureStructure> toList() {
> return mFeatureStructures;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)