Java 类org.apache.commons.collections.SequencedHashMap 实例源码

项目:gumtree-spoon-ast-diff    文件:right_IssueSearch_1.66.java   
private List getTextAttributeValues(boolean quickSearchOnly)
    throws Exception
{
    SequencedHashMap searchValues = getCommonAttributeValuesMap();
    List searchAttributes = new ArrayList(searchValues.size());

    for ( int i=0; i<searchValues.size(); i++ ) 
    {
        AttributeValue searchValue = 
            (AttributeValue)searchValues.getValue(i);
        if ( (!quickSearchOnly || searchValue.isQuickSearchAttribute())
             && searchValue.getAttribute().isTextAttribute() ) 
        {
            searchAttributes.add(searchValue);
        }
    }

    return searchAttributes;
}
项目:gumtree-spoon-ast-diff    文件:right_IssueSearch_1.66.java   
/**
 * Returns OptionAttributes which have been marked for Quick search.
 *
 * @return a <code>List</code> value
 * @exception Exception if an error occurs
 */
private List getOptionAttributeValues(boolean quickSearchOnly)
    throws Exception
{
    SequencedHashMap searchValues = getCommonAttributeValuesMap();
    List searchAttributeValues = new ArrayList(searchValues.size());

    for ( int i=0; i<searchValues.size(); i++ ) 
    {
        AttributeValue searchValue = 
            (AttributeValue)searchValues.getValue(i);
        if ( (!quickSearchOnly || searchValue.isQuickSearchAttribute())
             && searchValue instanceof OptionAttribute ) 
        {
            searchAttributeValues.add(searchValue);
        }
    }

    return searchAttributeValues;
}
项目:gumtree-spoon-ast-diff    文件:left_IssueSearch_1.65.java   
private List getTextAttributeValues(boolean quickSearchOnly)
    throws Exception
{
    SequencedHashMap searchValues = getCommonAttributeValuesMap();
    List searchAttributes = new ArrayList(searchValues.size());

    for ( int i=0; i<searchValues.size(); i++ ) 
    {
        AttributeValue searchValue = 
            (AttributeValue)searchValues.getValue(i);
        if ( (!quickSearchOnly || searchValue.isQuickSearchAttribute())
             && searchValue.getAttribute().isTextAttribute() ) 
        {
            searchAttributes.add(searchValue);
        }
    }

    return searchAttributes;
}
项目:gumtree-spoon-ast-diff    文件:left_IssueSearch_1.65.java   
/**
 * Returns OptionAttributes which have been marked for Quick search.
 *
 * @return a <code>List</code> value
 * @exception Exception if an error occurs
 */
private List getOptionAttributeValues(boolean quickSearchOnly)
    throws Exception
{
    SequencedHashMap searchValues = getCommonAttributeValuesMap();
    List searchAttributeValues = new ArrayList(searchValues.size());

    for ( int i=0; i<searchValues.size(); i++ ) 
    {
        AttributeValue searchValue = 
            (AttributeValue)searchValues.getValue(i);
        if ( (!quickSearchOnly || searchValue.isQuickSearchAttribute())
             && searchValue instanceof OptionAttribute ) 
        {
            searchAttributeValues.add(searchValue);
        }
    }

    return searchAttributeValues;
}
项目:parabuild-ci    文件:SessionImpl.java   
private void initTransientState() {
    executions = new ArrayList(50);
    batchLoadableEntityKeys = new SequencedHashMap(30);
    loadingCollections = new HashMap();
    nonlazyCollections = new ArrayList(20);

    batcher = factory.isJdbcBatchUpdateEnabled() ?
        (Batcher) new BatchingBatcher(this) :
        (Batcher) new NonBatchingBatcher(this);
}
项目:cacheonix-core    文件:HbmBinder.java   
public static java.util.Map getParameterTypes(Element queryElem) {
    java.util.Map result = new SequencedHashMap();
    Iterator iter = queryElem.elementIterator("query-param");
    while ( iter.hasNext() ) {
        Element element = (Element) iter.next();
        result.put(
                element.attributeValue("name"),
                element.attributeValue("type") 
            );
    }
    return result;
}
项目:ojb    文件:ModelConstraints.java   
/**
 * Gathers the pk fields from the hierarchy of the given class, and copies them into the class.
 * 
 * @param classDef The root of the hierarchy
 * @throws ConstraintException If there is a conflict between the pk fields 
 */
