Verifies whether all expected challenges have been answered, or not.

@return <code>true</code> if all answers have been submitted, otherwise <code>false</code>.
@throws JSONException
775327
public boolean isAnswersFilled() throws JSONException {
        if (answers == null) {
            return true;
        }

        Iterator<String> it = answers.keys();
        while (it.hasNext()) {
            String key = it.next();
            Object value = answers.get(key);

            if ((value instanceof String) && value.equals("")) {
                return false;
            }
        }

        return true;
    }
28280
public static boolean allJSONArrays(JSONArray array) throws JSONException {
        for (int i = 0; i < array.length(); ++i) {
            if (!(array.get(i) instanceof JSONArray)) {
                return false;
            }
        }
        return true;
    }
1122015
public synchronized boolean fail(ServiceException ex) {
        if (completed) {
            return false;
        }
        this.completed = true;
        this.ex = ex;
        notifyAll();
        return true;
    }
495063
public static boolean isValid(final String json) {
        if (Strings.isEmpty(json)) {
            return false;
        }

        try {
            return parse(json) != null;
        } catch (ParseException e) {
            return false;
        }
    }
1176669
@Override
    public boolean hasNext() {
        if (!members.hasNext()) {
            try {
                getNextEntries();
            } catch (final Exception ignored) {
                LOG.error("An error occured while getting next entries", ignored);
            }
        }
        return members.hasNext();
    }
19010
public boolean isResult() {
        if (StringUtils.isNotBlank(serverResponse)) {
            try {
                return fromJson.castTo(Result.class) != null;
            } catch (Exception e) {
                log.warn("isResult: exception occurred - {}", e);
            }
        }
        return false;
    }
157758
boolean term(Object o) throws JSONException {
		boolean result = false;
		for (int i = 0; o != null && i < getChildrenCount(); ++i) {
			result = at(i).test(o);
			if (!result) break; // first FALSE stops this eval
		}
		return result;
	}
355175
private void verifyBulkJsonResponse(JSONAware pJsonResponse) throws J4pException {
        if (!(pJsonResponse instanceof JSONArray)) {
            if (pJsonResponse instanceof JSONObject) {
                JSONObject errorObject = (JSONObject) pJsonResponse;

                if (!errorObject.containsKey("status") || (Long) errorObject.get("status") != 200) {
                    throw new J4pRemoteException(null, errorObject);
                }
            }
            throw new J4pException("Invalid JSON answer for a bulk request (expected an array but got a " + pJsonResponse.getClass() + ")");
        }
    }
238659
public boolean isValid() {
        int totalNumberOfColumns = 0;
        Set<Object> columns = new HashSet<>();
        for(Map.Entry<Object, AssociativeArray> entry : internalData.entrySet()) {
            AssociativeArray row = entry.getValue();
            if(columns.isEmpty()) {
                //this is executed only for the first row
                for(Object column : row.internalData.keySet()) {
                    columns.add(column);
                }
                totalNumberOfColumns = columns.size();
            }
            else {
                //validating the columns of next rows based on first column
                if(totalNumberOfColumns!=row.size()) {
                    return false; //if the number of rows do not much then it is invalid
                }
                
                for(Object column : columns) {
                    if(row.containsKey(column)==false) {
                        return false; //if one of the detected columns do not exist, it is invalid
                    }
                }
            }
        }
        return true;
    }
253825
public boolean isBye() {
    if (message == null) {
      return false;
    }

    return (((Request) message).getMethod().equals(Request.BYE));
  }
559503
public function hasErrors() {
    foreach ($this->jsonArray as $error) {
      if ($error['type'] != self::OK)
        return TRUE;
    }
    return FALSE;
  }
430312
private boolean allMatch(final Request request) throws IOException {
        boolean success = true;
        for (final Pass pass : this.all) {
            if (!pass.enter(request).has()) {
                success = false;
                break;
            }
        }
        return success;
    }
1067731
@JsonIgnore
    public boolean isValid() {
        return StringUtils.isNotBlank(getMetadata())
            && StringUtils.isNotBlank(getSigningCertificate())
            && StringUtils.isNotBlank(getSigningKey())
            && StringUtils.isNotBlank(getEncryptionCertificate())
            && StringUtils.isNotBlank(getEncryptionKey());
    }
