//[TestMethod]
        public SpecialStringTest()
        {
            string adl = System.IO.File.ReadAllText(@"..\..\..\..\java-libs\adl-parser\src\test\resources\adl-test-entry.special_string.test.adl");
            se.acode.openehr.parser.ADLParser parser = new se.acode.openehr.parser.ADLParser(adl);

            attributeList = parser.parse().getDefinition().getAttributes();
        }
 /**
  * Constructor that wraps a list.
  * <p>
  * There is no way to reset a ListIterator instance without
  * recreating it from the original source, so the List must be
  * passed in and a reference to it held.
  *
  * @param list the list to wrap
  * @throws NullPointerException if the list it null
  */
 public LoopingListIterator(java.util.List<Object> list)
 {
     if (list == null)
     {
         throw new java.lang.NullPointerException("The list must not be null");
     }
     this.list = list;
     reset();
 }
Пример #3
0
		/// <summary>Constructor</summary>
		/// <param name="context">The context where the View associated with this SimpleAdapter is running
		/// 	</param>
		/// <param name="data">
		/// A List of Maps. Each entry in the List corresponds to one row in the list. The
		/// Maps contain the data for each row, and should include all the entries specified in
		/// "from"
		/// </param>
		/// <param name="resource">
		/// Resource identifier of a view layout that defines the views for this list
		/// item. The layout file should include at least those named views defined in "to"
		/// </param>
		/// <param name="from">
		/// A list of column names that will be added to the Map associated with each
		/// item.
		/// </param>
		/// <param name="to">
		/// The views that should display column in the "from" parameter. These should all be
		/// TextViews. The first N views in this list are given the values of the first N columns
		/// in the from parameter.
		/// </param>
		public SimpleAdapter(android.content.Context context, java.util.List<java.util.Map
			<string, object>> data, int resource, string[] from, int[] to)
		{
			mData = data;
			mResource = mDropDownResource = resource;
			mFrom = from;
			mTo = to;
			mInflater = (android.view.LayoutInflater)context.getSystemService(android.content.Context
				.LAYOUT_INFLATER_SERVICE);
		}
 /**
  * Creates an <code>XPathFilter2ParameterSpec</code>.
  *
  * @param xPathList a list of one or more {@link XPathType} objects. The
  *    list is defensively copied to protect against subsequent modification.
  * @throws ClassCastException if <code>xPathList</code> contains any
  *    entries that are not of type {@link XPathType}
  * @throws IllegalArgumentException if <code>xPathList</code> is empty
  * @throws NullPointerException if <code>xPathList</code> is
  *    <code>null</code>
  */
 public XPathFilter2ParameterSpec(java.util.List<XPathType> xPathList)
 {
     if (xPathList == null) {
     throw new java.lang.NullPointerException("xPathList cannot be null");
     }
     this.xPathList = unmodifiableCopyOfList(xPathList);
     if (this.xPathList.isEmpty()) {
     throw new java.lang.IllegalArgumentException("xPathList cannot be empty");
     }
     // generic using List<XPathType> also remove XPathType checking
 }
