code: @Override
  	public RandomVariable choose(RandomVariable valueIfTriggerNonNegative, RandomVariable valueIfTriggerNegative) {
  		// Set time of this random variable to maximum of time with respect to which measurability is known.
  		double newTime = time;
  		newTime = Math.max(newTime, valueIfTriggerNonNegative.getFiltrationTime());
  		newTime = Math.max(newTime, valueIfTriggerNegative.getFiltrationTime());
  
  		if(isDeterministic()) {
  			if(valueIfNonStochastic >= 0) {
  				return valueIfTriggerNonNegative;
  			} else {
  				return valueIfTriggerNegative;
  			}
  		}
  		else {
  			int numberOfPaths = this.size();
  			float[] newRealizations = new float[numberOfPaths];
  			for(int i=0; i<newRealizations.length; i++) {
  				newRealizations[i] = (float) (realizations[i] >= 0.0 ? valueIfTriggerNonNegative.get(i) : valueIfTriggerNegative.get(i));
  			}
  			return new RandomVariableFromFloatArray(newTime, newRealizations);
  		}
  	}
docs: /*
  Ternary operators: checking for return type priority.
  @TODO add checking for return type priority.