565325
private static boolean checkSuccess(HttpResponse response, boolean dryRun, TaskListener listener) {
        StatusLine status = response.getStatusLine();
        String content = "";
        try {
            content = ExtractorUtils.entityToString(response.getEntity());
            ExtractorUtils.validateStringNotBlank(content);
            JSONObject json = JSONObject.fromObject(content);
            String message = json.getString("message");
            if (assertResponseStatus(dryRun, listener, status, message)) {
                listener.getLogger().println(message);
                return true;
            }
        } catch (IOException e) {
            String parsingErrorStr = "Failed parsing distribution response";
            if (StringUtils.isNotBlank(content)) {
                parsingErrorStr = ": " + content;
            }
            e.printStackTrace(listener.error(parsingErrorStr));
        }
        return false;
    }
913038
public boolean validateAllFields() {
        final boolean postalCodeValid;

        final String countrySelected = mCountryAutoCompleteTextView.getSelectedCountryCode();
        if (mPostalCodeEditText.getText().toString().isEmpty() &&
                (mOptionalShippingInfoFields.contains(POSTAL_CODE_FIELD) ||
                        mHiddenShippingInfoFields.contains(POSTAL_CODE_FIELD))) {
            postalCodeValid = true;
        } else if (countrySelected.equals(Locale.US.getCountry())) {
            postalCodeValid = CountryUtils.isUSZipCodeValid(mPostalCodeEditText.getText()
                    .toString().trim());
        } else if (countrySelected.equals(Locale.UK.getCountry())) {
            postalCodeValid = CountryUtils.isUKPostcodeValid(mPostalCodeEditText.getText()
                    .toString().trim());
        } else if (countrySelected.equals(Locale.CANADA.getCountry())) {
            postalCodeValid = CountryUtils.isCanadianPostalCodeValid(mPostalCodeEditText.getText()
                    .toString().trim());
        } else if (CountryUtils.doesCountryUsePostalCode(countrySelected)) {
            postalCodeValid = !mPostalCodeEditText.getText().toString().isEmpty();
        } else {
            postalCodeValid = true;
        }
        mPostalCodeEditText.setShouldShowError(!postalCodeValid);

        final boolean requiredAddressLine1Empty = mAddressEditText.getText().toString().isEmpty() &&
                !mOptionalShippingInfoFields.contains(ADDRESS_LINE_ONE_FIELD) &&
                !mHiddenShippingInfoFields.contains(ADDRESS_LINE_ONE_FIELD);
        mAddressEditText.setShouldShowError(requiredAddressLine1Empty);

        final boolean requiredCityEmpty = mCityEditText.getText().toString().isEmpty() &&
                !mOptionalShippingInfoFields.contains(CITY_FIELD) && !mHiddenShippingInfoFields
                .contains(CITY_FIELD);
        mCityEditText.setShouldShowError(requiredCityEmpty);

        final boolean requiredNameEmpty = mNameEditText.getText().toString().isEmpty();
        mNameEditText.setShouldShowError(requiredNameEmpty);

        final boolean requiredStateEmpty = mStateEditText.getText().toString().isEmpty() &&
                !mOptionalShippingInfoFields.contains(STATE_FIELD) && !mHiddenShippingInfoFields
                .contains(STATE_FIELD);
        mStateEditText.setShouldShowError(requiredStateEmpty);

        final boolean requiredPhoneNumberEmpty =
                mPhoneNumberEditText.getText().toString().isEmpty() &&
                        !mOptionalShippingInfoFields.contains(PHONE_FIELD) &&
                        !mHiddenShippingInfoFields.contains(PHONE_FIELD);
        mPhoneNumberEditText.setShouldShowError(requiredPhoneNumberEmpty);

        return postalCodeValid && !requiredAddressLine1Empty && !requiredCityEmpty &&
                !requiredStateEmpty && !requiredNameEmpty && !requiredPhoneNumberEmpty;
    }
856836
@Override
	public boolean validate() {
		if (searchGeometry == null) {
			SC.say(messages.geometricSearchWidgetTitle(), messages.geometricSearchWidgetNoGeometry());
			return false;
		} else if (SearchCommService.getVisibleServerLayerIds(mapWidget.getMapModel()).size() < 1) {
			SC.say(messages.geometricSearchWidgetTitle(), messages.geometricSearchWidgetNoLayers());
			return false;
		} else {
			return true;
		}
	}
689336
public static boolean allJSONObjects(JSONArray array) throws JSONException {
        for (int i = 0; i < array.length(); ++i) {
            if (!(array.get(i) instanceof JSONObject)) {
                return false;
            }
        }
        return true;
    }