Пример #5
0
        /**
         * Constructs a new {@code ProcessBuilder} instance with the specified
         * operating system program and its arguments. Note that the list passed to
         * this constructor is not copied, so any subsequent updates to it are
         * reflected in this instance's state.
         *
         * @param command
         *            the requested operating system program and its arguments.
         * @throws NullPointerException
         *             if {@code command} is {@code null}.
         */
        public ProcessBuilder(java.util.List<String> commandJ)
            : base()
        {
            if (commandJ == null) {
            throw new NullPointerException();
            }
            this.commandJ = commandJ;

            java.lang.SystemJ.getProperties();
            this.environmentJ = // new org.apache.harmony.luni.platform.Environment.EnvironmentMap(
                java.lang.SystemJ.getenv();
        }
 /**
  * Returns a "lazy" list whose elements will be created on demand.
  * <p>
  * When the index passed to the returned list's {@link List#get(int) get}
  * method is greater than the list's size, then the factory will be used
  * to create a new object and that object will be inserted at that index.
  * <p>
  * For instance:
  *
  * <pre>
  * Factory factory = new Factory() {
  *     public Object create() {
  *         return new Date();
  *     }
  * }
  * List lazy = ListUtils.lazyList(new ArrayList(), factory);
  * Object obj = lazy.get(3);
  * </pre>
  *
  * After the above code is executed, <code>obj</code> will contain
  * a new <code>Date</code> instance.  Furthermore, that <code>Date</code>
  * instance is the fourth element in the list.  The first, second,
  * and third element are all set to <code>null</code>.
  *
  * @param list  the list to make lazy, must not be null
  * @param factory  the factory for creating new objects, must not be null
  * @return a lazy list backed by the given list
  * @throws IllegalArgumentException  if the List or Factory is null
  */
 public static java.util.List <Object> lazyList(java.util.List <Object> list, Factory factory)
 {
     return(LazyList.decorate(list, factory));
 }
 /**
  * Returns a typed list backed by the given list.
  * <p>
  * Only objects of the specified type can be added to the list.
  *
  * @param list  the list to limit to a specific type, must not be null
  * @param type  the type of objects which may be added to the list
  * @return a typed list backed by the specified list
  */
 public static java.util.List <Object> typedList(java.util.List <Object> list, java.lang.Class type)
 {
     return(TypedList.decorate(list, type));
 }
 /**
  * Returns an unmodifiable list backed by the given list.
  * <p>
  * This method uses the implementation in the decorators subpackage.
  *
  * @param list  the list to make unmodifiable, must not be null
  * @return an unmodifiable list backed by the given list
  * @throws IllegalArgumentException  if the list is null
  */
 public static java.util.List <Object> unmodifiableList(java.util.List <Object> list)
 {
     return(UnmodifiableList.decorate(list));
 }
 /**
  * Returns a new list containing the second list appended to the
  * first list.  The {@link List#addAll(Collection)} operation is
  * used to append the two given lists into a new list.
  *
  * @param list1  the first list
  * @param list2  the second list
  * @return  a new list containing the union of those lists
  * @throws NullPointerException if either list is null
  */
 public static java.util.List <Object> union(java.util.List <Object> list1, java.util.List <Object> list2)
 {
     java.util.ArrayList <Object> result = new java.util.ArrayList <Object>(list1);
     result.addAll(list2);
     return(result);
 }
Пример #10
0
 /**
  * Constructs a new instance of {@code Service} with the given
  * attributes.
  *
  * @param provider
  *            the provider to which this service belongs.
  * @param type
  *            the type of this service (for example {@code
  *            KeyPairGenerator}).
  * @param algorithm
  *            the algorithm this service implements.
  * @param className
  *            the name of the class implementing this service.
  * @param aliases
  *            {@code List} of aliases for the algorithm name, or {@code
  *            null} if the implemented algorithm has no aliases.
  * @param attributes
  *            {@code Map} of additional attributes, or {@code null} if
  *            this {@code Service} has no attributed.
  * @throws NullPointerException
  *             if {@code provider, type, algorithm} or {@code className}
  *             is {@code null}.
  */
 public Service(Provider provider, String type, String algorithm,
         String className, java.util.List<String> aliases, java.util.Map<String, String> attributes)
 {
     if (provider == null || type == null || algorithm == null
             || className == null)
     {
         throw new java.lang.NullPointerException();
     }
     this.provider = provider;
     this.type = type;
     this.algorithm = algorithm;
     this.className = className;
     this.aliases = aliases;
     this.attributes = attributes;
 }
Пример #11
0
 public CollectingAlertHandler(java.util.List list)
     : this(new com.gargoylesoftware.htmlunit.CollectingAlertHandler(list))
 {
 }