private void ensurePKsFromHierarchy(ClassDescriptorDef classDef) throws ConstraintException
{
    SequencedHashMap pks = new SequencedHashMap();

    for (Iterator it = classDef.getAllExtentClasses(); it.hasNext();)
    {
        ClassDescriptorDef subTypeDef = (ClassDescriptorDef)it.next();

        ArrayList subPKs = subTypeDef.getPrimaryKeys();

        // check against already present PKs
        for (Iterator pkIt = subPKs.iterator(); pkIt.hasNext();)
        {
            FieldDescriptorDef fieldDef   = (FieldDescriptorDef)pkIt.next();
            FieldDescriptorDef foundPKDef = (FieldDescriptorDef)pks.get(fieldDef.getName());

            if (foundPKDef != null)
            {
                if (!isEqual(fieldDef, foundPKDef))
                {
                    throw new ConstraintException("Cannot pull up the declaration of the required primary key "+fieldDef.getName()+
                                                  " because its definitions in "+fieldDef.getOwner().getName()+" and "+
                                                  foundPKDef.getOwner().getName()+" differ");
                }
            }
            else
            {
                pks.put(fieldDef.getName(), fieldDef);
            }
        }
    }

    ensureFields(classDef, pks.values());
}
项目:gumtree-spoon-ast-diff    文件:right_Issue_1.141.java   
/**
 * Describe <code>containsMinimumAttributeValues</code> method here.
 *
 * @return a <code>boolean</code> value
 * @exception Exception if an error occurs
 */
public boolean containsMinimumAttributeValues()
    throws Exception
{
    List attributes = getModule()
        .getRequiredAttributes(getIssueType());

    boolean result = true;
    SequencedHashMap avMap = getModuleAttributeValuesMap();
    Iterator i = avMap.iterator();
    while (i.hasNext()) 
    {
        AttributeValue aval = (AttributeValue)avMap.get(i.next());

        if ( aval.getOptionId() == null && aval.getValue() == null ) 
        {
            for ( int j=attributes.size()-1; j>=0; j-- ) 
            {
                if ( aval.getAttribute().getPrimaryKey().equals(
                     ((Attribute)attributes.get(j)).getPrimaryKey() )) 
                {
                    result = false;
                    break;
                }                    
            }
            if ( !result ) 
            {
                break;
            }
        }
    }

    return result;
}
项目:gumtree-spoon-ast-diff    文件:left_Issue_1.140.java   
/**
 * Describe <code>containsMinimumAttributeValues</code> method here.
 *
 * @return a <code>boolean</code> value
 * @exception Exception if an error occurs
 */
public boolean containsMinimumAttributeValues()
    throws Exception
{
    List attributes = getModule()
        .getRequiredAttributes(getIssueType());

    boolean result = true;
    SequencedHashMap avMap = getModuleAttributeValuesMap();
    Iterator i = avMap.iterator();
    while (i.hasNext()) 
    {
        AttributeValue aval = (AttributeValue)avMap.get(i.next());

        if ( aval.getOptionId() == null && aval.getValue() == null ) 
        {
            for ( int j=attributes.size()-1; j>=0; j-- ) 
            {
                if ( aval.getAttribute().getPrimaryKey().equals(
                     ((Attribute)attributes.get(j)).getPrimaryKey() )) 
                {
                    result = false;
                    break;
                }                    
            }
            if ( !result ) 
            {
                break;
            }
        }
    }

    return result;
}
项目:gumtree-spoon-ast-diff    文件:right_IssueSearch_1.66.java   
public SequencedHashMap getCommonAttributeValuesMap()
    throws Exception
{
    SequencedHashMap result = null;
    if (isXMITSearch()) 
    {
        result = getMITAttributeValuesMap();
    }
    else 
    {
        result = super.getModuleAttributeValuesMap();
    }
    return result;
}
项目:gumtree-spoon-ast-diff    文件:left_IssueSearch_1.65.java   
public SequencedHashMap getCommonAttributeValuesMap()
    throws Exception
{
    SequencedHashMap result = null;
    if (isXMITSearch()) 
    {
        result = getMITAttributeValuesMap();
    }
    else 
    {
        result = super.getModuleAttributeValuesMap();
    }
    return result;
}
项目:cacheonix-core    文件:IdentityMap.java   
/**
 * Return a new instance of this class, with iteration
 * order defined by the order that entries were added
 */
public static Map instantiateSequenced(int size) {
    return new IdentityMap( new SequencedHashMap(size) );
}