Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
implement Java 17 j.u.r.RandomGenerator#isDeprecated()
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-zobel committed Sep 18, 2021
1 parent ee9d354 commit aa1d002
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/main/java/java8/util/SplittableRandom.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -845,6 +845,26 @@ public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound)
false);
}

/**
* Return true if the implementation of RandomGenerator (algorithm) has been
* marked for deprecation.
*
* <p><b>Implementation Requirements:</b><br>
* Random number generator algorithms evolve over time; new
* algorithms will be introduced and old algorithms will
* lose standing. If an older algorithm is deemed unsuitable
* for continued use, it will be marked as deprecated to indicate
* that it may be removed at some point in the future.
*
* @return true if the implementation of RandomGenerator (algorithm) has been
* marked for deprecation
*
* @since 17
*/
public boolean isDeprecated() {
return false;
}

/**
* Spliterator for int streams. We multiplex the four int
* versions into one class by treating a bound less than origin as
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/java8/util/concurrent/ThreadLocalRandom.java
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,26 @@ public DoubleStream doubles(double randomNumberOrigin, double randomNumberBound)
false);
}

/**
* Return true if the implementation of RandomGenerator (algorithm) has been
* marked for deprecation.
*
* <p><b>Implementation Requirements:</b><br>
* Random number generator algorithms evolve over time; new
* algorithms will be introduced and old algorithms will
* lose standing. If an older algorithm is deemed unsuitable
* for continued use, it will be marked as deprecated to indicate
* that it may be removed at some point in the future.
*
* @return true if the implementation of RandomGenerator (algorithm) has been
* marked for deprecation
*
* @since 17
*/
public boolean isDeprecated() {
return false;
}

/**
* Spliterator for int streams. We multiplex the four int
* versions into one class by treating a bound less than origin as
Expand Down

0 comments on commit aa1d002

Please sign in to comment.