Пример #12
0
 public void testParseEscapedBackslash()
 {
     list = getConstraints(0);
     assertCString(list.get(1), null, new String[] { "any\\thing" }, null);
 }
 /**
  * The equivalent of a default constructor called
  * by any constructor and by <code>readObject</code>.
  */
 protected override void init()
 {
     base.init();
     cursors = new java.util.ArrayList<Object>();
 }
Пример #14
0
 private void InitBlock()
 {
     keyEventQueue = new ArrayList();
     history = new LinkedList();
     cursorTimer = new Timer(400, this);
     lastIncompleteCommand = new System.Text.StringBuilder();
 }
Пример #15
0
 /**
  * Changes the program and arguments of this process builder. Note that the
  * list passed to this method is not copied, so any subsequent updates to it
  * are reflected in this instance's state.
  *
  * @param command
  *            the new operating system program and its arguments.
  * @return this process builder instance.
  * @throws NullPointerException
  *             if {@code command} is {@code null}.
  */
 public ProcessBuilder command(java.util.List<String> commandJ)
 {
     if (commandJ == null) {
     throw new NullPointerException();
     }
     this.commandJ = commandJ;
     return this;
 }
        //-----------------------------------------------------------------------

        /**
         * Returns a new list containing all elements that are contained in
         * both given lists.
         *
         * @param list1  the first list
         * @param list2  the second list
         * @return  the intersection of those two lists
         * @throws NullPointerException if either list is null
         */
        public static java.util.List <Object> intersection(java.util.List <Object> list1, java.util.List <Object> list2)
        {
            java.util.ArrayList <Object> result   = new java.util.ArrayList <Object>();
            java.util.Iterator <Object>  iterator = list2.iterator();

            while (iterator.hasNext())
            {
                Object o = iterator.next();

                if (list1.contains(o))
                {
                    result.add(o);
                }
            }

            return(result);
        }
 /**
  * Constructor that wraps a list.
  *
  * @param list  the list to create a reversed iterator for
  * @throws NullPointerException if the list is null
  */
 public ReverseListIterator(java.util.List <Object> list)
     : base()
 {
     this.list = list;
     iterator  = list.listIterator(list.size());
 }
Пример #18
0
 public void testParseEscapedDoubleQuote()
 {
     list = getConstraints(0);
     assertCString(list.get(0), null, new String[] { "some\"thing" }, null);
 }
 /**
  * Factory method to create a fixed size list.
  *
  * @param list  the list to decorate, must not be null
  * @throws IllegalArgumentException if list is null
  */
 public static java.util.List <Object> decorate(java.util.List <Object> list)
 {
     return(new FixedSizeList(list));
 }
Пример #20
0
 /**
  * Creates a <code>Manifest</code> containing the specified
  * list of {@link Reference}s and optional id.
  *
  * @param references a list of one or more <code>Reference</code>s. The list
  *    is defensively copied to protect against subsequent modification.
  * @param id the id (may be <code>null</code>)
  * @return a <code>Manifest</code>
  * @throws NullPointerException if <code>references</code> is
  *    <code>null</code>
  * @throws IllegalArgumentException if <code>references</code> is empty
  * @throws ClassCastException if <code>references</code> contains any
  *    entries that are not of type {@link Reference}
  */
 public abstract Manifest newManifest(java.util.List <Object> references, String id);
Пример #21
0
 public JShapeContainer()
 {
     lines = new ArrayList();
     shapes = new ArrayList();
     offsetX = offsetY = 0;
 }
Пример #22
0
 /**
  * Creates a <code>SignatureProperty</code> containing the specified
  * list of {@link XMLStructure}s, target URI and optional id.
  *
  * @param content a list of one or more <code>XMLStructure</code>s. The list
  *    is defensively copied to protect against subsequent modification.
  * @param target the target URI of the Signature that this property applies
  *    to
  * @param id the id (may be <code>null</code>)
  * @return a <code>SignatureProperty</code>
  * @throws NullPointerException if <code>content</code> or
  *    <code>target</code> is <code>null</code>
  * @throws IllegalArgumentException if <code>content</code> is empty
  * @throws ClassCastException if <code>content</code> contains any
  *    entries that are not of type {@link XMLStructure}
  */
 public abstract SignatureProperty newSignatureProperty
     (java.util.List <Object> content, String target, String id);
