等价于Java中的C#ObservableCollection [英] Equivalent of C# ObservableCollection in Java
问题描述
我想知道是否有一个类似于OberservableCollection的数据结构,就像在C#中一样,可以采取某种类型。
I was wondering if there is a data structure that acts like an OberservableCollection almost like in C# that is able to take a certain type.
ex:
在C#中我可以说..
In C# i am able to say..
ObservableCollection<Beer> Beer = new ObservableCollection<Beer>();
Beer.add("Bud"); <br>
Beer.add("Coors");
假设啤酒已经制成,我们可以更改酒精含量,以便
Assuming that the class Beer is made and we can change the alcohol content so that
Beer[1].content = 5;
我想知道是否有人知道是否有这样的数据结构/
I was wondering if anyone knows if there is such a data structure/s that work as well with Java.
我是一个C#程序员,Java程序员不是很多,只是想知道。此外,它必须能够采用自定义类型,而不是通用的。
I am a C# programmer, not much of a Java programmer so just wondering. Also, it has to be able to take in a custom type, not generic.
推荐答案
org.apache.commons .events.observable
Class ObservableCollection
org.apache.commons.events.observable Class ObservableCollection
这篇关于等价于Java中的C#ObservableCollection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!