All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.Decimal Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2023 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.ValueType;
import system.Single;
import system.UInt32;
import system.UInt64;
import system.Decimal;
import system.globalization.NumberStyles;
import system.IFormatProvider;
import system.IFormatProviderImplementation;
import system.SByte;
import system.MidpointRounding;
import system.TypeCode;
import system.UInt16;
import system.DateTime;
import system.runtime.serialization.SerializationInfo;
import system.runtime.serialization.StreamingContext;
import system.runtime.serialization.ISerializable;
import system.runtime.serialization.ISerializableImplementation;
import system.runtime.serialization.IDeserializationCallback;
import system.runtime.serialization.IDeserializationCallbackImplementation;


/**
 * The base .NET class managing System.Decimal, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e.
 * 

* * .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Decimal *

* * Powered by JCOBridge: more info at https://www.jcobridge.com */ public class Decimal extends ValueType implements system.runtime.serialization.ISerializable, system.runtime.serialization.IDeserializationCallback { /** * Fully assembly qualified name: System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e */ public static final String assemblyFullName = "System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"; /** * Assembly name: System.Private.CoreLib */ public static final String assemblyShortName = "System.Private.CoreLib"; /** * Qualified class name: System.Decimal */ public static final String className = "System.Decimal"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public Decimal(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link Decimal}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link Decimal} instance * @throws java.lang.Throwable in case of error during cast operation */ public static Decimal cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new Decimal(from.getJCOInstance()); } // Constructors section public Decimal() throws Throwable { } public Decimal(double value) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(value)); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Decimal(int lo, int mid, int hi, boolean isNegative, byte scale) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.NotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.RankException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(lo, mid, hi, isNegative, scale)); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Decimal(int value) throws Throwable { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(value)); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Decimal(int[] bits) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject((java.lang.Object)bits)); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Decimal(long value) throws Throwable { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(value)); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Decimal(Single value) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(value == null ? null : value.getJCOInstance())); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Decimal(UInt32 value) throws Throwable { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(value == null ? null : value.getJCOInstance())); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Decimal(UInt64 value) throws Throwable { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(value == null ? null : value.getJCOInstance())); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Methods section public static boolean Equals(Decimal d1, Decimal d2) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (boolean)classType.Invoke("Equals", d1 == null ? null : d1.getJCOInstance(), d2 == null ? null : d2.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean Equals(Decimal value) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("Equals", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static boolean IsCanonical(Decimal value) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException, system.InvalidOperationException, system.IndexOutOfRangeException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (boolean)classType.Invoke("IsCanonical", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static boolean IsEvenInteger(Decimal value) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (boolean)classType.Invoke("IsEvenInteger", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static boolean IsInteger(Decimal value) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (boolean)classType.Invoke("IsInteger", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static boolean IsNegative(Decimal value) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (boolean)classType.Invoke("IsNegative", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static boolean IsOddInteger(Decimal value) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (boolean)classType.Invoke("IsOddInteger", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static boolean IsPositive(Decimal value) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (boolean)classType.Invoke("IsPositive", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static boolean TryParse(java.lang.String s, JCORefOut result) throws Throwable, system.ArgumentNullException, system.globalization.CultureNotFoundException, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.RankException, system.IndexOutOfRangeException, system.ArrayTypeMismatchException, system.TypeInitializationException, system.NotSupportedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (boolean)classType.Invoke("TryParse", s, result.getJCRefOut()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static boolean TryParse(java.lang.String s, NumberStyles style, IFormatProvider provider, JCORefOut result) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (boolean)classType.Invoke("TryParse", s, style == null ? null : style.getJCOInstance(), provider == null ? null : provider.getJCOInstance(), result.getJCRefOut()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static boolean TryParse(java.lang.String s, IFormatProvider provider, JCORefOut result) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.FormatException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (boolean)classType.Invoke("TryParse", s, provider == null ? null : provider.getJCOInstance(), result.getJCRefOut()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static byte ToByte(Decimal value) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException, system.OverflowException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (byte)classType.Invoke("ToByte", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static double ToDouble(Decimal d) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (double)classType.Invoke("ToDouble", d == null ? null : d.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static short ToInt16(Decimal value) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException, system.OverflowException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (short)classType.Invoke("ToInt16", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static int Compare(Decimal d1, Decimal d2) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (int)classType.Invoke("Compare", d1 == null ? null : d1.getJCOInstance(), d2 == null ? null : d2.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int CompareTo(Decimal value) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Invoke("CompareTo", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int CompareTo(NetObject value) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.NotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.RankException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Invoke("CompareTo", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static int Sign(Decimal d) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (int)classType.Invoke("Sign", d == null ? null : d.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static int ToInt32(Decimal d) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OverflowException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (int)classType.Invoke("ToInt32", d == null ? null : d.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static int[] GetBits(Decimal d) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("GetBits", d == null ? null : d.getJCOInstance()); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(resultingObject); } int[] resultingArray = new int[resultingArrayList.size()]; for(int indexGetBits = 0; indexGetBits < resultingArrayList.size(); indexGetBits++ ) { resultingArray[indexGetBits] = (int)resultingArrayList.get(indexGetBits); } return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static long ToInt64(Decimal d) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OverflowException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (long)classType.Invoke("ToInt64", d == null ? null : d.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static long ToOACurrency(Decimal value) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.OverflowException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (long)classType.Invoke("ToOACurrency", value == null ? null : value.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static SByte ToSByte(Decimal value) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException, system.OverflowException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objToSByte = (JCObject)classType.Invoke("ToSByte", value == null ? null : value.getJCOInstance()); return new SByte(objToSByte); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Single ToSingle(Decimal d) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objToSingle = (JCObject)classType.Invoke("ToSingle", d == null ? null : d.getJCOInstance()); return new Single(objToSingle); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Abs(Decimal value) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objAbs = (JCObject)classType.Invoke("Abs", value == null ? null : value.getJCOInstance()); return new Decimal(objAbs); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Add(Decimal d1, Decimal d2) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objAdd = (JCObject)classType.Invoke("Add", d1 == null ? null : d1.getJCOInstance(), d2 == null ? null : d2.getJCOInstance()); return new Decimal(objAdd); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Ceiling(Decimal d) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objCeiling = (JCObject)classType.Invoke("Ceiling", d == null ? null : d.getJCOInstance()); return new Decimal(objCeiling); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Clamp(Decimal value, Decimal min, Decimal max) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objClamp = (JCObject)classType.Invoke("Clamp", value == null ? null : value.getJCOInstance(), min == null ? null : min.getJCOInstance(), max == null ? null : max.getJCOInstance()); return new Decimal(objClamp); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal CopySign(Decimal value, Decimal sign) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objCopySign = (JCObject)classType.Invoke("CopySign", value == null ? null : value.getJCOInstance(), sign == null ? null : sign.getJCOInstance()); return new Decimal(objCopySign); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Divide(Decimal d1, Decimal d2) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.DivideByZeroException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objDivide = (JCObject)classType.Invoke("Divide", d1 == null ? null : d1.getJCOInstance(), d2 == null ? null : d2.getJCOInstance()); return new Decimal(objDivide); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Floor(Decimal d) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objFloor = (JCObject)classType.Invoke("Floor", d == null ? null : d.getJCOInstance()); return new Decimal(objFloor); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal FromOACurrency(long cy) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objFromOACurrency = (JCObject)classType.Invoke("FromOACurrency", cy); return new Decimal(objFromOACurrency); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Max(Decimal x, Decimal y) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objMax = (JCObject)classType.Invoke("Max", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Decimal(objMax); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal MaxMagnitude(Decimal x, Decimal y) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objMaxMagnitude = (JCObject)classType.Invoke("MaxMagnitude", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Decimal(objMaxMagnitude); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Min(Decimal x, Decimal y) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objMin = (JCObject)classType.Invoke("Min", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Decimal(objMin); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal MinMagnitude(Decimal x, Decimal y) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objMinMagnitude = (JCObject)classType.Invoke("MinMagnitude", x == null ? null : x.getJCOInstance(), y == null ? null : y.getJCOInstance()); return new Decimal(objMinMagnitude); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Multiply(Decimal d1, Decimal d2) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objMultiply = (JCObject)classType.Invoke("Multiply", d1 == null ? null : d1.getJCOInstance(), d2 == null ? null : d2.getJCOInstance()); return new Decimal(objMultiply); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Negate(Decimal d) throws Throwable { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objNegate = (JCObject)classType.Invoke("Negate", d == null ? null : d.getJCOInstance()); return new Decimal(objNegate); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Parse(java.lang.String s, NumberStyles style, IFormatProvider provider) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objParse = (JCObject)classType.Invoke("Parse", s, style == null ? null : style.getJCOInstance(), provider == null ? null : provider.getJCOInstance()); return new Decimal(objParse); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Parse(java.lang.String s, NumberStyles style) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.globalization.CultureNotFoundException, system.TypeInitializationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objParse = (JCObject)classType.Invoke("Parse", s, style == null ? null : style.getJCOInstance()); return new Decimal(objParse); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Parse(java.lang.String s, IFormatProvider provider) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.RankException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objParse = (JCObject)classType.Invoke("Parse", s, provider == null ? null : provider.getJCOInstance()); return new Decimal(objParse); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Parse(java.lang.String s) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.RankException, system.globalization.CultureNotFoundException, system.TypeInitializationException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objParse = (JCObject)classType.Invoke("Parse", s); return new Decimal(objParse); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Remainder(Decimal d1, Decimal d2) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.DivideByZeroException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objRemainder = (JCObject)classType.Invoke("Remainder", d1 == null ? null : d1.getJCOInstance(), d2 == null ? null : d2.getJCOInstance()); return new Decimal(objRemainder); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Round(Decimal d, int decimals, MidpointRounding mode) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objRound = (JCObject)classType.Invoke("Round", d == null ? null : d.getJCOInstance(), decimals, mode == null ? null : mode.getJCOInstance()); return new Decimal(objRound); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Round(Decimal d, int decimals) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objRound = (JCObject)classType.Invoke("Round", d == null ? null : d.getJCOInstance(), decimals); return new Decimal(objRound); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Round(Decimal d, MidpointRounding mode) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objRound = (JCObject)classType.Invoke("Round", d == null ? null : d.getJCOInstance(), mode == null ? null : mode.getJCOInstance()); return new Decimal(objRound); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Round(Decimal d) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.IndexOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objRound = (JCObject)classType.Invoke("Round", d == null ? null : d.getJCOInstance()); return new Decimal(objRound); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Subtract(Decimal d1, Decimal d2) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objSubtract = (JCObject)classType.Invoke("Subtract", d1 == null ? null : d1.getJCOInstance(), d2 == null ? null : d2.getJCOInstance()); return new Decimal(objSubtract); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static Decimal Truncate(Decimal d) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objTruncate = (JCObject)classType.Invoke("Truncate", d == null ? null : d.getJCOInstance()); return new Decimal(objTruncate); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String ToString(IFormatProvider provider) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException, system.globalization.CultureNotFoundException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.FormatException, system.InvalidOperationException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Invoke("ToString", provider == null ? null : provider.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String ToString(java.lang.String format, IFormatProvider provider) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.globalization.CultureNotFoundException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.FormatException, system.ArrayTypeMismatchException, system.InvalidOperationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Invoke("ToString", format, provider == null ? null : provider.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String ToString(java.lang.String format) throws Throwable, system.ArgumentNullException, system.globalization.CultureNotFoundException, system.PlatformNotSupportedException, system.ArgumentException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.RankException, system.IndexOutOfRangeException, system.ArrayTypeMismatchException, system.TypeInitializationException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Invoke("ToString", format); } catch (JCNativeException jcne) { throw translateException(jcne); } } public TypeCode GetTypeCode() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetTypeCode = (JCObject)classInstance.Invoke("GetTypeCode"); return new TypeCode(objGetTypeCode); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static UInt16 ToUInt16(Decimal value) throws Throwable, system.NotSupportedException, system.ArgumentException, system.PlatformNotSupportedException, system.OverflowException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objToUInt16 = (JCObject)classType.Invoke("ToUInt16", value == null ? null : value.getJCOInstance()); return new UInt16(objToUInt16); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static UInt32 ToUInt32(Decimal d) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OverflowException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objToUInt32 = (JCObject)classType.Invoke("ToUInt32", d == null ? null : d.getJCOInstance()); return new UInt32(objToUInt32); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static UInt64 ToUInt64(Decimal d) throws Throwable, system.ArgumentException, system.PlatformNotSupportedException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OverflowException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { JCObject objToUInt64 = (JCObject)classType.Invoke("ToUInt64", d == null ? null : d.getJCOInstance()); return new UInt64(objToUInt64); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public boolean ToBoolean(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public byte ToByte(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public char ToChar(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public double ToDouble(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public short ToInt16(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public int ToInt32(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public long ToInt64(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public SByte ToSByte(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public Single ToSingle(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public DateTime ToDateTime(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public Decimal ToDecimal(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public NetObject ToType(NetType conversionType, IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public UInt16 ToUInt16(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public UInt32 ToUInt32(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIConvertible method available in IConvertible to obtain an object with an invocable method */ @Deprecated public UInt64 ToUInt64(IFormatProvider provider) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIConvertible to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToISerializable method available in ISerializable to obtain an object with an invocable method */ @Deprecated public void GetObjectData(SerializationInfo info, StreamingContext context) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToISerializable to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToIDeserializationCallback method available in IDeserializationCallback to obtain an object with an invocable method */ @Deprecated public void OnDeserialization(NetObject sender) throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToIDeserializationCallback to obtain the full interface."); } // Properties section public byte getScale() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (byte)classInstance.Get("Scale"); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy