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


Java ArrayStack类代码示例

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


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

示例1: ProgressBuilder

import org.apache.commons.collections.ArrayStack; //导入依赖的package包/类
/**
    * Create the builder. Supply all the data that will be needed to parse the design..
    * 
    * If accessMode == LEARNER then progress and user must not be null. This will create a list of portfolio objects
    * for
    * all activities that the LEARNER has completed or attempted.
    * 
    * If accessMode == AUTHOR then progress and user must not be null and a few hacks must be done to let the user skip
    * ahead (to be done).
    * 
    * In all cases, all activities are included, whether they are started or not.
    * 
    * @param design
    * @param activityDAO
    * @param lamsCoreToolService
    * @param accessMode
    * @param lesson
    * @param progress
    * @param user
    */
   public ProgressBuilder(LearnerProgress progress, IActivityDAO activityDAO, ActivityMapping activityMapping) {
super(progress.getLesson().getLearningDesign(), activityDAO);
this.user = progress.getUser();
this.progress = progress;
this.activityMapping = activityMapping;

this.mainActivityList = new ArrayList<ActivityURL>();
this.currentActivityList = mainActivityList;

this.activityListStack = new ArrayStack(5);

Lesson lesson = progress.getLesson();
previewMode = lesson.isPreviewLesson();
isFloating = false;
//if ( previewMode ) {
// setup the basic call to the learner screen, ready just to put the activity id on the end. Saves calculating it for every activity
this.forceLearnerURL = "learner.do?method=forceMoveRedirect&lessonID=" + progress.getLesson().getLessonId()
	+ "&destActivityID=";
//}

   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:42,代码来源:ProgressBuilder.java

示例2: getBaseDirRelative

import org.apache.commons.collections.ArrayStack; //导入依赖的package包/类
/**
 * Calculates the relative path from {@link #DEFAULT_BASE} to the current base,
 * which must be the same as or a child of the default.
 * 
 * @return the relative path, or {@code "."} if the path cannot be determined
 */
public synchronized File getBaseDirRelative() {
    // Must first convert to absolute path names to ensure parents are available
    File parent = new File(DEFAULT_BASE).getAbsoluteFile();
    File f = base.getAbsoluteFile();
    ArrayStack l = new ArrayStack();
    while (f != null) { 
        if (f.equals(parent)){
            if (l.isEmpty()){
                break;
            }
            File rel = new File((String) l.pop());
            while(!l.isEmpty()) {
                rel = new File(rel, (String) l.pop());
            }
            return rel;
        }
        l.push(f.getName());
        f = f.getParentFile(); 
    }
    return new File(".");
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:28,代码来源:FileServer.java

示例3: createTable

import org.apache.commons.collections.ArrayStack; //导入依赖的package包/类
private void createTable(String tableName, int numCols, boolean createLineage) throws Exception {
    String dbId = getEntityId(DATABASE_TYPE, "name", "Sales");
    Id salesDB = new Id(dbId, 0, DATABASE_TYPE);

    //Create the entity again and schema should return the new schema
    List<Referenceable> columns = new ArrayStack();
    for (int i = 0; i < numCols; i++) {
        columns.add(column("col" + random(), "int", "column descr"));
    }

    Referenceable sd =
            storageDescriptor("hdfs://host:8000/apps/warehouse/sales", "TextInputFormat", "TextOutputFormat", true,
                    ImmutableList.of(column("time_id", "int", "time id")));

    Id table = table(tableName, "test table", salesDB, sd, "fetl", "External", columns);
    if (createLineage) {
        Id inTable = table("table" + random(), "test table", salesDB, sd, "fetl", "External", columns);
        Id outTable = table("table" + random(), "test table", salesDB, sd, "fetl", "External", columns);
        loadProcess("process" + random(), "hive query for monthly summary", "Tim ETL", ImmutableList.of(inTable),
                ImmutableList.of(table), "create table as select ", "plan", "id", "graph", "ETL");
        loadProcess("process" + random(), "hive query for monthly summary", "Tim ETL", ImmutableList.of(table),
                ImmutableList.of(outTable), "create table as select ", "plan", "id", "graph", "ETL");
    }
}
 
开发者ID:apache,项目名称:incubator-atlas,代码行数:25,代码来源:EntityLineageServiceTest.java

示例4: EmailProgressActivitiesProcessor

import org.apache.commons.collections.ArrayStack; //导入依赖的package包/类
public EmailProgressActivitiesProcessor(LearningDesign design, IActivityDAO activityDAO, Map<Long, Integer> numberOfUsersInActivity) {
super(design, activityDAO);
this.numberOfUsersInActivity = numberOfUsersInActivity;
this.activityList = new Vector<EmailProgressActivityDTO>();
this.activityListStack = new ArrayStack(5);
this.currentActivityList = activityList;
depth=0;
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:EmailProgressActivitiesProcessor.java

示例5: ContributeActivitiesProcessor

import org.apache.commons.collections.ArrayStack; //导入依赖的package包/类
public ContributeActivitiesProcessor(LearningDesign design, Long lessonID, IActivityDAO activityDAO,
    ILamsCoreToolService toolService) {
super(design, activityDAO);
this.lessonID = lessonID;
this.toolService = toolService;
this.mainActivityList = new Vector<ContributeActivityDTO>();
this.activityListStack = new ArrayStack(5);
this.currentActivityList = mainActivityList;
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:ContributeActivitiesProcessor.java

示例6: begin

import org.apache.commons.collections.ArrayStack; //导入依赖的package包/类
public void begin(String namespace, String name, Attributes attributes) throws Exception {
    if (attrname != null) {
        attrvalue = attributes.getValue(attrname);
    }
    ArrayStack stack = threadLocal.get();
    stack.push(attrvalue);
    super.begin(namespace, name, attributes);
}
 
开发者ID:blusechen,项目名称:venus,代码行数:9,代码来源:BeanPropertySetterRule.java

示例7: end

import org.apache.commons.collections.ArrayStack; //导入依赖的package包/类
public void end(String namespace, String name) throws Exception {

        super.propertyName = attrvalue;

        end0(namespace, name);
        ArrayStack stack = threadLocal.get();
        stack.pop();
    }
 
开发者ID:blusechen,项目名称:venus,代码行数:9,代码来源:BeanPropertySetterRule.java

示例8: getCurrentServiceMonitor

import org.apache.commons.collections.ArrayStack; //导入依赖的package包/类
public static IServiceMonitor getCurrentServiceMonitor() {
	ArrayStack stack = monitorStack.get();

	if (!stack.isEmpty()) {
		return (IServiceMonitor) stack.peek();
	}

	return null;
}
 
开发者ID:appstatus,项目名称:appstatus,代码行数:10,代码来源:ServiceMonitorLocator.java

示例9: initialValue

import org.apache.commons.collections.ArrayStack; //导入依赖的package包/类
protected ArrayStack initialValue() {
    return new ArrayStack();
}
 
开发者ID:blusechen,项目名称:venus,代码行数:4,代码来源:BeanPropertySetterRule.java

示例10: initialValue

import org.apache.commons.collections.ArrayStack; //导入依赖的package包/类
@Override
protected ArrayStack initialValue() {
	return new ArrayStack();
}
 
开发者ID:appstatus,项目名称:appstatus,代码行数:5,代码来源:ServiceMonitorLocator.java

示例11: getServiceMonitorStack

import org.apache.commons.collections.ArrayStack; //导入依赖的package包/类
public static ArrayStack getServiceMonitorStack() {
	return monitorStack.get();
}
 
开发者ID:appstatus,项目名称:appstatus,代码行数:4,代码来源:ServiceMonitorLocator.java


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