Skip to content

Commit

Permalink
Merge pull request ReactiveX#1806 from benjchristensen/remove-utilities
Browse files Browse the repository at this point in the history
Remove Unnecessary Utilities
  • Loading branch information
benjchristensen committed Oct 29, 2014
2 parents 03295a2 + ebaf9a1 commit 7aadeb9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 109 deletions.
54 changes: 0 additions & 54 deletions src/main/java/rx/functions/Actions.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,60 +90,6 @@ public void call(Object... args) {
}
}

/**
* Extracts a method reference to the Observer's {@link Observer#onNext onNext} method in the form of an
* {@link Action1}.
* <p>Java 8: observer::onNext</p>
*
* @param observer
* the {@link Observer} to use
* @return an action which calls observer's {@code onNext} method.
*/
public static <T> Action1<T> onNextFrom(final Observer<T> observer) {
return new Action1<T>() {
@Override
public void call(T t1) {
observer.onNext(t1);
}
};
}

/**
* Extracts a method reference to the Observer's {@link Observer#onError(java.lang.Throwable) onError}
* method in the form of an {@link Action1}.
* <p>Java 8: observer::onError</p>
*
* @param observer
* the {@link Observer} to use
* @return an action which calls observer's {@code onError} method.
*/
public static <T> Action1<Throwable> onErrorFrom(final Observer<T> observer) {
return new Action1<Throwable>() {
@Override
public void call(Throwable t1) {
observer.onError(t1);
}
};
}

/**
* Extracts a method reference to the Observer's {@link Observer#onCompleted() onCompleted} method in the
* form of an {@link Action0}.
* <p>Java 8: observer::onCompleted</p>
*
* @param observer
* the {@link Observer} to use
* @return an action which calls observer's {@code onCompleted} method.
*/
public static <T> Action0 onCompletedFrom(final Observer<T> observer) {
return new Action0() {
@Override
public void call() {
observer.onCompleted();
}
};
}

/**
* Converts an {@link Action0} to a function that calls the action and returns {@code null}.
*
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/rx/functions/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,6 @@ public Void call(Object... args) {
};
}

/**
* Constructs a predicate that returns true for each input for which the source predicate returns false, and
* vice versa.
*
* @param predicate
* the source predicate to negate
* @return a function that returns a Boolean that represents an inversion of the logical effect of
* {@code predicate}
*/
public static <T> Func1<T, Boolean> not(Func1<? super T, Boolean> predicate) {
return new Not<T>(predicate);
}

/**
* Returns a function that always returns {@code true}.
*
Expand Down
42 changes: 0 additions & 42 deletions src/main/java/rx/functions/Not.java

This file was deleted.

0 comments on commit 7aadeb9

Please sign in to comment.