当前位置: 首页>>代码示例>>Java>>正文


Java Objects.equal方法代码示例

本文整理汇总了Java中org.apache.wicket.util.lang.Objects.equal方法的典型用法代码示例。如果您正苦于以下问题:Java Objects.equal方法的具体用法?Java Objects.equal怎么用?Java Objects.equal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.wicket.util.lang.Objects的用法示例。


在下文中一共展示了Objects.equal方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onDetach

import org.apache.wicket.util.lang.Objects; //导入方法依赖的package包/类
@Override
protected final void onDetach(ThreadContextImpl threadContext) {
	S attachedObjectSerializableState = makeSerializable(threadContext.getTransientModelObject());
	// Write to the shared context ONLY if a change occurred in this thread.
	// This prevents the model to overwrite a serializable object that has been set in another thread if there was no change in this thread.
	if (!Objects.equal(attachedObjectSerializableState, threadContext.lastSharedSerializableState)) {
		threadContext.lastSharedSerializableState = attachedObjectSerializableState;
		sharedSerializableState.set(attachedObjectSerializableState);
	}
	onDetach();
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:12,代码来源:SessionThreadSafeDerivedSerializableStateLoadableDetachableModel.java

示例2: onDetachDetached

import org.apache.wicket.util.lang.Objects; //导入方法依赖的package包/类
@Override
protected final void onDetachDetached() {
	S sharedState = sharedSerializableState.get();
	S normalizedState = normalizeDetached(sharedState);
	// Write to the shared context ONLY if a change occurred in this thread.
	// This prevents the model to overwrite a serializable object that has been set in another thread if there was no change in this thread.
	if (!Objects.equal(normalizedState, sharedState)) {
		sharedSerializableState.set(normalizedState);
		// No need to update the threadContext here: we're in detached state.
	}
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:12,代码来源:SessionThreadSafeDerivedSerializableStateLoadableDetachableModel.java

示例3: equals

import org.apache.wicket.util.lang.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj)
{
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof FeatureStateModel)) {
        return false;
    }
    FeatureStateModel that = (FeatureStateModel) obj;
    return Objects.equal(feature, that.feature);
}
 
开发者ID:webanno,项目名称:webanno,代码行数:13,代码来源:FeatureStateModel.java

示例4: linkedClass

import org.apache.wicket.util.lang.Objects; //导入方法依赖的package包/类
/**
 * Set linked class to a current property
 * @param className class name to set as a linked class
 * @return this helper
 */
public OSchemaHelper linkedClass(String className)
{
	checkOProperty();
	OClass linkedToClass =  schema.getClass(className);
	if(linkedToClass==null) throw new IllegalArgumentException("Target OClass '"+className+"' to link to not found");
	if(!Objects.equal(linkedToClass, lastProperty.getLinkedClass()))
	{
		lastProperty.setLinkedClass(linkedToClass);
	}
	return this;
}
 
开发者ID:OrienteerBAP,项目名称:wicket-orientdb,代码行数:17,代码来源:OSchemaHelper.java

示例5: start

import org.apache.wicket.util.lang.Objects; //导入方法依赖的package包/类
@Override
public void start(RequestCycle cycle) {
	OrientDbWebSession session = OrientDbWebSession.get();
	ODatabaseDocumentInternal db = session.getDatabase();
	//It's required to have ability to check security rights locally
	OSecurityUser oUser = session.getUser();
	OSecurityUser dbUser = db.getUser();
	if(oUser!=null && oUser.getDocument()!=null 
			&& oUser.getDocument().getIdentity()!=null 
			&& (!oUser.getDocument().getIdentity().isValid() || dbUser==null || !Objects.equal(dbUser.getName(), oUser.getName())))
	{
		db.setUser(db.getMetadata().getSecurity().getUser(oUser.getName()));
	}
	db.begin();
}
 
开发者ID:OrienteerBAP,项目名称:wicket-orientdb,代码行数:16,代码来源:TransactionRequestCycleListener.java

示例6: equals

import org.apache.wicket.util.lang.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj) {
	if (this == obj) {
		return true;
	}
	if (!(obj instanceof Model<?>)) {
		return false;
	}
	Model<?> that = (Model<?>) obj;
	return Objects.equal(value, that.getObject());
}
 
开发者ID:tomaswolf,项目名称:gerrit-gitblit-plugin,代码行数:12,代码来源:SafeTextModel.java

示例7: invoke

import org.apache.wicket.util.lang.Objects; //导入方法依赖的package包/类
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
{
  String methodName = method.getName();
  if (methodName.equals("equals")) {
    if (args[0] instanceof IModel< ? >) {
      return Objects.equal(model.getObject(), ((IModel< ? >) args[0]).getObject());
    }
  } else if (methodName.equals("hashCode")) {
    Object val = model.getObject();
    return Objects.hashCode(val);
  } else if (methodName.equals("writeReplace")) {
    return new SerializableReplacement(model);
  }
  return method.invoke(model, args);
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:16,代码来源:EqualsDecorator.java

示例8: getEventSource

import org.apache.wicket.util.lang.Objects; //导入方法依赖的package包/类
public EventSource getEventSource(String id) throws EventSourceNotFoundException {

		for (EventSource source : calendar.getConfig().getEventSources()) {
			if (Objects.equal(id, source.getUuid())) {
				return source;
			}
		}
		throw new EventSourceNotFoundException("Event source with uuid: " + id + " not found");
	}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:10,代码来源:EventManager.java

示例9: equals

import org.apache.wicket.util.lang.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  Filter other = (Filter) obj;
  return Objects.equal(this.status, other.status);
}
 
开发者ID:olle,项目名称:serverside-todomvc,代码行数:15,代码来源:Filter.java

示例10: editingMyself

import org.apache.wicket.util.lang.Objects; //导入方法依赖的package包/类
private boolean editingMyself() {
    return user != null && user.getId() != null
            && UQSession.exists() && UQSession.get().getLoggedInUser() != null
            && Objects.equal(user.getId(), UQSession.get().getLoggedInUser().getId());
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:6,代码来源:UserProfilePanel.java


注:本文中的org.apache.wicket.util.lang.Objects.equal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。