Пример #23
0
 private void InitBlock()
 {
     panels = new LinkedList();
 }
Пример #24
0
 /**
  * Creates a <code>SignatureProperties</code> containing the specified
  * list of {@link SignatureProperty}s and optional id.
  *
  * @param properties a list of one or more <code>SignatureProperty</code>s.
  *    The list is defensively copied to protect against subsequent
  *    modification.
  * @param id the id (may be <code>null</code>)
  * @return a <code>SignatureProperties</code>
  * @throws NullPointerException if <code>properties</code>
  *    is <code>null</code>
  * @throws IllegalArgumentException if <code>properties</code> is empty
  * @throws ClassCastException if <code>properties</code> contains any
  *    entries that are not of type {@link SignatureProperty}
  */
 public abstract SignatureProperties newSignatureProperties
     (java.util.List <Object> properties, String id);
        //-----------------------------------------------------------------------

        /**
         * Returns a synchronized list backed by the given list.
         * <p>
         * You must manually synchronize on the returned buffer's iterator to
         * avoid non-deterministic behavior:
         *
         * <pre>
         * List list = ListUtils.synchronizedList(myList);
         * synchronized (list) {
         *     Iterator i = list.iterator();
         *     while (i.hasNext()) {
         *         process (i.next());
         *     }
         * }
         * </pre>
         *
         * This method uses the implementation in the decorators subpackage.
         *
         * @param list  the list to synchronize, must not be null
         * @return a synchronized list backed by the given list
         * @throws IllegalArgumentException  if the list is null
         */
        public static java.util.List <Object> synchronizedList(java.util.List <Object> list)
        {
            return(SynchronizedList.decorate(list));
        }
Пример #26
0
        private float[] _getFloatData(string itemName, int timeStep, double j, double k, double lat0, double lon0, double dx, double dy)
        {
            float[]        itemFloatData = null;
            object[]       ncVars        = _util.GetVariables();
            ucar.ma2.Array xData         = null;
            ucar.ma2.Array yData         = null;
            ucar.ma2.Array itemData      = null;
            _settings.TimeLayer = timeStep;

            foreach (object ncVar in ncVars)
            {
                ucar.nc2.Variable var     = ((ucar.nc2.Variable)ncVar);
                string            varName = var.getFullName();

                if (varName == _settings.YAxisName)
                {
                    yData = _util.GetAllVariableData(var);
                }
            }

            foreach (object ncVar in ncVars)
            {
                ucar.nc2.Variable var     = ((ucar.nc2.Variable)ncVar);
                string            varName = var.getFullName();

                if (varName == _settings.XAxisName)
                {
                    xData = _util.GetAllVariableData(var);
                }
            }

            foreach (object ncVar in ncVars)
            {
                ucar.nc2.Variable var     = ((ucar.nc2.Variable)ncVar);
                string            varName = var.getFullName();

                if (varName == itemName)
                {
                    java.util.List varDims = ((Variable)var).getDimensions();
                    int            xAxisPosition = -1, yAxisPosition = -1;
                    for (int i = 0; i < varDims.size(); i++)
                    {
                        string dimName = ((Dimension)varDims.get(i)).getName();
                        if (_settings.XAxisDimensionName == dimName)
                        {
                            xAxisPosition = i;
                        }
                        if (_settings.YAxisDimensionName == dimName)
                        {
                            yAxisPosition = i;
                        }
                    }

                    itemData = _util.Get1DVariableData(var, _settings);
                    itemData = _util.ProcessedVariableData(var, itemData);
                    java.util.List ncVarAtt = var.getAttributes();

                    if (!_customDFSGrid)
                    {
                        if (_invertxData && _invertyData)
                        {
                            //invert xData and yData
                            itemFloatData = _util.GetFloatDataInvertXandY(itemData, xData, yData, ncVarAtt, _fdel);
                        }
                        else if (_invertyData)
                        {
                            //invert yData
                            itemFloatData = _util.GetFloatDataInvertY(itemData, xData, yData, ncVarAtt, _fdel);
                        }
                        else if (_invertxData)
                        {
                            //invert xData
                            itemFloatData = _util.GetFloatDataInvertX(itemData, xData, yData, ncVarAtt, _fdel);
                        }
                        else
                        {
                            itemFloatData = _util.GetFloatData(itemData, xData, yData, ncVarAtt, _fdel, xAxisPosition, yAxisPosition);
                        }
                    }
                    else
                    {
                        //reassign data to grid
                        if (yAxisPosition > xAxisPosition)
                        {
                            itemFloatData = _reassignData(itemData, xData, yData, ncVarAtt, _fdel, j, k, lat0, lon0, dx, dy, 0, 1);
                        }
                        else
                        {
                            itemFloatData = _reassignData(itemData, xData, yData, ncVarAtt, _fdel, j, k, lat0, lon0, dx, dy, 1, 0);
                        }
                    }
                }
            }
            return(itemFloatData);
        }
 /**
  * Returns a predicated (validating) list backed by the given list.
  * <p>
  * Only objects that pass the test in the given predicate can be added to the list.
  * Trying to add an invalid object results in an IllegalArgumentException.
  * It is important not to use the original list after invoking this method,
  * as it is a backdoor for adding invalid objects.
  *
  * @param list  the list to predicate, must not be null
  * @param predicate  the predicate for the list, must not be null
  * @return a predicated list backed by the given list
  * @throws IllegalArgumentException  if the List or Predicate is null
  */
 public static java.util.List <Object> predicatedList(java.util.List <Object> list, Predicate predicate)
 {
     return(PredicatedList.decorate(list, predicate));
 }
