Gets the result of this Union operation (without a copy) and resets this Union to the
virgin state.

@return the result of this Union operation and reset.
18314
public ItemsSketch<T> getResultAndReset() {
    if (gadget_ == null) { return null; } //Intentionally return null here for speed.
    final ItemsSketch<T> hqs = gadget_;
    gadget_ = null;
    return hqs;
  }
1186311
public T copy() {
        T copy = Instantiator.of(type).instantiate();
        return copyInto(copy);
    }
1196578
public ItemsSketch<T> getResult() {
    if (gadget_ == null) {
      return ItemsSketch.getInstance(maxK_, comparator_);
    }
    return ItemsSketch.copy(gadget_); //can't have any externally owned handles.
  }
198783
public Object next()
    {
        String result = null;

        if ( _literal != null )
        {
            result = _literal;
            _literal = null;
        }
        else if ( _token != null )
        {
            result = _token;
            _token = null;
        }
        return result;
    }
589943
public boolean isSingleResult() {
		if (result == null) {
			return false;
		} else {
			if (singleResult == null) {
				if (result.size() == 1 && result.values().iterator().next().size() == 1) {
					singleResult = true;
				} else {
					singleResult = false;
				}
			}
			return singleResult;
		}
	}
79629
public java.lang.String getResult() {
    java.lang.Object ref = result_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        result_ = s;
      }
      return s;
    }
  }
732793
public Matrix getU () {
      Matrix X = MatrixFactory.createMatrix(n,n);
      for (int i = 0; i < n; i++) {
         for (int j = 0; j < n; j++) {
            if (i <= j) {
					X.set(i, j, LU[i][j]);
            }
         }
      }
      return X;
   }
992550
public Transformation2D copy() {
		Transformation2D result = new Transformation2D();
		result.xx = xx;
		result.xy = xy;
		result.xd = xd;
		result.yx = yx;
		result.yy = yy;
		result.yd = yd;
		return result;
	}
1296498
public final T clear()
  {
    T hold;
    _lock.lock();
    try
    {
      hold = _val;
      _val = null;
    } finally {
      _lock.unlock();
    }
    return hold;
  }
550905
public T get() {
        T object;

        while (true) {
            // 1. get the next free object
            int p = m_put.get();
            int g = m_get.get();
            if (g >= p) {
                // get index hits the put index, implying empty pool
                if (p >= LIMIT) {
                    // put pointer wrapped around. rewind both indexes.
                    m_get.set(0);
                    m_put.set(0);
                }
                return null;
            }

            // 2. conquer this cell by incrementing the get index
            if (!m_get.compareAndSet(g, g + 1)) {
                // some other thread got here first. try again.
                continue;
            }

            // 3. retrieve the object at the get index
            int index = g % m_arraySize;
            AtomicReference<T> reference = m_array[index];
            object = reference.get();
            if (object == null) {
                // getting here is rare. it happens when:
                // 1. put() is called on an empty pool (p==g)
                // 2. put() increments the put pointer (p==g+1)
                // 3. get() is called and finds g < p
                // 4. get() takes the object at g (which is null)
                // 5. put() puts the object at g
                continue;
            }

            // 4. change the reference to null so no other get() takes the
            // same element, and no other put() replaces it with another.
            if (reference.compareAndSet(object, null)) {
                return object;
            }

            // getting here is rare. the object that was supposedly conquered
            // locally was either replaced by a different object or replaced
            // with null, in the same cell.
        }
    }
1044085
public T get() throws E {
		// use a temporary variable to reduce the number of reads of the volatile field
		// see commons-lang3
		T result = object;
		if (object == null) {
			synchronized (this) {
				result = object;
				if (object == null) {
					object = result = initializer.get();
				}
			}
		}
		return result;
	}
858229
@Override
    public int getSuccessCount() {
        int success = 0;
        for (Future<Boolean> future : futures) {
            try {
                if (future.isDone() && future.get().equals(Boolean.TRUE)) {
                    success++;
                }
            } catch (Exception e) {
                log.error(e.getMessage(), e);
            }
        }
        return success;
    }
1323488
ResultAction executeOperation() {

        assert isControllingThread();
        try {
            /** Execution has begun */
            executing = true;

            processStages();

            if (resultAction == ResultAction.KEEP) {
                report(MessageSeverity.INFO, ControllerLogger.ROOT_LOGGER.operationSucceeded());
            } else {
                report(MessageSeverity.INFO, ControllerLogger.ROOT_LOGGER.operationRollingBack());
            }
        } catch (RuntimeException e) {
            handleUncaughtException(e);
            ControllerLogger.MGMT_OP_LOGGER.unexpectedOperationExecutionException(e, controllerOperations);
        } finally {
            // On failure close any attached response streams
            if (resultAction != ResultAction.KEEP && !isBooting()) {
                synchronized (this) {
                    if (responseStreams != null) {
                        int i = 0;
                        for (OperationResponse.StreamEntry is : responseStreams.values()) {
                            try {
                                is.getStream().close();
                            } catch (Exception e) {
                                ControllerLogger.MGMT_OP_LOGGER.debugf(e, "Failed closing stream at index %d", i);
                            }
                            i++;
                        }
                        responseStreams.clear();
                    }
                }
            }
        }


        return resultAction;
    }
758214
public int[] get() {
		if (capacity < buffer.size()) {
			capacity = buffer.size();
		}
		int[] res = buffer.toArray();
		buffer.clear(capacity);
		return res;
	}
582006
@Override
	public double getAverage() {
		if(isDeterministic()) {
			return valueIfNonStochastic;
		}
		if(size() == 0) {
			return Double.NaN;
		}

		return getRealizationsStream().sum()/size();
	}
363882
public Future<?> future() {
    Future<?> f = future;
    if (f == null) {
      throw new IllegalStateException(
          "Result.future() can only be called if type() is DETACH, type was: " + type);
    }
    return f;
  }
848465
public EndState getEndState() {
        EndState result = EndState.PASSED;
        for ( ScenarioToken s : scenarios) {
            if ( s.getEndState() == EndState.FAILED) {
                result = EndState.FAILED;
                break;
            }
        }

        if ( result != EndState.FAILED) {
            for ( ScenarioToken s : scenarios) {
                if ( s.getEndState() == EndState.PENDING) {
                    result = EndState.PENDING;
                }
            }
        }
        return result;
    }