[ https://java.net/jira/browse/GLAZEDLISTS-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] brands updated GLAZEDLISTS-597: ------------------------------- Description: The Connector interface defines the following method: {code:java} public void setObservableElementList(ObservableElementList<? extends E> list); {code} It needs a reference to the list to notify it about an element change: ... list.elementChanged(element) ... To allow different ObservableElementList implementations reusing the existing Connector (implementations), an interface could be extracted like this: {code:java} public interface ObservableElementChangeHandler<E> { void elementChanged(Object listElement); } {code} Then the connector interface could only depend on this interface: {code:java} public void setObservableElementList(ObservableElementChangeHandler<? extends E> list); {code} was: The Connector interface defines the following method: public void setObservableElementList(ObservableElementList<? extends E> list); It needs a reference to the list to notify it about an element change: ... list.elementChanged(element) ... To allow different ObservableElementList implementations reusing the existing Connector (implementations), an interface could be extracted like this: public interface ObservableElementChangeHandler<E> { void elementChanged(Object listElement); } Then the connector interface could only depend on this interface: public void setObservableElementList(ObservableElementChangeHandler<? extends E> list); > Decouple ObservableElementList from Connector with a new interface > ------------------------------------------------------------------ > > Key: GLAZEDLISTS-597 > URL: https://java.net/jira/browse/GLAZEDLISTS-597 > Project: glazedlists > Issue Type: Bug > Components: core > Reporter: brands > Assignee: brands > Fix For: 1.10.0 > > > The Connector interface defines the following method: > {code:java} > public void setObservableElementList(ObservableElementList<? extends E> list); > {code} > It needs a reference to the list to notify it about an element change: > ... > list.elementChanged(element) > ... > To allow different ObservableElementList implementations reusing the existing Connector (implementations), an interface could be extracted like this: > {code:java} > public interface ObservableElementChangeHandler<E> { > void elementChanged(Object listElement); > } > {code} > Then the connector interface could only depend on this interface: > {code:java} > public void setObservableElementList(ObservableElementChangeHandler<? extends E> list); > {code} -- This message was sent by Atlassian JIRA (v6.2.3#6260) |
Free forum by Nabble | Edit this page |