Пример #28
0
        public float[] _reassignData(ucar.ma2.Array sourceData, ucar.ma2.Array xData, ucar.ma2.Array yData, java.util.List attList, float delVal, double j, double k, double lat0, double lon0, double dx, double dy, int xPosition, int yPosition)
        {
            try
            {
                int            resCount = 0;
                ucar.ma2.Index xIndex   = xData.getIndex();
                ucar.ma2.Index yIndex   = yData.getIndex();

                ucar.ma2.Index resIndex = sourceData.getIndex();
                int[]          resShape = resIndex.getShape();

                List <double> xCoorList = new List <double>();
                for (int xLayerCount = 0; xLayerCount < j; xLayerCount++)
                {
                    double lon = lon0 + xLayerCount * dx;
                    xCoorList.Add(lon);
                }

                List <double> yCoorList = new List <double>();
                for (int yLayerCount = 0; yLayerCount < k; yLayerCount++)
                {
                    double lat = lat0 + yLayerCount * dy;
                    yCoorList.Add(lat);
                }

                //get indexes and values from nc file
                if (resShape.Length > 1)
                {
                    _ncIndexes = _generateNCIndexes(sourceData, xData, yData, xIndex, yIndex, resShape, xPosition, yPosition, attList, xCoorList, yCoorList);
                }
                else
                {
                    _ncIndexes = _generateNCIndexes1D(sourceData, xData, yData, xIndex, yIndex, resShape, xPosition, yPosition, attList, xCoorList, yCoorList);
                }

                //assign values to dfs2 grid
                List <DataIndex> matchedIndex = new List <DataIndex>();

                float[] resfloat = new float[(int)j * (int)k];
                for (int i = 0; i < resfloat.Length; i++)
                {
                    resfloat[i] = delVal;
                }

                int resCountNC = 0;
                for (int i = 0; i < _ncIndexes.Count; i++)
                {
                    List <int> xCounts = new List <int>();
                    for (int a = 0; a < _ncIndexes[i].lonFromDfs.Count; a++)
                    {
                        int xCount = xCoorList.FindIndex(x => x == _ncIndexes[i].lonFromDfs[a]);
                        xCounts.Add(xCount);
                    }

                    List <int> yCounts = new List <int>();
                    for (int a = 0; a < _ncIndexes[i].latFromDfs.Count; a++)
                    {
                        int yCount = yCoorList.FindIndex(x => x == _ncIndexes[i].latFromDfs[a]);
                        yCounts.Add(yCount);
                    }


                    for (int y = 0; y < yCounts.Count; y++)
                    {
                        for (int x = 0; x < xCounts.Count; x++)
                        {
                            resCountNC = (xCounts[x]) +
                                         (yCounts[y]) * (xCoorList.Count);

                            if (resCountNC >= resfloat.Length || resCountNC < 0)
                            {
                                throw new Exception("out of bounds - " + resCountNC.ToString() + " + >= array size of " + resfloat.Length.ToString());
                            }

                            resfloat[resCountNC] = (float)_ncIndexes[i].data;
                        }
                    }
                }

                return(resfloat);
            }
            catch (Exception ex)
            {
                throw new Exception("_reassignData Error: " + ex.Message);
            }
        }
 /**
  * Returns a transformed list backed by the given list.
  * <p>
  * Each object is passed through the transformer as it is added to the
  * List. It is important not to use the original list after invoking this
  * method, as it is a backdoor for adding untransformed objects.
  *
  * @param list  the list to predicate, must not be null
  * @param transformer  the transformer for the list, must not be null
  * @return a transformed list backed by the given list
  * @throws IllegalArgumentException  if the List or Transformer is null
  */
 public static java.util.List <Object> transformedList(java.util.List <Object> list, Transformer transformer)
 {
     return(TransformedList.decorate(list, transformer));
 }
Пример #30
0
        private List <DataIndex> _generateNCIndexes1D(ucar.ma2.Array sourceData, ucar.ma2.Array xData, ucar.ma2.Array yData, ucar.ma2.Index xIndex, ucar.ma2.Index yIndex, int[] resShape, int xPosition, int yPosition, java.util.List attList, List <double> xList, List <double> yList)
        {
            //assuming that the file is 1D with the same lat. or same lon.

            List <DataIndex> ncIndexes = new List <DataIndex>();

            ucar.ma2.Index resIndex = sourceData.getIndex();

            //find closest x and y points
            int[] ydataShape = yData.getShape();
            int[] xdataShape = xData.getShape();

            int yCount = 0; //static

            for (int xCount = 1; xCount < (int)resShape[xPosition]; xCount++)
            {
                double latFromNC         = 0;
                double prevLatFromNC     = 0;
                double prevPrevLatFromNC = 0;
                if (ydataShape.Length == 2)
                {
                    latFromNC     = yData.getDouble(yIndex.set(yCount, xCount));
                    prevLatFromNC = yData.getDouble(yIndex.set(yCount - 1, xCount));
                    if (yCount >= 2)
                    {
                        prevPrevLatFromNC = yData.getDouble(yIndex.set(yCount - 2, xCount));
                    }
                }
                else if (ydataShape.Length == 1)
                {
                    latFromNC = yData.getDouble(yCount);
                }

                double lonFromNC         = 0;
                double prevLonFromNC     = 0;
                double prevPrevLonFromNC = 0;
                if (xdataShape.Length == 2)
                {
                    lonFromNC     = xData.getDouble(xIndex.set(yCount, xCount));
                    prevLonFromNC = xData.getDouble(xIndex.set(yCount, xCount - 1));
                    if (xCount >= 2)
                    {
                        prevPrevLonFromNC = xData.getDouble(xIndex.set(yCount, xCount - 2));
                    }
                }
                else if (xdataShape.Length == 1)
                {
                    lonFromNC = xData.getDouble(xCount);
                }

                int rangeCount = 0;

                if (latFromNC >= yList.Min())
                {
                    rangeCount++;
                }
                if (latFromNC <= yList.Max())
                {
                    rangeCount++;
                }
                if (lonFromNC >= xList.Min())
                {
                    rangeCount++;
                }
                if (lonFromNC <= xList.Max())
                {
                    rangeCount++;
                }


                DataIndex newIndex = new DataIndex();
                newIndex.xIndex     = xCount;
                newIndex.prevXIndex = xCount - 1;
                newIndex.yIndex     = yCount;
                newIndex.prevYIndex = yCount - 1;
                newIndex.nc_X       = lonFromNC;
                newIndex.nc_Y       = latFromNC;
                newIndex.pnc_X      = prevLonFromNC;
                newIndex.pnc_Y      = prevLatFromNC;

                newIndex.data     = sourceData.getDouble(resIndex.set(xCount));
                newIndex.prevData = sourceData.getDouble(resIndex.set(xCount - 1));

                newIndex.lonFromDfs = new List <double>();
                foreach (double xPoint in xList)
                {
                    if (xPoint >= prevLonFromNC && xPoint <= lonFromNC)
                    {
                        newIndex.lonFromDfs.Add(xPoint);
                    }
                    else if (xPoint >= prevPrevLonFromNC && xPoint <= lonFromNC)
                    {
                        newIndex.lonFromDfs.Add(xPoint);
                    }
                    else if (xPoint == lonFromNC)
                    {
                        newIndex.lonFromDfs.Add(xPoint);
                    }
                }

                newIndex.latFromDfs = new List <double>();
                foreach (double yPoint in yList)
                {
                    if (yPoint >= prevLatFromNC && yPoint <= latFromNC)
                    {
                        newIndex.latFromDfs.Add(yPoint);
                    }
                    else if (yPoint >= prevPrevLatFromNC && yPoint <= latFromNC)
                    {
                        newIndex.latFromDfs.Add(yPoint);
                    }
                    else if (yPoint == latFromNC)
                    {
                        newIndex.latFromDfs.Add(yPoint);
                    }
                }

                if (_util.IsValueValid(attList, newIndex.data) && rangeCount == 4)
                {
                    ncIndexes.Add(newIndex);
                }
            }


            return(ncIndexes);
        }
 /**
  * Returns a fixed-sized list backed by the given list.
  * Elements may not be added or removed from the returned list, but
  * existing elements can be changed (for instance, via the
  * {@link List#set(int,Object)} method).
  *
  * @param list  the list whose size to fix, must not be null
  * @return a fixed-size list backed by that list
  * @throws IllegalArgumentException  if the List is null
  */
 public static java.util.List <Object> fixedSizeList(java.util.List <Object> list)
 {
     return(FixedSizeList.decorate(list));
 }
