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


Java Priority.LOW属性代码示例

本文整理汇总了Java中com.android.volley.Request.Priority.LOW属性的典型用法代码示例。如果您正苦于以下问题:Java Priority.LOW属性的具体用法?Java Priority.LOW怎么用?Java Priority.LOW使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.android.volley.Request.Priority的用法示例。


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

示例1: compareTo

@Test public void compareTo() {
    int sequence = 0;
    TestRequest low = new TestRequest(Priority.LOW);
    low.setSequence(sequence++);
    TestRequest low2 = new TestRequest(Priority.LOW);
    low2.setSequence(sequence++);
    TestRequest high = new TestRequest(Priority.HIGH);
    high.setSequence(sequence++);
    TestRequest immediate = new TestRequest(Priority.IMMEDIATE);
    immediate.setSequence(sequence++);

    // "Low" should sort higher because it's really processing order.
    assertTrue(low.compareTo(high) > 0);
    assertTrue(high.compareTo(low) < 0);
    assertTrue(low.compareTo(low2) < 0);
    assertTrue(low.compareTo(immediate) > 0);
    assertTrue(immediate.compareTo(high) < 0);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:RequestTest.java

示例2: testCompareTo

public void testCompareTo() {
    int sequence = 0;
    TestRequest low = new TestRequest(Priority.LOW);
    low.setSequence(sequence++);
    TestRequest low2 = new TestRequest(Priority.LOW);
    low2.setSequence(sequence++);
    TestRequest high = new TestRequest(Priority.HIGH);
    high.setSequence(sequence++);
    TestRequest immediate = new TestRequest(Priority.IMMEDIATE);
    immediate.setSequence(sequence++);

    // "Low" should sort higher because it's really processing order.
    assertTrue(low.compareTo(high) > 0);
    assertTrue(high.compareTo(low) < 0);
    assertTrue(low.compareTo(low2) < 0);
    assertTrue(low.compareTo(immediate) > 0);
    assertTrue(immediate.compareTo(high) < 0);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:18,代码来源:RequestTest.java

示例3: getVolleyPriority

private Priority getVolleyPriority(int priority) {
	switch (priority) {
		case Api.Priority.LOW:
			return Priority.LOW;
		case Api.Priority.HIGH:
			return Priority.HIGH;
		case Api.Priority.IMMEDIATE:
			return Priority.IMMEDIATE;
		case Api.Priority.NORMAL:
		default:
			return Priority.NORMAL;
	}
}
 
开发者ID:showang,项目名称:ApiAbstractionFramework,代码行数:13,代码来源:VolleyRequestExecutor.java

示例4: getPriority

public Priority getPriority() {
    return Priority.LOW;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:3,代码来源:ImageRequest.java


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