本文整理了Java中org.osgi.framework.Filter.equals()
方法的一些代码示例,展示了Filter.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Filter.equals()
方法的具体详情如下:
包路径:org.osgi.framework.Filter
类名称:Filter
方法名:equals
[英]Compares this Filter to another Filter.
This implementation returns the result of calling this.toString().equals(obj.toString()).
[中]将此筛选器与另一个筛选器进行比较。
此实现返回调用此函数的结果。toString()。等于(obj.toString())。
代码示例来源:origin: apache/felix
@Override
public boolean equals(Object obj)
{
if (obj == this)
{
return true;
}
if (!(obj instanceof ListenerInfo))
{
return false;
}
ListenerInfo other = (ListenerInfo) obj;
return (other.m_bundle == m_bundle)
&& (other.m_context == m_context)
&& (other.m_listenerClass == m_listenerClass)
&& (other.m_listener == m_listener)
&& (m_filter == null ? other.m_filter == null : m_filter.equals(other.m_filter));
}
代码示例来源:origin: org.apache.felix/org.apache.felix.connect
@Override
public boolean equals(Object obj)
{
if (obj == this)
{
return true;
}
if (!(obj instanceof ListenerInfo))
{
return false;
}
ListenerInfo other = (ListenerInfo) obj;
return (other.m_bundle == m_bundle)
&& (other.m_context == m_context)
&& (other.m_listenerClass == m_listenerClass)
&& (other.m_listener == m_listener)
&& (m_filter == null ? other.m_filter == null : m_filter.equals(other.m_filter));
}
代码示例来源:origin: apache/felix
@Override
public boolean equals(Object obj)
{
if (obj == this)
{
return true;
}
if (!(obj instanceof ListenerInfo))
{
return false;
}
ListenerInfo other = (ListenerInfo) obj;
return (other.m_bundle == m_bundle)
&& (other.m_context == m_context)
&& (other.m_listenerClass == m_listenerClass)
&& (other.m_listener == m_listener)
&& (m_filter == null ? other.m_filter == null : m_filter.equals(other.m_filter));
}
代码示例来源:origin: org.eclipse/org.eclipse.osgi
/**
* Determines the equality of two {@code AdminPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code AdminPermission}; {@code false} otherwise.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof AdminPermission)) {
return false;
}
AdminPermission ap = (AdminPermission) obj;
return (action_mask == ap.action_mask) && ((bundle == ap.bundle) || ((bundle != null) && bundle.equals(ap.bundle))) && (filter == null ? ap.filter == null : filter.equals(ap.filter));
}
代码示例来源:origin: org.osgi/osgi.cmpn
/**
* Determines the equality of two {@code SubsystemPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code SubsystemPermission}; {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof SubsystemPermission)) {
return false;
}
SubsystemPermission sp = (SubsystemPermission) obj;
return (action_mask == sp.action_mask) && ((subsystem == sp.subsystem) || ((subsystem != null) && subsystem.equals(sp.subsystem)))
&& (filter == null ? sp.filter == null : filter.equals(sp.filter));
}
代码示例来源:origin: org.eclipse/osgi
/**
* Determines the equality of two {@code AdminPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code AdminPermission}; {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof AdminPermission)) {
return false;
}
AdminPermission ap = (AdminPermission) obj;
return (action_mask == ap.action_mask) && ((bundle == ap.bundle) || ((bundle != null) && bundle.equals(ap.bundle))) && (filter == null ? ap.filter == null : filter.equals(ap.filter));
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.osgi
/**
* Determines the equality of two {@code AdminPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code AdminPermission}; {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof AdminPermission)) {
return false;
}
AdminPermission ap = (AdminPermission) obj;
return (action_mask == ap.action_mask) && ((bundle == ap.bundle) || ((bundle != null) && bundle.equals(ap.bundle))) && (filter == null ? ap.filter == null : filter.equals(ap.filter));
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.osgi
/**
* Determines the equality of two {@code AdminPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code AdminPermission}; {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof AdminPermission)) {
return false;
}
AdminPermission ap = (AdminPermission) obj;
return (action_mask == ap.action_mask) && ((bundle == ap.bundle) || ((bundle != null) && bundle.equals(ap.bundle))) && (filter == null ? ap.filter == null : filter.equals(ap.filter));
}
代码示例来源:origin: org.apache.aries.subsystem/org.apache.aries.subsystem.api
/**
* Determines the equality of two {@code SubsystemPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code SubsystemPermission}; {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof SubsystemPermission)) {
return false;
}
SubsystemPermission sp = (SubsystemPermission) obj;
return (action_mask == sp.action_mask) && ((subsystem == sp.subsystem) || ((subsystem != null) && subsystem.equals(sp.subsystem)))
&& (filter == null ? sp.filter == null : filter.equals(sp.filter));
}
代码示例来源:origin: apache/felix
/**
* Determines the equality of two {@code AdminPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code AdminPermission}; {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof AdminPermission)) {
return false;
}
AdminPermission ap = (AdminPermission) obj;
return (action_mask == ap.action_mask) && ((bundle == ap.bundle) || ((bundle != null) && bundle.equals(ap.bundle))) && (filter == null ? ap.filter == null : filter.equals(ap.filter));
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.osgi
/**
* Determines the equality of two {@code AdminPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code AdminPermission}; {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof AdminPermission)) {
return false;
}
AdminPermission ap = (AdminPermission) obj;
return (action_mask == ap.action_mask) && ((bundle == ap.bundle) || ((bundle != null) && bundle.equals(ap.bundle))) && (filter == null ? ap.filter == null : filter.equals(ap.filter));
}
代码示例来源:origin: org.osgi/osgi.enterprise
/**
* Determines the equality of two {@code SubsystemPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code SubsystemPermission}; {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof SubsystemPermission)) {
return false;
}
SubsystemPermission sp = (SubsystemPermission) obj;
return (action_mask == sp.action_mask) && ((subsystem == sp.subsystem) || ((subsystem != null) && subsystem.equals(sp.subsystem)))
&& (filter == null ? sp.filter == null : filter.equals(sp.filter));
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.osgi
/**
* Determines the equality of two {@code AdminPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code AdminPermission}; {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof AdminPermission)) {
return false;
}
AdminPermission ap = (AdminPermission) obj;
return (action_mask == ap.action_mask) && ((bundle == ap.bundle) || ((bundle != null) && bundle.equals(ap.bundle))) && (filter == null ? ap.filter == null : filter.equals(ap.filter));
}
代码示例来源:origin: org.osgi/org.osgi.service.subsystem
/**
* Determines the equality of two {@code SubsystemPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code SubsystemPermission}; {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof SubsystemPermission)) {
return false;
}
SubsystemPermission sp = (SubsystemPermission) obj;
return (action_mask == sp.action_mask) && ((subsystem == sp.subsystem) || ((subsystem != null) && subsystem.equals(sp.subsystem)))
&& (filter == null ? sp.filter == null : filter.equals(sp.filter));
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi
/**
* Determines the equality of two {@code AdminPermission} objects.
*
* @param obj The object being compared for equality with this object.
* @return {@code true} if {@code obj} is equivalent to this
* {@code AdminPermission}; {@code false} otherwise.
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof AdminPermission)) {
return false;
}
AdminPermission ap = (AdminPermission) obj;
return (action_mask == ap.action_mask)
&& ((bundle == ap.bundle) || ((bundle != null) && bundle
.equals(ap.bundle)))
&& (filter == null ? ap.filter == null : filter
.equals(ap.filter));
}
代码示例来源:origin: apache/aries
@Override
public boolean equals(Object obj)
{
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
ServiceDeclarationImpl other = (ServiceDeclarationImpl) obj;
if (filter == null) {
if (other.filter != null) return false;
} else if (!filter.equals(other.filter)) return false;
if (interfaceName == null) {
if (other.interfaceName != null) return false;
} else if (!interfaceName.equals(other.interfaceName)) return false;
return true;
}
}
代码示例来源:origin: org.eclipse.gemini.blueprint/gemini-blueprint-core
public boolean equals(Object obj) {
if (obj instanceof OsgiServiceDependency) {
OsgiServiceDependency other = (OsgiServiceDependency) obj;
return (other.isMandatory() == mandatoryService && filter.equals(other.getServiceFilter()) && ObjectUtils.nullSafeEquals(
beanName, other.getBeanName()));
}
return false;
}
代码示例来源:origin: org.osgi/org.amdatu.remote.discovery.bonjour
private final void updateMatches(Collection<EndpointDescription> endpoints) {
for (EndpointDescription endpoint : endpoints) {
Filter matchedFilter = getFirstMatchingFilter(endpoint);
if (matchedFilter != null) {
if (!m_matches.containsKey(endpoint)) {
m_matches.put(endpoint, matchedFilter);
endpointAdded(endpoint, matchedFilter);
}
else if (!matchedFilter.equals(m_matches.get(endpoint))) {
m_matches.put(endpoint, matchedFilter);
endpointModified(endpoint, matchedFilter);
}
else {
// nothing changed
}
}
else {
Filter previouslyMatchedFilter = m_matches.remove(endpoint);
if (previouslyMatchedFilter != null) {
endpointEndmatch(endpoint, previouslyMatchedFilter);
}
}
}
}
代码示例来源:origin: org.osgi/org.amdatu.remote.admin.http
private final void updateMatches(Collection<EndpointDescription> endpoints) {
for (EndpointDescription endpoint : endpoints) {
Filter matchedFilter = getFirstMatchingFilter(endpoint);
if (matchedFilter != null) {
if (!m_matches.containsKey(endpoint)) {
m_matches.put(endpoint, matchedFilter);
endpointAdded(endpoint, matchedFilter);
}
else if (!matchedFilter.equals(m_matches.get(endpoint))) {
m_matches.put(endpoint, matchedFilter);
endpointModified(endpoint, matchedFilter);
}
else {
// nothing changed
}
}
else {
Filter previouslyMatchedFilter = m_matches.remove(endpoint);
if (previouslyMatchedFilter != null) {
endpointEndmatch(endpoint, previouslyMatchedFilter);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!