⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ognlops.html

📁 ONGL学习的好书,介绍ONGL的相关知识
💻 HTML
📖 第 1 页 / 共 3 页
字号:

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a new Number object of an appropriate type to hold the given integer value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Number</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/OgnlOps.html#newReal(int, double)">newReal</A></B>(int&nbsp;type,        double&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a new Number object of an appropriate type to hold the given real value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/OgnlOps.html#remainder(java.lang.Object, java.lang.Object)">remainder</A></B>(java.lang.Object&nbsp;v1,          java.lang.Object&nbsp;v2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/OgnlOps.html#shiftLeft(java.lang.Object, java.lang.Object)">shiftLeft</A></B>(java.lang.Object&nbsp;v1,          java.lang.Object&nbsp;v2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/OgnlOps.html#shiftRight(java.lang.Object, java.lang.Object)">shiftRight</A></B>(java.lang.Object&nbsp;v1,           java.lang.Object&nbsp;v2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/OgnlOps.html#stringValue(java.lang.Object)">stringValue</A></B>(java.lang.Object&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Evaluates the given object as a String.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/OgnlOps.html#stringValue(java.lang.Object, boolean)">stringValue</A></B>(java.lang.Object&nbsp;value,            boolean&nbsp;trim)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Evaluates the given object as a String and trims it if the trim flag is true.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/OgnlOps.html#subtract(java.lang.Object, java.lang.Object)">subtract</A></B>(java.lang.Object&nbsp;v1,         java.lang.Object&nbsp;v2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ognl/OgnlOps.html#unsignedShiftRight(java.lang.Object, java.lang.Object)">unsignedShiftRight</A></B>(java.lang.Object&nbsp;v1,                   java.lang.Object&nbsp;v2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="OgnlOps()"><!-- --></A><H3>
OgnlOps</H3>
<PRE>
public <B>OgnlOps</B>()</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="compareWithConversion(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
compareWithConversion</H3>
<PRE>
public static int <B>compareWithConversion</B>(java.lang.Object&nbsp;v1,                                        java.lang.Object&nbsp;v2)</PRE>
<DL>
<DD>Compares two objects for equality, even if it has to convert one of them to the other type.  If both objects are numeric they are converted to the widest type and compared.  If one is non-numeric and one is numeric the non-numeric is converted to double and compared to the double numeric value.  If both are non-numeric and Comparable and the types are compatible (i.e. v1 is of the same or superclass of v2's type) they are compared with Comparable.compareTo(). If both values are non-numeric and not Comparable or of incompatible classes this will throw and IllegalArgumentException.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>v1</CODE> - First value to compare<DD><CODE>v2</CODE> - second value to compare<DT><B>Returns:</B><DD>integer describing the comparison between the two objects.          A negative number indicates that v1 < v2.  Positive indicates          that v1 > v2.  Zero indicates v1 == v2.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the objects are both non-numeric              yet of incompatible types or do not implement Comparable.</DL>
</DD>
</DL>
<HR>

<A NAME="isEqual(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
isEqual</H3>
<PRE>
public static boolean <B>isEqual</B>(java.lang.Object&nbsp;object1,                              java.lang.Object&nbsp;object2)</PRE>
<DL>
<DD>Returns true if object1 is equal to object2 in either the sense that they are the same object or, if both are non-null if they are equal in the <CODE>equals()</CODE> sense.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if v1 == v2</DL>
</DD>
</DL>
<HR>

<A NAME="booleanValue(java.lang.Object)"><!-- --></A><H3>
booleanValue</H3>
<PRE>
public static boolean <B>booleanValue</B>(java.lang.Object&nbsp;value)</PRE>
<DL>
<DD>Evaluates the given object as a boolean: if it is a Boolean object, it's easy; if it's a Number or a Character, returns true for non-zero objects; and otherwise returns true for non-null objects.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - an object to interpret as a boolean<DT><B>Returns:</B><DD>the boolean value implied by the given object</DL>
</DD>
</DL>
<HR>

<A NAME="longValue(java.lang.Object)"><!-- --></A><H3>
longValue</H3>
<PRE>
public static long <B>longValue</B>(java.lang.Object&nbsp;value)                      throws java.lang.NumberFormatException</PRE>
<DL>
<DD>Evaluates the given object as a long integer.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - an object to interpret as a long integer<DT><B>Returns:</B><DD>the long integer value implied by the given object<DT><B>Throws:</B><DD><CODE>java.lang.NumberFormatException</CODE> - if the given object can't be understood as a long integer</DL>
</DD>
</DL>
<HR>

<A NAME="doubleValue(java.lang.Object)"><!-- --></A><H3>
doubleValue</H3>
<PRE>
public static double <B>doubleValue</B>(java.lang.Object&nbsp;value)                          throws java.lang.NumberFormatException</PRE>
<DL>
<DD>Evaluates the given object as a double-precision floating-point number.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - an object to interpret as a double<DT><B>Returns:</B><DD>the double value implied by the given object<DT><B>Throws:</B><DD><CODE>java.lang.NumberFormatException</CODE> - if the given object can't be understood as a double</DL>
</DD>
</DL>
<HR>

<A NAME="bigIntValue(java.lang.Object)"><!-- --></A><H3>
bigIntValue</H3>
<PRE>
public static java.math.BigInteger <B>bigIntValue</B>(java.lang.Object&nbsp;value)                                        throws java.lang.NumberFormatException</PRE>
<DL>
<DD>Evaluates the given object as a BigInteger.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - an object to interpret as a BigInteger<DT><B>Returns:</B><DD>the BigInteger value implied by the given object<DT><B>Throws:</B><DD><CODE>java.lang.NumberFormatException</CODE> - if the given object can't be understood as a BigInteger</DL>
</DD>
</DL>
<HR>

<A NAME="bigDecValue(java.lang.Object)"><!-- --></A><H3>
bigDecValue</H3>
<PRE>
public static java.math.BigDecimal <B>bigDecValue</B>(java.lang.Object&nbsp;value)                                        throws java.lang.NumberFormatException</PRE>
<DL>
<DD>Evaluates the given object as a BigDecimal.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - an object to interpret as a BigDecimal<DT><B>Returns:</B><DD>the BigDecimal value implied by the given object<DT><B>Throws:</B><DD><CODE>java.lang.NumberFormatException</CODE> - if the given object can't be understood as a BigDecimal</DL>
</DD>
</DL>
<HR>

<A NAME="stringValue(java.lang.Object, boolean)"><!-- --></A><H3>
stringValue</H3>
<PRE>
public static java.lang.String <B>stringValue</B>(java.lang.Object&nbsp;value,                                           boolean&nbsp;trim)</PRE>
<DL>
<DD>Evaluates the given object as a String and trims it if the trim flag is true.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - an object to interpret as a String<DT><B>Returns:</B><DD>the String value implied by the given object as returned by the toString() method,                or "null" if the object is null.</DL>
</DD>
</DL>
<HR>

<A NAME="stringValue(java.lang.Object)"><!-- --></A><H3>
stringValue</H3>
<PRE>
public static java.lang.String <B>stringValue</B>(java.lang.Object&nbsp;value)</PRE>
<DL>
<DD>Evaluates the given object as a String.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - an object to interpret as a String<DT><B>Returns:</B><DD>the String value implied by the given object as returned by the toString() method,                or "null" if the object is null.</DL>
</DD>
</DL>
<HR>

<A NAME="getNumericType(java.lang.Object)"><!-- --></A><H3>
getNumericType</H3>
<PRE>
public static int <B>getNumericType</B>(java.lang.Object&nbsp;value)</PRE>
<DL>
<DD>Returns a constant from the NumericTypes interface that represents the numeric type of the given object.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - an object that needs to be interpreted as a number<DT><B>Returns:</B><DD>the appropriate constant from the NumericTypes interface</DL>
</DD>
</DL>
<HR>

<A NAME="convertValue(java.lang.Object, java.lang.Class)"><!-- --></A><H3>
convertValue</H3>
<PRE>
public static java.lang.Object <B>convertValue</B>(java.lang.Object&nbsp;value,                                            java.lang.Class&nbsp;toType)</PRE>
<DL>
<DD>Returns the value converted numerically to the given class type This method also detects when arrays are being converted and converts the components of one array to the type of the other.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - an object to be converted to the given type<DD><CODE>toType</CODE> - class type to be converted to<DT><B>Returns:</B><DD>converted value of the type given, or value if the value                cannot be converted to the given type.</DL>
</DD>
</DL>
<HR>

<A NAME="getNumericType(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
getNumericType</H3>
<PRE>
public static int <B>getNumericType</B>(java.lang.Object&nbsp;v1,                                 java.lang.Object&nbsp;v2)</PRE>
<DL>
<DD>Returns the constant from the NumericTypes interface that best expresses the type of a numeric operation on the two given objects.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>v1</CODE> - one argument to a numeric operator<DD><CODE>v2</CODE> - the other argument<DT><B>Returns:</B><DD>the appropriate constant from the NumericTypes interface</DL>
</DD>
</DL>
<HR>

<A NAME="getNumericType(int, int, boolean)"><!-- --></A><H3>
getNumericType</H3>
<PRE>
public static int <B>getNumericType</B>(int&nbsp;t1,                                 int&nbsp;t2,                                 boolean&nbsp;canBeNonNumeric)</PRE>
<DL>
<DD>Returns the constant from the NumericTypes interface that best expresses the type of an operation, which can be either numeric or not, on the two given types.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>t1</CODE> - type of one argument to an operator<DD><CODE>t2</CODE> - type of the other argument<DD><CODE>canBeNonNumeric</CODE> - whether the operator can be interpreted as non-numeric<DT><B>Returns:</B><DD>the appropriate constant from the NumericTypes interface</DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -