Package simtools.data

Examples of simtools.data.NoSuchIndex


     * @see simtools.data.ValueProvider#getDoubleValue(long)
     */
    public double getDoubleValue(long index) throws DataException {
        if (kind==ValueProvider.LongProvider) return (double)getLongValue(index);
        double ret = dminValue + index * dstep;
        if ((dstep>0) && (ret>dmaxValue)) throw new NoSuchIndex(index);
        if ((dstep<0) && (ret<dmaxValue)) throw new NoSuchIndex(index);
        return ret;
    }
View Full Code Here


    }

    public long getLongValue(long index) throws DataException {
        if (kind==ValueProvider.DoubleProvider) return (long)getDoubleValue(index);
        long ret = lminValue + index * lstep;
        if ((lstep>0) && (ret>lmaxValue)) throw new NoSuchIndex(index);
        if ((lstep<0) && (ret<lmaxValue)) throw new NoSuchIndex(index);
        return ret;
    }
View Full Code Here

     *
     * @see simtools.data.ValueProvider#getValue(long)
     */
    public Object getValue(long index) throws DataException {
        if (_startIndex < 0) {
            throw new NoSuchIndex(index);
        }
        if (index < _startIndex) {
            throw new NoSuchIndex(index);
        }
        if (index > _lastIndex) {
            throw new NoSuchIndex(index);
        }
        return new Double(_v[(int) index % _size]);
    }
View Full Code Here

     *
     * @see simtools.data.ValueProvider#getDoubleValue(long)
     */
    public double getDoubleValue(long index) throws DataException {
        if (_startIndex < 0) {
            throw new NoSuchIndex(index);
        }
        if (index < _startIndex) {
            throw new NoSuchIndex(index);
        }
        if (index > _lastIndex) {
            throw new NoSuchIndex(index);
        }
        return _v[(int) index % _size];
    }
View Full Code Here

         *
         * @see simtools.data.ValueProvider#getValue(long)
         */
        public Object getValue(long index) throws DataException {
            if (_startIndex < 0) {
                throw new NoSuchIndex(index);
            }
            if (index < _startIndex) {
                throw new NoSuchIndex(index);
            }
            if (index > _lastIndex) {
                throw new NoSuchIndex(index);
            }
            if (type.equals("time")) {
                if (_t == null) {
                    throw new DataException();
                }
View Full Code Here

         *
         * @see simtools.data.ValueProvider#getDoubleValue(long)
         */
        public double getDoubleValue(long index) throws DataException {
            if (_startIndex < 0) {
                throw new NoSuchIndex(index);
            }
            if (index < _startIndex) {
                throw new NoSuchIndex(index);
            }
            if (index > _lastIndex) {
                throw new NoSuchIndex(index);
            }
            if (type.equals("time")) {
                return _t[(int) index % _size];
            } else if (type.equals("time2")) {
                return _t2[(int) index % _size];
View Full Code Here

      /* (non-Javadoc)
       * @see simtools.data.ValueProvider#getValue(long)
       */
      public Object getValue(long index) throws DataException {
        if(index<0)
          throw new NoSuchIndex(index);
 
          synchronized (this) {
            // Lock the variables index
            for (Iterator it = variables.iterator(); it.hasNext();) {
                ((VariableAssociation)it.next()).lockIndex(index);
View Full Code Here

         */
        public Object getObjectValue(long index) throws DataException {
            Object res = null;
           
            if(index<startIndex || index>lastIndex){
                throw new NoSuchIndex(index);
            }
           
            long i = parameter.getIndex(index);

            if (parameter.ratio <= 1){
View Full Code Here

        /* (non-Javadoc)
         * @see simtools.data.ValueProvider#getObjectValue(long)
         */
        public Object getObjectValue(long index) throws DataException {
            if(index<startIndex || index>lastIndex){
                throw new NoSuchIndex(index);
            }
            if (_values==null)
                throw new DataException("Null buffer on direct data source " + DataInfo.getId(source));

            return new Double(_values.get((int)index));
View Full Code Here

        /* (non-Javadoc)
         * @see simtools.data.CollectiveDataSource#getDoubleValue(long)
         */
        public double getDoubleValue(long index) throws DataException {
            if(index<startIndex || index>lastIndex){
                throw new NoSuchIndex(index);
            }
            if (_values==null)
                throw new DataException("Null buffer on direct data source " + DataInfo.getId(source));

            return _values.get((int)index);
View Full Code Here

TOP

Related Classes of simtools.data.NoSuchIndex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.