public class Random extends NetObject
.NET documentation at https://learn.microsoft.com/dotnet/api/System.Random
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
|
static java.lang.String |
assemblyShortName
Assembly name: System.Private.CoreLib
|
static java.lang.String |
className
Qualified class name: System.Random
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
Random()
Initializes a new instance by invoking the .NET constructor.
|
Random(int Seed)
Initializes a new instance by invoking the .NET constructor.
|
Random(java.lang.Object instance)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static Random |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into Random, a cast assert is made to check if types are compatible. |
java.lang.String |
getJCOAssemblyName()
Returns the full name of the assembly of the .NET type.
|
java.lang.String |
getJCOClassName()
Returns the full name of the .NET type.
|
java.lang.Object |
getJCOInstance()
Returns the underlying object managed by the bridge.
|
java.lang.String |
getJCOObjectName()
Returns the name of the .NET type qualified with its assembly.
|
JCType |
getJCOType()
Returns the
JCType of the .NET type. |
static Random |
getShared()
Gets the value of the .NET property Shared.
|
int |
Next()
Invokes the .NET member Next.
|
int |
Next(int maxValue)
Invokes the .NET member Next.
|
int |
Next(int minValue,
int maxValue)
Invokes the .NET member Next.
|
void |
NextBytes(byte[] buffer)
Invokes the .NET member NextBytes.
|
void |
NextBytes(JCORefOut dupParam0)
Invokes the .NET member NextBytes.
|
double |
NextDouble()
Invokes the .NET member NextDouble.
|
long |
NextInt64()
Invokes the .NET member NextInt64.
|
long |
NextInt64(long maxValue)
Invokes the .NET member NextInt64.
|
long |
NextInt64(long minValue,
long maxValue)
Invokes the .NET member NextInt64.
|
Single |
NextSingle()
Invokes the .NET member NextSingle.
|
void |
setJCOInstance(JCObject instance)
Sets the underlying object managed by the bridge.
|
<T extends IJCOBridgeReflected> |
Shuffle(T[] values)
Invokes the .NET member Shuffle.
|
public static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public Random()
throws java.lang.Throwable,
PlatformNotSupportedException,
OutOfMemoryException,
InvalidOperationException
java.lang.Throwable - if the .NET constructor failsPlatformNotSupportedException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itInvalidOperationException - if the .NET member raises itpublic Random(int Seed)
throws java.lang.Throwable,
NotSupportedException,
ArgumentException,
OverflowException
Seed - the argument of type intjava.lang.Throwable - if the .NET constructor failsNotSupportedException - if the .NET member raises itArgumentException - if the .NET member raises itOverflowException - if the .NET member raises itpublic Random(java.lang.Object instance)
throws java.lang.Throwable
instance - the underlying bridge object: it must be a JCObjectjava.lang.Throwable - if instance is not a JCObjectpublic static Random cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into Random, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedRandom instancejava.lang.Throwable - in case of error during cast operationpublic java.lang.String getJCOAssemblyName()
NetObjectgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class NetObjectpublic java.lang.String getJCOClassName()
NetObjectgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class NetObjectpublic java.lang.Object getJCOInstance()
NetObjectgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class NetObjectnull if there is nonepublic java.lang.String getJCOObjectName()
NetObjectgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class NetObjectpublic JCType getJCOType()
NetObjectJCType of the .NET type.getJCOType in interface IJCOBridgeReflectedgetJCOType in class NetObjectpublic static Random getShared() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic int Next()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic int Next(int maxValue)
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
ArgumentNullException,
InvalidOperationException,
PlatformNotSupportedException,
ArrayTypeMismatchException,
NotSupportedException,
ObjectDisposedException,
RankException,
IndexOutOfRangeException
maxValue - the argument of type intjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itRankException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic int Next(int minValue,
int maxValue)
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
ArgumentNullException,
InvalidOperationException,
PlatformNotSupportedException,
ArrayTypeMismatchException,
NotSupportedException,
CultureNotFoundException,
ObjectDisposedException
minValue - the argument of type intmaxValue - the argument of type intjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itObjectDisposedException - if the .NET member raises itpublic void NextBytes(byte[] buffer)
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
InvalidOperationException,
PlatformNotSupportedException,
ArrayTypeMismatchException,
NotSupportedException,
ArgumentNullException,
ObjectDisposedException,
RankException,
IndexOutOfRangeException
buffer - the argument of type byte[]java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentNullException - if the .NET member raises itObjectDisposedException - if the .NET member raises itRankException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic void NextBytes(JCORefOut dupParam0) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ArgumentNullException, ObjectDisposedException, RankException, IndexOutOfRangeException
dupParam0 - the argument of type JCORefOutjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentNullException - if the .NET member raises itObjectDisposedException - if the .NET member raises itRankException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic double NextDouble()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic long NextInt64()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic long NextInt64(long maxValue)
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
ArgumentNullException,
InvalidOperationException,
PlatformNotSupportedException,
ArrayTypeMismatchException,
NotSupportedException,
ObjectDisposedException,
RankException,
IndexOutOfRangeException
maxValue - the argument of type longjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itRankException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itpublic long NextInt64(long minValue,
long maxValue)
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
ArgumentNullException,
InvalidOperationException,
PlatformNotSupportedException,
ArrayTypeMismatchException,
NotSupportedException,
CultureNotFoundException,
ObjectDisposedException
minValue - the argument of type longmaxValue - the argument of type longjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itInvalidOperationException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itNotSupportedException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itObjectDisposedException - if the .NET member raises itpublic Single NextSingle() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic void setJCOInstance(JCObject instance)
NetObjectsetJCOInstance in class NetObjectinstance - the new underlying objectpublic <T extends IJCOBridgeReflected> void Shuffle(T[] values) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, FormatException
T - the type of the generic argument Tvalues - the argument of type T[]java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises it