protected double getNextFailureLengthSample() {
        double sample;
        if (failureLengthPatternDiscrete_ != null)
        {
            sample = failureLengthPatternDiscrete_.sample();
            return Math.abs(sample);
        }
        else if (failureLengthPatternCont_ != null)
        {
            sample = failureLengthPatternCont_.sample();
            return Math.abs(sample);

        }
        else if (failureLengthPatternVariate_ != null)
        {
            sample = failureLengthPatternVariate_.gen();
            return Math.abs(sample);
        }
        else
            return -1;
    }