public class BeanContextMembershipEvent extends BeanContextEvent
BeanContextMembershipEvent
封装列表添加,或调离,一个特定的
BeanContext
会员。这一事件的一个实例是发射时,成功的(),remove(),retainall(),removeall() clear(),或在给定的
BeanContext
实例调用。对象在接收这类事件感兴趣,必须实现
BeanContextMembershipListener
接口,必须登记他们的意图通过
BeanContext
的
addBeanContextMembershipListener(BeanContextMembershipListener bcml)
方法。
BeanContext
,
BeanContextEvent
,
BeanContextMembershipListener
,
Serialized Form
Modifier and Type | Field and Description |
---|---|
protected Collection |
children
受此事件通知影响的儿童名单。
|
propagatedFrom
source
Constructor and Description |
---|
BeanContextMembershipEvent(BeanContext bc, Collection changes)
每一个beancontextmembershipevent
|
BeanContextMembershipEvent(BeanContext bc, Object[] changes)
每一个beancontextmembershipevent
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object child)
指定受事件影响的子吗?
|
Iterator |
iterator()
获取受此事件影响的儿童的数组。
|
int |
size()
获取受通知影响的孩子的数量。
|
Object[] |
toArray()
获取受此事件影响的儿童的数组。
|
getBeanContext, getPropagatedFrom, isPropagated, setPropagatedFrom
getSource, toString
protected Collection children
public BeanContextMembershipEvent(BeanContext bc, Collection changes)
bc
- beancontext源
changes
-影响的孩子
null
changes
NullPointerException
public BeanContextMembershipEvent(BeanContext bc, Object[] changes)
bc
- beancontext源
changes
-孩子的影响
NullPointerException
如果与此事件相关的变化是空的。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.