code: @Override
  	public RandomVariable add(RandomVariable randomVariable) {
  		if(randomVariable.getTypePriority() > this.getTypePriority()) {
  			// Check type priority
  			return randomVariable.add(this);
  		}
  
  		// Set time of this random variable to maximum of time with respect to which measurability is known.
  		double newTime = Math.max(time, randomVariable.getFiltrationTime());
  
  		if(isDeterministic() && randomVariable.isDeterministic()) {
  			double newValueIfNonStochastic = valueIfNonStochastic + randomVariable.get(0);
  			return new RandomVariableFromDoubleArray(newTime, newValueIfNonStochastic);
  		}
  		else if(isDeterministic()) {
  			double[] newRealizations = new double[Math.max(size(), randomVariable.size())];
  			for(int i=0; i<newRealizations.length; i++) {
  				newRealizations[i]		 = valueIfNonStochastic + randomVariable.get(i);
  			}
  			return new RandomVariableFromDoubleArray(newTime, newRealizations);
  		} else {
  			double[] newRealizations = new double[Math.max(size(), randomVariable.size())];
  			for(int i=0; i<newRealizations.length; i++) {
  				newRealizations[i]		 = realizations[i] + randomVariable.get(i);
  			}
  			return new RandomVariableFromDoubleArray(newTime, newRealizations);
  		}
  	}
docs: /*
  Binary operators: checking for return type priority.