本文整理汇总了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);
}
示例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;
}
示例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();
}
示例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());
}
示例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);
}
示例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");
}
示例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);
}
示例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());
}