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


Java CompareToBuilder.append方法代碼示例

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


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

示例1: compareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
public int compareTo(AddressFamilyRoutingConfiguration o) {
	CompareToBuilder builder = (new CompareToBuilder())
			.append(getKey(), o.getKey())
			.append(getRoutes().size(), o.getRoutes().size());
	
	if(builder.toComparison() == 0) {
		Iterator<RouteConfiguration> lit = getRoutes().iterator();
		Iterator<RouteConfiguration> rit = o.getRoutes().iterator();
		
		while(lit.hasNext())
			builder.append(lit.next(), rit.next());
	}
	
	return builder.toComparison();
}
 
開發者ID:bnitin,項目名稱:bgp-ls,代碼行數:17,代碼來源:AddressFamilyRoutingConfigurationImpl.java

示例2: compareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
public int compareTo(PathAttributeConfiguration o) {
	CompareToBuilder builder = new CompareToBuilder();
	
	builder.append(getAttributes().size(), o.getAttributes().size());
	
	if(builder.toComparison() == 0) {
		Iterator<PathAttribute> lit = getAttributes().iterator();
		Iterator<PathAttribute> rit = o.getAttributes().iterator();
		
		while(lit.hasNext())
			builder.append(lit.next(), rit.next());
	}
	
	return builder.toComparison();
}
 
開發者ID:bnitin,項目名稱:bgp-ls,代碼行數:17,代碼來源:PathAttributeConfigurationImpl.java

示例3: subclassCompareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
protected int subclassCompareTo(PathAttribute obj) {
	ASPathAttribute o = (ASPathAttribute)obj;

	CompareToBuilder builder = (new CompareToBuilder())
			.append(getAsType(), o.getAsType())
			.append(getPathSegments().size(), o.getPathSegments().size());
	
	if(builder.toComparison() == 0) {
		Iterator<PathSegment> lit = getPathSegments().iterator();
		Iterator<PathSegment> rit = o.getPathSegments().iterator();
		
		while(lit.hasNext())
			builder.append(lit.next(), rit.next());
	}
	
	return builder.toComparison();
}
 
開發者ID:bnitin,項目名稱:bgp-ls,代碼行數:19,代碼來源:ASPathAttribute.java

示例4: subclassCompareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
protected int subclassCompareTo(PathAttribute obj) {
	MultiProtocolNLRI o = (MultiProtocolNLRI)obj;
	
	CompareToBuilder builer = (new CompareToBuilder())
			.append(getPathAttributeType(), o.getPathAttributeType())
			.append(getAddressFamily(), o.getAddressFamily())
			.append(getSubsequentAddressFamily(), o.getSubsequentAddressFamily())
			.append(getNextHop(), o.getNextHop())
			.append(getNlris().size(), o.getNlris().size());
	
	if(builer.toComparison() == 0) {
		Iterator<MultiProtocolNLRIInformation> lit = getNlris().iterator();
		Iterator<MultiProtocolNLRIInformation> rit = o.getNlris().iterator();
		
		while(lit.hasNext())
			builer.append(lit.next(), rit.next());
	}
	
	return builer.toComparison();
}
 
開發者ID:bnitin,項目名稱:bgp-ls,代碼行數:22,代碼來源:MultiProtocolNLRI.java

示例5: subclassCompareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
protected int subclassCompareTo(PathAttribute obj) {
	CommunityPathAttribute o = (CommunityPathAttribute)obj;
	CompareToBuilder builder = (new CompareToBuilder())
		.append(getCommunity(), o.getCommunity())
		.append(getMembers().size(), o.getMembers().size());
	
	if(builder.toComparison() == 0) {
		Iterator<CommunityMember> lit = getMembers().iterator();
		Iterator<CommunityMember> rit = o.getMembers().iterator();
		
		while(lit.hasNext())
			builder.append(lit.next(), rit.next());
	}
	
	return builder.toComparison();
}
 
開發者ID:bnitin,項目名稱:bgp-ls,代碼行數:18,代碼來源:CommunityPathAttribute.java

示例6: subclassCompareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
protected int subclassCompareTo(PathAttribute obj) {
	CompareToBuilder builder = new CompareToBuilder();
	ClusterListPathAttribute o = (ClusterListPathAttribute)obj;
	
	builder.append(getClusterIds().size(), o.getClusterIds().size());
	
	if(builder.toComparison() == 0) {
		Iterator<Integer> lit = getClusterIds().iterator();
		Iterator<Integer> rit = o.getClusterIds().iterator();
		
		while(lit.hasNext())
			builder.append(lit.next(), rit.next());
	}
	
	return builder.toComparison();
}
 
開發者ID:bnitin,項目名稱:bgp-ls,代碼行數:18,代碼來源:ClusterListPathAttribute.java