Пример #32
0
 public virtual bool checkPattern(java.util.List <[email protected]
                                                  .Cell> pattern)
 {
     throw new System.NotImplementedException();
 }
        /**
         * Subtracts all elements in the second list from the first list,
         * placing the results in a new list.
         * <p>
         * This differs from {@link List#removeAll(Collection)} in that
         * cardinality is respected; if <Code>list1</Code> contains two
         * occurrences of <Code>null</Code> and <Code>list2</Code> only
         * contains one occurrence, then the returned list will still contain
         * one occurrence.
         *
         * @param list1  the list to subtract from
         * @param list2  the list to subtract
         * @return  a new list containing the results
         * @throws NullPointerException if either list is null
         */
        public static java.util.List <Object> subtract(java.util.List <Object> list1, java.util.List <Object> list2)
        {
            java.util.ArrayList <Object> result   = new java.util.ArrayList <Object>(list1);
            java.util.Iterator <Object>  iterator = list2.iterator();

            while (iterator.hasNext())
            {
                result.remove(iterator.next());
            }

            return(result);
        }
Пример #34
0
 public virtual void saveLockPattern(java.util.List <[email protected]
                                                     .Cell> pattern, bool isFallback)
 {
     throw new System.NotImplementedException();
 }
Пример #35
0
 public static NounPhrase SetSentence(string[] sentence, Tree tree, java.util.List dependencies, string[] target)
 {
     return(new NounPhrase(sentence, tree, dependencies, target));
 }
