• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Objects类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Objects类属于org.apache.wicket.util.lang包,在下文中一共展示了Objects类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: validate

import org.apache.wicket.util.lang.Objects; //导入依赖的package包/类
@Override
	public void validate(Form<?> form) {
		final FormComponent name = components[0];
   		final FormComponent<Double> lowerLimit = components[1];
   		final FormComponent<Double> upperLimit = components[2];
		
   		
		Localizer loc = getLocalizer(form);
   		String nameValue = Objects.stringValue(name.getInput(), true);
   		
   		if ("".equals(nameValue)) {
   			name.error(loc.getString("form.name.required", name));
   		} else if (nameValue.length()>255){
   			name.error(loc.getString("form.name.max", name));
   		}
   		
//   		if (Double.valueOf(lowerLimit.getValue()) > Double.valueOf(upperLimit.getValue())){
//   			upperLimit.error(loc.getString("form.upperLimit.low", upperLimit));
//   		}
	}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:21,代码来源:QMMetricFormValidator.java


示例2: validate

import org.apache.wicket.util.lang.Objects; //导入依赖的package包/类
@Override
	public void validate(Form<?> form) {
		final FormComponent name = components[0];
		final FormComponent<Double> lowerLimit = components[1];
   		final FormComponent<Double> upperLimit = components[2];
		 		
   		Localizer loc = getLocalizer(form);
   		String f1Value = Objects.stringValue(name.getInput(), true);
   		if ("".equals(f1Value)) {
   			name.error(loc.getString("form.name.required", name));
   		} else if (f1Value.length()>255){
   			name.error(loc.getString("form.name.max", name));
   		}
   		
//   		if (Double.valueOf(lowerLimit.getValue()) > Double.valueOf(upperLimit.getValue())){
//   			upperLimit.error(loc.getString("form.upperLimit.low", upperLimit));
//   		}
	}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:19,代码来源:QMQualityIndicatorFormValidator.java


示例3: getModelValue

import org.apache.wicket.util.lang.Objects; //导入依赖的package包/类
@Override
protected String getModelValue()
{
	Number value = getModelObject();
	if (value == null)
	{
		return "";
	}
	else
	{
		IConverter<Number> converter = (IConverter<Number>) getConverter(value.getClass());
		if (converter != null) {
			return converter.convertToString(value, this.getLocale());
		} else {
			return Objects.stringValue(value);
		}
	}
}
 
开发者ID:Nocket,项目名称:nocket,代码行数:19,代码来源:DMDNumberTextField.java


示例4: 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


示例5: 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


示例6: 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


示例7: validate

import org.apache.wicket.util.lang.Objects; //导入依赖的package包/类
@Override
public void validate(Form<?> form) {
	final FormComponent name = components[0];
  		final FormComponent key = components[1];
  		final boolean isNew = newEntity;
  		final String oldKey = previousKey;
  		
  		Localizer loc = getLocalizer(form);
  		String f1Value = Objects.stringValue(name.getInput(), true);
  		String f2Value = Objects.stringValue(key.getInput(), true);
  		
  		if ("".equals(f1Value)) {
  			name.error(loc.getString("form.name.required", name));
  		} else if (f1Value.length()>255){
  			name.error(loc.getString("form.name.max", name));
  		}
  		if ("".equals(f2Value)) {
  			key.error(loc.getString("form.key.required", key));
  		}
  		
  		List<String> nodeKeyList = qmodelService.getAllNodeKeys();
  		if (!previousKey.equals(f2Value) && !isNew && Collections.frequency(nodeKeyList, f2Value)>=1) {
  			key.error(loc.getString("form.key.repeated", key));
  		} else if (!previousKey.equals(f2Value) && isNew && (Collections.frequency(nodeKeyList, f2Value)>0)){
  			key.error(loc.getString("form.key.repeated", key));
  		}
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:28,代码来源:QModelFormValidator.java


示例8: 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


示例9: 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


示例10: 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


示例11: 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


示例12: 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


示例13: 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


示例14: 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


示例15: hashCode

import org.apache.wicket.util.lang.Objects; //导入依赖的package包/类
@Override
public int hashCode() {
	return Objects.hashCode(value);
}
 
开发者ID:tomaswolf,项目名称:gerrit-gitblit-plugin,代码行数:5,代码来源:SafeTextModel.java


示例16: hashCode

import org.apache.wicket.util.lang.Objects; //导入依赖的package包/类
@Override
public int hashCode() {
  return Objects.hashCode(this.status);
}
 
开发者ID:olle,项目名称:serverside-todomvc,代码行数:5,代码来源:Filter.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ServiceType类代码示例发布时间:2022-05-22
下一篇:
Java Fairy类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap