@Test public void removeFeatureListener(){ Feature.FeatureListener listener1 = new Feature.FeatureListener() { @Override public void onUpdate(@NonNull Feature f, @NonNull Feature.Sample s) { } }; Feature.FeatureListener listener2 = new Feature.FeatureListener() { @Override public void onUpdate(@NonNull Feature f, @NonNull Feature.Sample s) { } }; EmptyFeatureTest f = new EmptyFeatureTest(); f.addFeatureListener(listener1); f.addFeatureListener(listener2); f.removeFeatureListener(listener2); Assert.assertFalse(f.getFeatureListener().contains(listener2)); Assert.assertEquals(1, f.getFeatureListenerSize()); f.removeFeatureListener(listener1); Assert.assertFalse(f.getFeatureListener().contains(listener1)); Assert.assertEquals(0,f.getFeatureListenerSize()); }
public void removeFeatureListener(FeatureListener listener) { mFeatureListener.remove(listener); }
Feature { public void removeFeatureListener(FeatureListener listener) { mFeatureListener.remove(listener); } }
Feature { public void removeFeatureListener(FeatureListener listener) { mFeatureListener.remove(listener); } Feature(@NonNull String name,@NonNull Node n,@NonNull Field dataDesc[]); }
Feature { public void removeFeatureListener(FeatureListener listener) { mFeatureListener.remove(listener); } Feature(@NonNull String name,@NonNull Node n,@NonNull Field dataDesc[]); void addFeatureListener(FeatureListener listener); void removeFeatureListener(FeatureListener listener); void addFeatureLoggerListener(FeatureLoggerListener logger); void removeFeatureLoggerListener(FeatureLoggerListener logger); Date getLastUpdate(); String getName(); Node getParentNode(); boolean isEnabled(); @NonNull Field[] getFieldsDesc(); @Nullable Sample getSample(); void enableNotification(); void read(); void disableNotification(); @Override String toString(); }
Feature { public void removeFeatureListener(FeatureListener listener) { mFeatureListener.remove(listener); } Feature(@NonNull String name,@NonNull Node n,@NonNull Field dataDesc[]); void addFeatureListener(FeatureListener listener); void removeFeatureListener(FeatureListener listener); void addFeatureLoggerListener(FeatureLoggerListener logger); void removeFeatureLoggerListener(FeatureLoggerListener logger); Date getLastUpdate(); String getName(); Node getParentNode(); boolean isEnabled(); @NonNull Field[] getFieldsDesc(); @Nullable Sample getSample(); void enableNotification(); void read(); void disableNotification(); @Override String toString();  }