Пример #36
0
 public static string patternToString(java.util.List <[email protected]
                                                      .Cell> pattern)
 {
     throw new System.NotImplementedException();
 }
 public override java.util.List <Object> subList(int fromIndex, int toIndex)
 {
     java.util.List <Object> sub = getList().subList(fromIndex, toIndex);
     return(new FixedSizeList(sub));
 }
Пример #38
0
 private static byte[] patternToHash(java.util.List <[email protected]
                                                     .Cell> pattern)
 {
     throw new System.NotImplementedException();
 }
        //-----------------------------------------------------------------------

        /**
         * Constructor that wraps (not copies).
         *
         * @param list  the list to decorate, must not be null
         * @throws IllegalArgumentException if list is null
         */
        protected FixedSizeList(java.util.List <Object> list)
            : base(list)
        {
        }
Пример #40
0
 public virtual void setPattern([email protected]
                                displayMode, java.util.List <*****@*****.**> pattern
                                )
 {
     throw new System.NotImplementedException();
 }
 /**
  * Constructor that wraps a list.
  *
  * @param list  the list to create a reversed iterator for
  * @throws NullPointerException if the list is null
  */
 public ReverseListIterator(java.util.List<Object> list)
     : base()
 {
     this.list = list;
     iterator = list.listIterator(list.size());
 }
Пример #42
0
 public WebResponseData(NHtmlUnit.IDownloadedContent responseBody, int statusCode, string statusMessage, java.util.List responseHeaders)
     : this(new com.gargoylesoftware.htmlunit.WebResponseData((com.gargoylesoftware.htmlunit.DownloadedContent)responseBody.WrappedObject, statusCode, statusMessage, responseHeaders))
 {
 }
Пример #43
0
 public WebResponseData(System.Byte[] body, int statusCode, string statusMessage, java.util.List responseHeaders)
     : this(new com.gargoylesoftware.htmlunit.WebResponseData(body, statusCode, statusMessage, responseHeaders))
 {
 }
 /**
  * Returns the sum of the given lists.  This is their intersection
  * subtracted from their union.
  *
  * @param list1  the first list
  * @param list2  the second list
  * @return  a new list containing the sum of those lists
  * @throws NullPointerException if either list is null
  */
 public static java.util.List <Object> sum(java.util.List <Object> list1, java.util.List <Object> list2)
 {
     return(subtract(union(list1, list2), intersection(list1, list2)));
 }
Пример #45
0
 internal java.util.Iterator<String> getAliases()
 {
     if (aliases == null)
     {
         aliases = new java.util.ArrayList<String>(0);
     }
     return aliases.iterator();
 }
 /// <summary>
 /// Formats a phone number in the specified format using client-defined formatting rules. Note that
 /// if the phone number has a country calling code of zero or an otherwise invalid country calling
 /// code, we cannot work out things like whether there should be a national prefix applied, or how
 /// to format extensions, so we return the national significant number with no formatting applied.
 /// </summary>
 /// <param name="numberFormat">the format the phone number should be formatted into</param>
 /// <param name="userDefinedFormats">formatting rules specified by clients</param>
 /// <returns>the formatted phone number</returns>
 public string FormatByPattern(libphonenumber.PhoneNumberUtil.PhoneNumberFormat numberFormat, IEnumerable<NumberFormat> userDefinedFormats)
 {
     java.util.List<_NumberFormat> tempUserDefinedFormats = new java.util.List<_NumberFormat>();
     foreach (var item in userDefinedFormats)
         tempUserDefinedFormats.add(item);
     return _PhoneNumberUtil.getInstance().formatByPattern(_inner, (_PhoneNumberFormat)numberFormat, tempUserDefinedFormats);
 }