當前位置: 首頁>>代碼示例>>Java>>正文


Java Validate.noNullElements方法代碼示例

本文整理匯總了Java中org.apache.commons.lang3.Validate.noNullElements方法的典型用法代碼示例。如果您正苦於以下問題:Java Validate.noNullElements方法的具體用法?Java Validate.noNullElements怎麽用?Java Validate.noNullElements使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.commons.lang3.Validate的用法示例。


在下文中一共展示了Validate.noNullElements方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ChunkCluster

import org.apache.commons.lang3.Validate; //導入方法依賴的package包/類
public ChunkCluster(int clX, int clZ, Chunk[] chunks)
{
	this.clX = clX;
	this.clZ = clZ;

	Validate.isTrue(chunks.length == NUMBER_OF_CHUNKS, "The number of chunks has to be "+NUMBER_OF_CHUNKS);
	Validate.noNullElements(chunks);
	this.chunks = chunks;
}
 
開發者ID:domisum,項目名稱:ExZiff,代碼行數:10,代碼來源:ChunkCluster.java

示例2: Chunk

import org.apache.commons.lang3.Validate; //導入方法依賴的package包/類
public Chunk(int cX, int cZ, ChunkSection[] chunkSections)
{
	this.cX = cX;
	this.cZ = cZ;

	Validate.isTrue(chunkSections.length == NUMBER_OF_SECTIONS, "The number of chunk sections has to be "+NUMBER_OF_SECTIONS);
	Validate.noNullElements(chunkSections, "chunkSections can't contain null elements");

	this.chunkSections = chunkSections;
}
 
開發者ID:domisum,項目名稱:ExZiff,代碼行數:11,代碼來源:Chunk.java

示例3: Schedule

import org.apache.commons.lang3.Validate; //導入方法依賴的package包/類
Schedule(List<CarrierMovement> carrierMovements) {
    Validate.notNull(carrierMovements);
    Validate.noNullElements(carrierMovements);
    Validate.notEmpty(carrierMovements);

    this.carrierMovements = carrierMovements;
}
 
開發者ID:RETIT,項目名稱:continuous-performance-evaluation,代碼行數:8,代碼來源:Schedule.java

示例4: CarrierMovement

import org.apache.commons.lang3.Validate; //導入方法依賴的package包/類
public CarrierMovement(Location departureLocation,
        Location arrivalLocation, Date departureTime, Date arrivalTime) {
    Validate.noNullElements(new Object[]{departureLocation,
        arrivalLocation, departureTime, arrivalTime});
    this.departureTime = departureTime;
    this.arrivalTime = arrivalTime;
    this.departureLocation = departureLocation;
    this.arrivalLocation = arrivalLocation;
}
 
開發者ID:RETIT,項目名稱:continuous-performance-evaluation,代碼行數:10,代碼來源:CarrierMovement.java

示例5: Leg

import org.apache.commons.lang3.Validate; //導入方法依賴的package包/類
public Leg(Voyage voyage, Location loadLocation, Location unloadLocation,
        Date loadTime, Date unloadTime) {
    Validate.noNullElements(new Object[]{voyage, loadLocation,
        unloadLocation, loadTime, unloadTime});

    this.voyage = voyage;
    this.loadLocation = loadLocation;
    this.unloadLocation = unloadLocation;
    this.loadTime = loadTime;
    this.unloadTime = unloadTime;
    

    this.id=(long)(Math.random()*Long.MAX_VALUE);
}
 
開發者ID:RETIT,項目名稱:continuous-performance-evaluation,代碼行數:15,代碼來源:Leg.java

示例6: Itinerary

import org.apache.commons.lang3.Validate; //導入方法依賴的package包/類
public Itinerary(List<Leg> legs) {
    Validate.notEmpty(legs);
    Validate.noNullElements(legs);

    this.legs = legs;
}
 
開發者ID:RETIT,項目名稱:continuous-performance-evaluation,代碼行數:7,代碼來源:Itinerary.java


注:本文中的org.apache.commons.lang3.Validate.noNullElements方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。