示例7: compareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
public int compareTo(PathSegment o) {
	CompareToBuilder builder = (new CompareToBuilder())
			.append(getAsType(), o.getAsType())
			.append(getPathSegmentType(), o.getPathSegmentType())
			.append(getAses().size(), o.getAses().size());
	
	if(builder.toComparison() == 0) {
		Iterator<Integer> lit = getAses().iterator();
		Iterator<Integer> rit = o.getAses().iterator();
		
		while(lit.hasNext())
			builder.append(lit.next(), rit.next());
	}
	
	return builder.toComparison();
}
 
開發者ID:bnitin,項目名稱:bgp-ls,代碼行數:18,代碼來源:PathSegment.java

示例8: run

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
public long run() {
	final CompareToBuilder builder = new CompareToBuilder();
	for( final String key : keys ) {
		builder.append( key, key );
	}
	return builder
			.append( true, true )
			.append( 1.1, 1.2 )
			.append( 1, 1 )
			.toComparison();
}
 
開發者ID:cheremin,項目名稱:scalarization,代碼行數:13,代碼來源:CompareToBuilderScenario.java

示例9: compareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
public int compareTo(Period o) {
	CompareToBuilder cmpBuilder = new CompareToBuilder();
	cmpBuilder.append(this.getBeginDate(), o.getBeginDate());
	cmpBuilder.append(this.getEndDate(), o.getEndDate());
	return cmpBuilder.toComparison();
}
 
開發者ID:CIT-VSB-TUO,項目名稱:ResBill,代碼行數:8,代碼來源:Period.java

示例10: compare

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
public int compare(QueryKey key1, QueryKey key2) {
    // The CompareToBuilder can't be cached - which is OK because this Comparator isn't used
    // often
    CompareToBuilder builder = new CompareToBuilder();
    builder.append(key1.query, key2.query);
    builder.append((key1.locale != null) ? key1.locale.getCountry() : null,
        (key2.locale != null) ? key2.locale.getCountry() : null);
    builder.append(key1.city, key2.city);
    return builder.build();
}
 
開發者ID:jhaood,項目名稱:github-job-keywords,代碼行數:12,代碼來源:QueryKey.java

示例11: compare

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
public int compare(TermFrequency term1, TermFrequency term2) {
    // compute for descending frequency order
    CompareToBuilder builder = new CompareToBuilder();
    builder.append(term2.frequency, term1.frequency);

    // compute for descending word-count order
    builder.append(term2.wordCount, term1.wordCount);

    // and finally sort by the term, alphabetically, ascending.
    builder.append(term1.term, term2.term);
    return builder.toComparison();
}
 
開發者ID:jhaood,項目名稱:github-job-keywords,代碼行數:14,代碼來源:TermFrequency.java

示例12: compareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
public int compareTo(final Entry<T> o) {
    final CompareToBuilder b = new CompareToBuilder();
    b.append(-this.count, -o.count);
    b.append(this.value, o.value);
    return b.toComparison();
}
 
開發者ID:Zuehlke,項目名稱:SHMACK,代碼行數:8,代碼來源:SortedCounts.java

示例13: compareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
public int compareTo(UserRole o) {
	CompareToBuilder builder = new CompareToBuilder();
	builder.append(getRoleId(), o.getRoleId());
	builder.append(getUserId(), o.getUserId());
	return builder.toComparison();
}
 
開發者ID:SmarterApp,項目名稱:TechnologyReadinessTool,代碼行數:8,代碼來源:UserRole.java

示例14: compareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
public int compareTo(RoutingProcessorConfiguration o) {
	CompareToBuilder builder = (new CompareToBuilder())
			.append(getRoutingInstances().size(), o.getRoutingInstances().size());
	
	if(builder.toComparison() == 0) {
		Iterator<RoutingInstanceConfiguration> lit = getRoutingInstances().iterator();
		Iterator<RoutingInstanceConfiguration> rit = o.getRoutingInstances().iterator();
		
		while(lit.hasNext())
			builder.append(lit.next(), rit.next());
	}

	return builder.toComparison();
}
 
開發者ID:bnitin,項目名稱:bgp-ls,代碼行數:16,代碼來源:RoutingProcessorConfigurationImpl.java

示例15: compareTo

import org.apache.commons.lang3.builder.CompareToBuilder; //導入方法依賴的package包/類
@Override
public int compareTo(RoutingConfiguration o) {
	CompareToBuilder builder = (new CompareToBuilder())
			.append(getRoutingConfigurations().size(), o.getRoutingConfigurations().size());
	
	if(builder.toComparison() == 0) {
		Iterator<AddressFamilyRoutingConfiguration> lit = getRoutingConfigurations().iterator();
		Iterator<AddressFamilyRoutingConfiguration> rit = o.getRoutingConfigurations().iterator();
		
		while(lit.hasNext())
			builder.append(lit.next(), rit.next());
	}
	
	return builder.toComparison();
}
 
開發者ID:bnitin,項目名稱:bgp-ls,代碼行數:16,代碼來源:RoutingConfigurationImpl.java


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