Report whether a polled sample of the variable is {@code true}.
518391
public boolean the(Sampler<Boolean> variable, Ticker ticker) {
        return the(variable, ticker, isQuietlyTrue());
    }
892737
private static boolean hasTypeVariables(final Type type) {
        if (type instanceof TypeVariable<?> || type instanceof GenericArrayType) {
            return true;
        } else if (type instanceof ParameterizedType) {
            for (final Type arg : ((ParameterizedType) type).getActualTypeArguments()) {
                if (hasTypeVariables(arg)) {
                    return true;
                }
            }
        }
        return false;
    }
1077737
public boolean isApplicable( VarValueDef value)
    {
    return
      value.isNA()
      ? isOptional()
      : getValue( value.getName()) != null;
    }
1023434
public boolean sendSample(SampleMessage sampleMessage) {
    if (!this.canSendSamples) {
      log.warn("Cannot send samples.");
      return false;
    }

    if (this.session.getScheduledWriteMessages() > this.maxOutstandingSamples) {
      log.warn("Buffer full, cannot send sample.");
      return false;
    }
    this.session.write(sampleMessage);
    return true;
  }
597114
protected boolean sample() {
        if (curr.increment() >= freq) {
            curr.set(0);
            target.set(rand.nextInt(freq));
        }
        return curr.get() == target.get();
    }
145611
private boolean rule5(double sample) {
        if (!hasMean()) {
            return false;
        }

        if (rule5LastThree.size() == 3) {
            switch (rule5LastThree.removeLast()) {
                case ">":
                    --rule5Above;
                    break;
                case "<":
                    --rule5Below;
                    break;
            }
        }
        if (Math.abs(sample - mean.getResult()) > twoDeviations) {
            if (sample > mean.getResult()) {
                ++rule5Above;
                rule5LastThree.push(">");
            } else {
                ++rule5Below;
                rule5LastThree.push("<");
            }
        } else {
            rule5LastThree.push("");
        }

        return rule5Above >= 2 || rule5Below >= 2;
    }
680321
@Override
  public final void sample()
  {
    synchronized (_lock) {
      long count = _count.get();
      long lastCount = _lastAvgCount;
      _lastAvgCount = count;

      long sum = _sum.get();
      double lastSum = _lastAvgSum;
      _lastAvgSum = sum;

      if (count == lastCount)
        _value = 0;
      else
        _value = _scale * (sum - lastSum) / (double) (count - lastCount);
    }
  }
1107342
public final void sample()
  {
    synchronized (_lock) {
      long count = _totalCount.get();
      long lastCount = _lastAvgTotalCount;
      _lastAvgTotalCount = count;

      long sum = _sum.get();
      double lastSum = _lastAvgSum;
      _lastAvgSum = sum;

      if (count == lastCount) {
        _avg =  0;
      }
      else {
        _avg = _scale * (sum - lastSum) / (double) (count - lastCount);
      }
    }
  }
280629
@Override
  public final void sample()
  {
    long count = _count.getAndSet(0);
    long time = _time.getAndSet(0);

    if (count == 0)
      _value = 0;
    else
      _value = time / (double) count;
  }
843652
private static boolean sample(Set<Long> rootIds) {
        if (Double.compare(sampleRate, 1.0d) >= 0)
            return true;
        int threshold = (int) (sampleRate * PRECISION);
        for (Long id : rootIds) {
            int mod = (int) (Math.abs(id) % PRECISION);
            if (mod < threshold) {
                return true;
            }
        }
        return false;
    }
278970
def has_variable?(var)
      @stack.reverse_each do |scope|
        if SCOPE_BLOCKER_9000 == scope
          return false
        elsif scope.include?(var)
          return true
        end
      end
    end
737951
public boolean isTrue(ExecutionProperty property) {
        return isSet(property) && propertyMap.get(property).size() == 1
            && "true".equalsIgnoreCase(propertyMap.get(property).get(0));
    }
769984
public function shouldSample()
    {
        foreach ($this->samplers as $sampler) {
            if ($sampler->shouldSample() === false) {
                return false;
            }
        }
        return true;
    }
1179467
public boolean isSelected() {

        Boolean value = (Boolean) getValue();
        if (value != null) {
            return (value.booleanValue());
        } else {
            return (false);
        }

    }
659644
@Override
  public final void sample()
  {
    long totalCount = _totalCount.get();
    long lastTotal = _lastTotal;
    _lastTotal = totalCount;

    _value = totalCount - lastTotal;
  }
1023861
private static boolean sample(Long rootId) {
        if (Double.compare(sampleRate, 1.0d) >= 0)
            return true;
        int mod = (int) (Math.abs(rootId) % PRECISION);
        int threshold = (int) (sampleRate * PRECISION);
        return mod < threshold;
    }
720960
public void assertThat(Ticker ticker, Sampler<Boolean> variable) {
        assertThat(variable, ticker, isQuietlyTrue());
    }