// **********************************************************************
//
// Generated by the ORBacus IDL to Java Translator
//
// Copyright (c) 2000
// Object Oriented Concepts, Inc.
// Billerica, MA, USA
//
// All Rights Reserved
//
// **********************************************************************

// Version: 4.0.5

package edu.sc.seis.sod.model.seismogram;

//
// IDL:iris.edu/Fissures/IfTimeSeries/TimeSeriesDataSel:1.0
//
/***/

final public class TimeSeriesDataSel 
{
    java.lang.Object _ob_v_;
    boolean _ob_i_;
    int _ob_d_;

    static boolean
    _OB_check(int d0, int d1)
    {
        return d0 == d1;
    }

    public
    TimeSeriesDataSel()
    {
        _ob_i_ = false;
    }

    public TimeSeriesType
    discriminator()
    {
        if(!_ob_i_)
            throw new RuntimeException();

        return TimeSeriesType.from_int(_ob_d_);
    }

    public short[]
    sht_values()
    {
        if(!_ob_i_)
            throw new RuntimeException();

        if(!_OB_check(_ob_d_, TimeSeriesType._TYPE_SHORT))
            throw new RuntimeException();

        return (short[])_ob_v_;
    }

    public void
    sht_values(short[] val)
    {
        _ob_i_ = true;
        _ob_d_ = TimeSeriesType._TYPE_SHORT;
        _ob_v_ = val;
    }

    public int[]
    int_values()
    {
        if(!_ob_i_)
            throw new RuntimeException();

        if(!_OB_check(_ob_d_, TimeSeriesType._TYPE_LONG))
            throw new RuntimeException();

        return (int[])_ob_v_;
    }

    public void
    int_values(int[] val)
    {
        _ob_i_ = true;
        _ob_d_ = TimeSeriesType._TYPE_LONG;
        _ob_v_ = val;
    }

    public float[]
    flt_values()
    {
        if(!_ob_i_)
            throw new RuntimeException();

        if(!_OB_check(_ob_d_, TimeSeriesType._TYPE_FLOAT))
            throw new RuntimeException();

        return (float[])_ob_v_;
    }

    public void
    flt_values(float[] val)
    {
        _ob_i_ = true;
        _ob_d_ = TimeSeriesType._TYPE_FLOAT;
        _ob_v_ = val;
    }

    public double[]
    dbl_values()
    {
        if(!_ob_i_)
            throw new RuntimeException();

        if(!_OB_check(_ob_d_, TimeSeriesType._TYPE_DOUBLE))
            throw new RuntimeException();

        return (double[])_ob_v_;
    }

    public void
    dbl_values(double[] val)
    {
        _ob_i_ = true;
        _ob_d_ = TimeSeriesType._TYPE_DOUBLE;
        _ob_v_ = val;
    }

    public EncodedData[]
    encoded_values()
    {
        if(!_ob_i_)
            throw new RuntimeException();

        if(!_OB_check(_ob_d_, TimeSeriesType._TYPE_ENCODED))
            throw new RuntimeException();

        return (EncodedData[])_ob_v_;
    }

    public void
    encoded_values(EncodedData[] val)
    {
        _ob_i_ = true;
        _ob_d_ = TimeSeriesType._TYPE_ENCODED;
        _ob_v_ = val;
    }
    
}


