<commit_before><commit_msg>Transferred from the Adobe Open Source Subversion Repository<commit_after>////////////////////////////////////////////////////////////////////////////////
//
//  ADOBE SYSTEMS INCORPORATED
//  Copyright 2009 Adobe Systems Incorporated
//  All Rights Reserved.
//
//  NOTICE: Adobe permits you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////

package mx.olap
{

import mx.collections.IList;
import mx.collections.ArrayCollection;

/**
 *  The OLAPResultAxis class represents an axis of the result of an OLAP query.
 *
 *  @see mx.olap.OLAPQuery
 *  @see mx.olap.OLAPQueryAxis
 *  @see mx.olap.IOLAPResultAxis
 *  @see mx.olap.IOLAPResult
 *  @see mx.olap.OLAPResult
 *  
 *  @langversion 3.0
 *  @playerversion Flash 9
 *  @playerversion AIR 1.1
 *  @productversion Flex 3
 */
public class OLAPResultAxis implements IOLAPResultAxis
{
    include "../core/Version.as";

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------
    
    //----------------------------------
    // positions
    //----------------------------------
    
    private var _positions:IList = new ArrayCollection; //of IOLAPAxisPositions
    
    /**
     *  @inheritDoc
     *  
     *  @langversion 3.0
     *  @playerversion Flash 9
     *  @playerversion AIR 1.1
     *  @productversion Flex 3
     */
    public function get positions():IList
    {
        return _positions;
    }
    
    /**
     *  @private
     */
    public function set positions(value:IList):void
    {
        _positions = value;
    }
    
    //--------------------------------------------------------------------------
    //
    //  Methods
    //
    //--------------------------------------------------------------------------

    /**
     *  Adds a position to the axis of the query result.
     *
     *  @param p The IOLAPAxisPosition instance that represents the position.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 9
     *  @playerversion AIR 1.1
     *  @productversion Flex 3
     */
    public function addPosition(p:IOLAPAxisPosition):void
    {
        _positions.addItem(p);
    }
    
    /**
     *  Removes a position from the axis of the query result.
     *
     *  @param p The IOLAPAxisPosition instance that represents the position.
     *
     *  @return <code>true</code> if the position is removed from the axis, 
     *  and <code>false</code> if not. 
     *  
     *  @langversion 3.0
     *  @playerversion Flash 9
     *  @playerversion AIR 1.1
     *  @productversion Flex 3
     */
    public function removePosition(p:IOLAPAxisPosition):Boolean
    {
        var index:int = _positions.getItemIndex(p);
        if (index != -1)
        {
            _positions.removeItemAt(index);
            return true;
        }
        return false;
    }
    
}
}
{'fraction_non_alphanumeric': 0.25089141004862237, 'fraction_numerical': 0.00940032414910859, 'mean_word_length': 1.2281588447653429, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4939149', 'n_tokens_mistral': 859, 'n_tokens_neox': 817, 'n_words': 215}