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


Java Args.isTrue方法代码示例

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


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

示例1: setComponentToRefresh

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
public void setComponentToRefresh(MarkupContainer component) {
	Args.isTrue(
			component == this || component.contains(this, true),
			"The component to refresh in stead of a DataTable must contain the DataTable. {} does not contain {}",
			component, this
	);
	this.componentToRefresh = component;
	this.componentToRefresh.setOutputMarkupId(true);
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:10,代码来源:CoreDataTable.java

示例2: createLinksForDocuments

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
private void createLinksForDocuments(List<ODocument> documents, List<ODocument> links) {
    Args.isTrue(documents.size() == links.size(), "documents.size() == linkedDocs.size()");
    for (int i = 0; i < documents.size(); i++) {
        ODocument document = documents.get(i);
        document.field(LINK_FIELD, links.get(i).getIdentity().toString(), OType.LINK);
        document.save();
    }
}
 
开发者ID:OrienteerBAP,项目名称:wicket-orientdb,代码行数:9,代码来源:WicketOrientDbFilterTesterScope.java

示例3: createEmbeddedFieldsForDocuments

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
private void createEmbeddedFieldsForDocuments(List<ODocument> documents, List<ODocument> embedded) {
    Args.isTrue(documents.size() == embedded.size(), "documents.size() == embedded.size()");
    for (int i = 0; i < documents.size(); i++) {
        ODocument document = documents.get(i);

        document.field(EMBEDDED_FIELD, embedded.get(i), OType.EMBEDDED);
        document.save();
    }
}
 
开发者ID:OrienteerBAP,项目名称:wicket-orientdb,代码行数:10,代码来源:WicketOrientDbFilterTesterScope.java

示例4: createEmbeddedStringCollectionForDocuments

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
private void createEmbeddedStringCollectionForDocuments(List<ODocument> documents, List<String> strings, boolean list) {
    Args.isTrue(documents.size() == strings.size(), "documents.size() == strings.size()");
    String field = list ? EMBEDDED_LIST_STRING_FIELD : EMBEDDED_SET_STRING_FIELD;
    for (int i = 0; i < documents.size(); i++) {
        ODocument document = documents.get(i);
        document.field(field, strings.get(i));
        document.save();
    }
}
 
开发者ID:OrienteerBAP,项目名称:wicket-orientdb,代码行数:10,代码来源:WicketOrientDbFilterTesterScope.java

示例5: createEmbeddedCollectionFieldsForDocuments

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
private void createEmbeddedCollectionFieldsForDocuments(List<ODocument> documents, List<List<ODocument>> embeddedList, boolean list) {
    Args.isTrue(documents.size() == embeddedList.size(), "documents.size() == embeddedList.size()");
    String field = list ? EMBEDDED_LIST_FIELD : EMBEDDED_SET_FIELD;
    for (int i = 0; i < documents.size(); i++) {
        ODocument document = documents.get(i);
        document.field(field, embeddedList.get(i), OType.EMBEDDEDLIST);
        document.save();
    }
}
 
开发者ID:OrienteerBAP,项目名称:wicket-orientdb,代码行数:10,代码来源:WicketOrientDbFilterTesterScope.java

示例6: createLinkListForDocument

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
private void createLinkListForDocument(List<ODocument> documents, List<List<ODocument>> linkList) {
    Args.isTrue(documents.size() == linkList.size(), "documents.size() == linkList.size()");
    for (int i = 0; i < documents.size(); i++) {
        ODocument document = documents.get(i);
        document.field(LINK_LIST_FIELD, linkList.get(i), OType.LINKLIST);
        document.save();
    }
}
 
开发者ID:OrienteerBAP,项目名称:wicket-orientdb,代码行数:9,代码来源:WicketOrientDbFilterTesterScope.java

示例7: createMapDocsForDocuments

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
private void createMapDocsForDocuments(List<ODocument> documents, List<ODocument> mapDocs, boolean embedded) {
    Args.isTrue(documents.size() == mapDocs.size(), "documents.size() == mapDocs.size()");

    for (int i = 0; i < documents.size(); i++) {
        ODocument document = documents.get(i);
        Map<String, ODocument> map = Maps.newHashMap();
        map.put(MAP_KEYS.get(i), mapDocs.get(i));
        if (embedded) {
            document.field(EMBEDDED_MAP_FIELD, map, OType.EMBEDDEDMAP);
        } else document.field(LINK_MAP_FIELD, map, OType.LINKMAP);
        document.save();
    }
}
 
开发者ID:OrienteerBAP,项目名称:wicket-orientdb,代码行数:14,代码来源:WicketOrientDbFilterTesterScope.java

示例8: createListOfDocuments

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
private List<ODocument> createListOfDocuments(List<ODocument> docs, List<Integer> order) {
    Args.isTrue(docs.size() == order.size(), "docs.size() == order.size()");
    List<ODocument> documents = Lists.newArrayList();
    for (Integer i : order) {
        documents.add(docs.get(i - 1));
    }
    return documents;
}
 
开发者ID:OrienteerBAP,项目名称:wicket-orientdb,代码行数:9,代码来源:WicketOrientDbFilterTesterScope.java

示例9: populateItem

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
@Override
protected void populateItem(ListItem<AbstractLink> item) {
    final AbstractLink link = item.getModelObject();

    Args.isTrue(getButtonMarkupId().equals(link.getId()),
            "component id is invalid, please use ButtonList.getButtonMarkupId()");

    item.add(link);
}
 
开发者ID:flex-oss,项目名称:flex-ui,代码行数:10,代码来源:ButtonList.java

示例10: testRequiredDefault

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
@MethodMapping(value = "/testreqdef", produces = RestMimeTypes.TEXT_PLAIN)
public String testRequiredDefault(
		@RequestParam(value = "fromRequest", required = false) String request,
		@CookieParam(value = "cookie", defaultValue = "true") boolean cookie,
		@HeaderParam(value = "price", defaultValue = "12.6") float price,
		@MatrixParam(parameterName = "matrixp", segmentIndex = 0, required = false, defaultValue = "0") int matrixp) {
	
	Args.isTrue(request == null, "must be null!");
	Args.isTrue(cookie, "must be true!");
	Assert.assertEquals(Float.parseFloat("12.6"), price);
	
	return "testRequiredDefault";
}
 
开发者ID:bitstorm,项目名称:Wicket-rest-annotations,代码行数:14,代码来源:RestResourceFullAnnotated.java

示例11: check

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
@Value.Check
public void check() {
    Args.isTrue(getNorthEast().getLatitude() >= getSouthWest().getLatitude(), "North latitude must be greater than south latitude");
    Args.isTrue(getNorthEast().getLongitude() >= getSouthWest().getLongitude(), "East longitude must be greater than west longitude");
}
 
开发者ID:DrunkenPandaFans,项目名称:wicket-leaflet,代码行数:6,代码来源:AbstractLatLngBounds.java

示例12: check

import org.apache.wicket.util.lang.Args; //导入方法依赖的package包/类
@Value.Check
protected void check() {
    Args.isTrue(getTopLeft().getX() <= getBottomRight().getX(), "X coordinate of topLeft must be less than or equal to X coordinate of bottomRight");
    Args.isTrue(getTopLeft().getY() <= getBottomRight().getY(), "Y coordinate of topLeft must be less than or equal to Y coordinate of bottomRight");
}
 
开发者ID:DrunkenPandaFans,项目名称:wicket-leaflet,代码行数:6,代码来源:AbstractBounds.java


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