Returns true only if the set has changed.

@param before the value before change
@param after the value after change
@return true if value changed, else false
179291
public static boolean valueChanged(Set<?> before, Set<?> after) {
        if ((before == null && after == null) || after == null) {
            return false;
        }
        if (before == null) {
            if (after.isEmpty()) {
                return false;
            } else {
                return true;
            }
        } else {
            if (before.size() != after.size()) {
                return true;
            }
            for (Object bean : after) {
                if (!before.contains(bean)) {
                    return true;
                }
            }
        }
        return false;
    }
36605
def changed(self, *value):
        """"""
        if self._last_checked_value != value:
            self._last_checked_value = value
            return True
        return False
751689
static boolean isAfter(Date a, Date b) {
        return a == null || (b != null && b.after(a));
    }
1029155
public boolean compareAndSet(T expectedState, T newState)
    {
        checkState(!Thread.holdsLock(lock), "Can not set state while holding the lock");
        requireNonNull(expectedState, "expectedState is null");
        requireNonNull(newState, "newState is null");

        FutureStateChange<T> futureStateChange;
        ImmutableList<StateChangeListener<T>> stateChangeListeners;
        synchronized (lock) {
            if (!state.equals(expectedState)) {
                return false;
            }

            // change to same state is not a change, and does not notify the notify listeners
            if (state.equals(newState)) {
                return false;
            }

            checkState(!isTerminalState(state), "%s can not transition from %s to %s", name, state, newState);

            state = newState;

            futureStateChange = this.futureStateChange.getAndSet(new FutureStateChange<>());
            stateChangeListeners = ImmutableList.copyOf(this.stateChangeListeners);

            // if we are now in a terminal state, free the listeners since this will be the last notification
            if (isTerminalState(state)) {
                this.stateChangeListeners.clear();
            }
        }

        fireStateChanged(newState, futureStateChange, stateChangeListeners);
        return true;
    }
1173308
public boolean getAndSet(boolean newValue) {
        boolean oldValue = value.getAndSet(newValue);
        // did the state change?
        if (oldValue != newValue)
            valueTime = System.currentTimeMillis();
        return oldValue;
    }
563864
@Override
  public boolean isAcceptableChange(
      Changes changes, Tree node, MethodSymbol symbol, VisitorState state) {
    return findArgumentsForOtherInstances(symbol, node, state).stream()
        .allMatch(arguments -> !anyArgumentsMatch(changes.changedPairs(), arguments));
  }
158977
public boolean isForeignKeyChanged() {
        return CollectionUtils.exists(differences.values(), new Predicate() {
            @Override
            public boolean evaluate(Object object) {
                return ((ModelDiffEntry) object).isForeignKey();
            }
        });
    }
5727
def _has_changed(instance):
    
    for field, value in instance._original_fields.items():
        if field != 'pk' and \
           not isinstance(instance._meta.get_field(field), ManyToManyField):
            try:
                if field in getattr(instance, '_tracked_fields', []):
                    if isinstance(instance._meta.get_field(field), ForeignKey):
                        if getattr(instance, '{0}_id'.format(field)) != value:
                            return True
                    else:
                        if getattr(instance, field) != value:
                            return True
            except TypeError:
                # Can't compare old and new value, should be different.
                return True
    return False
129039
public final boolean nextOneRow(BitSet columns, boolean after) {
        final boolean hasOneRow = buffer.hasRemaining();

        if (hasOneRow) {
            int column = 0;

            for (int i = 0; i < columnLen; i++)
                if (columns.get(i)) {
                    column++;
                }

            if (after && partial) {
                partialBits.clear();
                long valueOptions = buffer.getPackedLong();
                int PARTIAL_JSON_UPDATES = 1;
                if ((valueOptions & PARTIAL_JSON_UPDATES) != 0) {
                    partialBits.set(1);
                    buffer.forward((jsonColumnCount + 7) / 8);
                }
            }
            nullBitIndex = 0;
            nullBits.clear();
            buffer.fillBitmap(nullBits, column);

        }
        return hasOneRow;
    }
845465
public boolean after(JKTimeObject thareTime) {
		if (getYear() == thareTime.getYear() || thareTime.getYear() > getYear()) {
			System.out.println("after:: Year true");
			if (thareTime.getMonth() < getMonth()) {
				return true;
			}
			if (getMonth() == thareTime.getMonth()) {
				System.out.println("after:: Month true");
				if (thareTime.getDay() < getDay()) {
					System.out.println("after:: Day true");
					return true;
				}
				if (getDay() == thareTime.getDay()) {
					if (getHour() == thareTime.getHour()) {
						if (thareTime.getMunite() < getMunite()) {
							return true;
						}
					}
					if (getHour() > thareTime.getHour()) {
						return true;
					}
				}
			}
		}
		return false;

	}
539109
function IfStatement(node) {
    if (t.isBlockStatement(node.consequent)) {
      return {
        before: true,
        after: true
      };
    }
  }
1095041
public static Betner before(String target, String separator) {
		return betn(target).before(separator);
	}
429123
def later_than(after, before):
    
    if isinstance(after, str):
        after = str_to_time(after)
    elif isinstance(after, int):
        after = time.gmtime(after)

    if isinstance(before, str):
        before = str_to_time(before)
    elif isinstance(before, int):
        before = time.gmtime(before)

    return after >= before
1207052
@Override
	public boolean setPrevJob(String prevJob) {
		if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("set previous job : %s", prevJob));
		this.prevJob = prevJob;
		return true;
	}
722911
public S setBefore(int rightIndex) {
		return set(Indexer.of(delegate.get()).before(rightIndex));
	}
1284108
def _before_after(n_samples):
    """"""
    if not isinstance(n_samples, (tuple, list)):
        before = n_samples // 2
        after = n_samples - before
    else:
        assert len(n_samples) == 2
        before, after = n_samples
        n_samples = before + after
    assert before >= 0
    assert after >= 0
    assert before + after == n_samples
    return before, after
1158171
public function hasChange()
    {
        foreach ($this as $key => $value) {
            if ($this->isAdded || $this->isDeleted) {
                return true;
            }

            if (!is_null($value) && $value instanceof ChangeDetector && $value->hasChange()) {
                return true;
            }
        }
        if ($this->hasFromToFields()) {
            // check for change in presence of foreign-constraint
            $fromConstraint = null !== $this->fromField->getForeignConstraint();
            $toConstraint = null !== $this->toField->getForeignConstraint();
            $constraintChange = $fromConstraint != $toConstraint;
            if ($constraintChange) {
                return true;
            }
        }

        return false;
    }