<html>
<head>
<meta name="viewport" content="width=device-width" />
<base href="http://wiki.javaforum.hu" />
<style type="text/css">
body, #email-content, #email-content-inner { font-family: Arial,FreeSans,Helvetica,sans-serif; }
body, p, blockquote, pre, code, td, th, li, dt, dd { font-size: 13px; }
small { font-size: 11px; }
body { width:100% !important; -webkit-font-smoothing: antialiased; }
body,
#email-wrapper { background-color: #f0f0f0; }
#email-wrapper-inner { padding: 20px; text-align: center; }
#email-content-inner { background-color: #fff; border: 1px solid #bbb; color: $menuTxtColour; padding:20px; text-align:left; }
#email-footer { padding: 0 16px 32px 16px; margin: 0; }
.email-indent { margin: 8px 0 16px 0; }
.email-comment { margin: 0 0 0 56px; }
#email-title-avatar { text-align: left; vertical-align: top; width: 56px; }
#email-title-flavor { margin: 0; padding: 0 0 4px 0; }
#email-title-heading { font-size: 16px; line-height: 20px; min-height: 20px; margin: 0; padding: 0; }
#email-title .icon { border: 0; padding: 0 2px 0 0; text-align: left; }
#email-actions { border-top: 1px solid #bbb; color: #505050; margin: 8px 0 0 0; padding: 0; }
#email-actions td { padding-top: 8px; }
#email-actions .left { max-width: 45%; text-align: left; }
#email-actions .right { text-align: right; }
.email-reply-divider { border-top: 1px solid #bbb; color: #505050; margin: 32px 0 8px 0; padding: 8px 0; }
.email-section-title { border-bottom: 1px solid #bbb; margin: 8px 0; padding: 8px 0 0 0; }
.email-metadata { color: #505050; }
a { color: #326ca6; text-decoration: none; }
a:hover { color: #336ca6; text-decoration: underline; }
a:active {color: #326ca6; }
a.email-footer-link { color: #505050; font-size: 11px; }
.email-item-list { list-style: none; margin: 4px 0; padding-left: 0; }
.email-item-list li { list-style: none; margin: 0; padding: 4px 0; }
.email-list-divider { color: #505050; padding: 0 0.35em; }
.avatar { -ms-interpolation-mode: bicubic; }
.avatar-link { margin: 2px; }
.tableview th { border-bottom: 1px solid #69C; font-weight: bold; text-align: left; }
.tableview td { border-bottom: 1px solid #bbbbbb; text-align: left; padding: 4px 16px 4px 0; }
.aui-message { margin: 1em 0; padding: 8px; }
.aui-message.info { background-color: #e0f0ff; border: 1px solid #9eb6d4; }
.aui-message.success { background-color: #ddfade; border: 1px solid #93c49f; }
.aui-message.error,
.aui-message.removed { background-color: #ffe7e7; border: 1px solid #df9898; color: #000; }
@media handheld, only screen and (max-device-width: 480px) {
div, a, p, td, th, li, dt, dd { -webkit-text-size-adjust: auto; }
small, small a { -webkit-text-size-adjust: 90%; }
td[id=email-wrapper-inner] { padding: 2px !important; }
td[id=email-content-inner] { padding: 8px !important; }
td[id=email-footer] { padding: 8px 12px !important; }
div[class=email-indent] { margin: 8px 0px !important; }
div[class=email-comment] { margin: 0 !important; }
p[id=email-title-flavor] a { display: block; } /* puts the username and the action on separate lines */
p[id=email-permalink] { padding: 4px 0 0 0 !important; }
table[id=email-actions] td { padding-top: 0 !important; }
table[id=email-actions] td.right { text-align: right !important; }
table[id=email-actions] .email-list-item { display: block; margin: 1em 0 !important; word-wrap: normal !important; }
span[class=email-list-divider] { display: none; }
}
</style>
</head>
<body bgcolor="#f0f0f0" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" style="font-family: Arial, FreeSans, Helvetica, sans-serif; font-size: 13px; width: 100%; -webkit-font-smoothing: antialiased; background-color: #f0f0f0">
<table id="email-wrapper" width="100%" cellspacing="0" cellpadding="0" border="0" style="background-color: #f0f0f0">
<tbody>
<tr valign="middle">
<td id="email-wrapper-inner" style="font-size: 13px; padding: 20px; text-align: center">
<table id="email-content" width="100%" cellspacing="0" cellpadding="0" border="0" style="font-family: Arial, FreeSans, Helvetica, sans-serif">
<tbody>
<tr valign="top">
<td id="email-content-inner" width="100%" style="font-family: Arial, FreeSans, Helvetica, sans-serif; font-size: 13px; background-color: #fff; border: 1px solid #bbb; padding: 20px; text-align: left">
<table id="email-title" cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td id="email-title-avatar" rowspan="2" style="font-size: 13px; text-align: left; vertical-align: top; width: 56px"> <img class="avatar" src="cid:avatar_d7177d5506ab05ef431ea35647b597a3" border="0" height="48" width="48" style="-ms-interpolation-mode: bicubic" /> </td>
<td valign="top" style="font-size: 13px">
<div id="email-title-flavor" class="email-metadata" style="margin: 0; padding: 0 0 4px 0; color: #505050">
<a href="http://wiki.javaforum.hu/display/~auth.gabor" style="color:#326ca6;text-decoration:none;; color: #326ca6; text-decoration: none">Auth Gábor</a> wrote a blog post:
</div> </td>
</tr>
<tr>
<td valign="top" style="font-size: 13px"> <h2 id="email-title-heading" style="font-size: 16px; line-height: 20px; min-height: 20px; margin: 0; padding: 0"> <a href="http://wiki.javaforum.hu/display/JAVAFORUM/2012/06/08/Java7+-+java.util.Objects" style="color: #326ca6; text-decoration: none"> <img class="icon" src="cid:blogpost-icon" alt="" style="border: 0; padding: 0 2px 0 0; text-align: left" /> <strong style="font-size:16px;line-height:20px;vertical-align:top;">Java7 - java.util.Objects</strong> </a> </h2> </td>
</tr>
</tbody>
</table>
<div class="email-indent" style="margin: 8px 0 16px 0">
<div class="email-page">
<p style="font-size: 13px">A Java7 egyik csendes újítása a <a href="http://hg.openjdk.java.net/jdk7/build/jdk/file/9b8c96f96a0f/src/share/classes/java/util/Objects.java" class="external-link" rel="nofollow" style="color: #326ca6; text-decoration: none">java.util.Objects</a> osztály, amely közel tucatnyi statikus metódust ad az objektumok kezeléséhez, amely metódusok egy része nem esik zavarba, ha <em>null</em> értéket kap. Az Objects tipikus esete utility osztályoknak, <em>final</em> módosítóval van ellátva, illetve van egy privát konstruktora is:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Objects.java</b>
</div>
<div class="codeContent panelContent">
<pre class="first-line: 37; theme: Default; brush: java; gutter: true" style="font-size: 13px">private Objects() {
throw new AssertionError("No java.util.Objects instances for you!");
}</pre>
</div>
</div>
<p style="font-size: 13px">Suhanjunk végig az eddig megvalósított metóduslistán... <img class="emoticon emoticon-smile" src="/s/en_GB/3273/3/_/images/icons/emoticons/smile.png" data-emoticon-name="smile" alt="(smile)" /></p>
<h3 id="Java7-javautilObjects-equals">equals</h3>
<p style="font-size: 13px">Az első metódus egy egyszerű egyezőség vizsgálat, amely levizsgálja a két összehasonlítandó paraméter közül az elsőt, hogy annak értéke nem <em>null</em>, majd ezek után végzi el az összevetést, így ez a metódus <em>null safe</em>: használata során nem kellNullPointerException kivételre számítanunk. A forrása egyszerű:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Objects.java</b>
</div>
<div class="codeContent panelContent">
<pre class="first-line: 56; theme: Default; brush: java; gutter: true" style="font-size: 13px">public static boolean equals(Object a, Object b) {
return (a == b) || (a != null && a.equals(b));
}</pre>
</div>
</div>
<p style="font-size: 13px">Használata:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Example.java</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size: 13px">String a = null;
String b = null;
System.out.println(Objects.equals(a, b));
b = "nem üres";
System.out.println(Objects.equals(a, b));
a = "nem üres";
System.out.println(Objects.equals(a, b));</pre>
</div>
</div>
<p style="font-size: 13px">Az eredmény:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Az eredmény</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: html/xml; gutter: false" style="font-size: 13px">true
false
true</pre>
</div>
</div>
<h3 id="Java7-javautilObjects-deepEquals">deepEquals</h3>
<p style="font-size: 13px">A <em>deepEquals</em> metódus hasonlít a fentire, de sima <em>equals</em> helyett az <em>Arrays.deepEquals</em> metódust hívja meg <em>null</em> ellenőrzéssel, így egy sorban tudunk két tömböt összevetni:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Objects.java</b>
</div>
<div class="codeContent panelContent">
<pre class="first-line: 77; theme: Default; brush: java; gutter: true" style="font-size: 13px">public static boolean deepEquals(Object a, Object b) {
if (a == b)
return true;
else if (a == null || b == null)
return false;
else
return Arrays.deepEquals0(a, b);
}</pre>
</div>
</div>
<p style="font-size: 13px">Használata:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Example.java</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size: 13px">String[] a = null;
String[] b = null;
System.out.println(Objects.deepEquals(a, b));
b = new String[]{"semmi", "újabb semmi"};
System.out.println(Objects.deepEquals(a, b));
a = new String[]{"semmi", "újabb semmi"};
System.out.println(Objects.deepEquals(a, b));</pre>
</div>
</div>
<p style="font-size: 13px">Az eredmény:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Az eredmény</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: html/xml; gutter: false" style="font-size: 13px">true
false
true</pre>
</div>
</div>
<h3 id="Java7-javautilObjects-hashCode">hashCode</h3>
<p style="font-size: 13px">A <em>hashCode</em> lehetőséget ad <em>null safe</em> hívásra, az átadott objektumnak csak akkor hívódik meg a <em>hashCode</em> metódusa, ha a paraméter nem <em>null</em>:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Objects.java</b>
</div>
<div class="codeContent panelContent">
<pre class="first-line: 95; theme: Default; brush: java; gutter: true" style="font-size: 13px">public static int hashCode(Object o) {
return o != null ? o.hashCode() : 0;
}</pre>
</div>
</div>
<p style="font-size: 13px">Használata:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Example.java</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size: 13px">String a = null;
System.out.println(Objects.hashCode(a));
a = "semmi";
System.out.println(Objects.hashCode(a));</pre>
</div>
</div>
<p style="font-size: 13px">Az eredmény:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Az eredmény</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: html/xml; gutter: false" style="font-size: 13px">0
109322039</pre>
</div>
</div>
<h3 id="Java7-javautilObjects-hash">hash</h3>
<p style="font-size: 13px">Hasonlít az előzőre, azzal a különbséggel, hogy a metódus paraméterlistája dinamikusan bővíthető, s az eredményül kapott objektum-tömb átadásra kerül a <em>Arrays.hashCode</em> metódusnak, így lehetőségünk van <em>null</em> biztos hash képzésre több argumentumból:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Objects.java</b>
</div>
<div class="codeContent panelContent">
<pre class="first-line: 125; theme: Default; brush: java; gutter: true" style="font-size: 13px">public static int hash(Object... values) {
return Arrays.hashCode(values);
}</pre>
</div>
</div>
<p style="font-size: 13px">Használata:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Example.java</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size: 13px">String a = null;
String b = null;
System.out.println(Objects.hash(a, b));
b = "semmi";
System.out.println(Objects.hash(a, b));
a = "semmi";
System.out.println(Objects.hash(a, b));</pre>
</div>
</div>
<p style="font-size: 13px">Az eredmény:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Az eredmény</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: html/xml; gutter: false" style="font-size: 13px">961
109323000
-796661087</pre>
</div>
</div>
<h3 id="Java7-javautilObjects-toString">toString</h3>
<p style="font-size: 13px">Ez a metódus kissé kilóg a többi közül, mert <em>null</em> biztos konverzióra eddig is lehetőség volt az alább is látható <em>String.valueOf(o)</em> használatával:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Objects.java</b>
</div>
<div class="codeContent panelContent">
<pre class="first-line: 139; theme: Default; brush: java; gutter: true" style="font-size: 13px">public static String toString(Object o) {
return String.valueOf(o);
}</pre>
</div>
</div>
<p style="font-size: 13px">Használata:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Example.java</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size: 13px">String a = null;
System.out.println(Objects.toString(a));
a = "semmi";
System.out.println(Objects.toString(a));</pre>
</div>
</div>
<p style="font-size: 13px">Az eredmény:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Az eredmény</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: html/xml; gutter: false" style="font-size: 13px">null
semmi</pre>
</div>
</div>
<h3 id="Java7-javautilObjects-toStringalapértelmezettérték">toString + alapértelmezett érték</h3>
<p style="font-size: 13px">Az előzőnél sokkal hasznosabb metódus a most következő, amelynél megadhatunk egy alapértelmezett értéket, ha az átadott objektum értéke <em>null</em>:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Objects.java</b>
</div>
<div class="codeContent panelContent">
<pre class="first-line: 156; theme: Default; brush: java; gutter: true" style="font-size: 13px">public static String toString(Object o, String nullDefault) {
return (o != null) ? o.toString() : nullDefault;
}</pre>
</div>
</div>
<p style="font-size: 13px">Használata:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Example.java</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size: 13px">String a = null;
System.out.println(Objects.toString(a, "hopsza, ez null"));
a = "semmi";
System.out.println(Objects.toString(a));</pre>
</div>
</div>
<p style="font-size: 13px">Az eredmény:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Az eredmény</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: html/xml; gutter: false" style="font-size: 13px">hopsza, ez null
semmi</pre>
</div>
</div>
<h3 id="Java7-javautilObjects-compare">compare</h3>
<p style="font-size: 13px">A <em>compare</em> metódus két objektum összehasonlítására jó, s ez a többi metódushoz képest két okból is rendhagyó:</p>
<ul>
<li style="font-size: 13px">nem <em>null safe</em></li>
<li style="font-size: 13px">kell neki egy Comparator implementáció, amely szükség esetén lehet <em>null safe</em></li>
</ul>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Objects.java</b>
</div>
<div class="codeContent panelContent">
<pre class="first-line: 180; theme: Default; brush: java; gutter: true" style="font-size: 13px">public static <T> int compare(T a, T b, Comparator<? super T> c) {
return (a == b) ? 0 : c.compare(a, b);
}</pre>
</div>
</div>
<p style="font-size: 13px">Használata (hibát okoz):</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Example.java</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size: 13px">Comparator<String> comparator = new Comparator<String>() {
public int compare(String o1, String o2)
{
return o1.compareTo(o2);
}
};
String a = null;
String b = null;
System.out.println(Objects.compare(a, b, comparator));
b = "semmi";
System.out.println(Objects.compare(a, b, comparator));
a = "semmi";
System.out.println(Objects.compare(a, b, comparator));</pre>
</div>
</div>
<p style="font-size: 13px">Az eredmény:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Az eredmény</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: html/xml; gutter: false" style="font-size: 13px">0
Exception in thread "main" java.lang.NullPointerException
at hu.javaforum.showobjects.App$1.compare(App.java:19)
at hu.javaforum.showobjects.App$1.compare(App.java:15)
at java.util.Objects.compare(Objects.java:181)
at hu.javaforum.showobjects.App.main(App.java:27)</pre>
</div>
</div>
<h3 id="Java7-javautilObjects-requireNonNull">requireNonNull</h3>
<p style="font-size: 13px">Ez egy nagyon hasznos metódus, jegyezzük meg, mert nem csinál ugyan sokat, de azt gyakran használjuk, ha paramétereket ellenőrzünk! Megvizsgálja, hogy az átadott első paraméter <em>null</em> értékű-e, ha igen, akkor dob egy <em>NullPointerException</em> kivételt, ha nem, akkor visszaadja az objektumot:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Objects.java</b>
</div>
<div class="codeContent panelContent">
<pre class="first-line: 199; theme: Default; brush: java; gutter: true" style="font-size: 13px">public static <T> T requireNonNull(T obj) {
if (obj == null)
throw new NullPointerException();
return obj;
}</pre>
</div>
</div>
<p style="font-size: 13px">Használata:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Example.java</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size: 13px">String a = Objects.requireNonNull("semmi");
System.out.println(a);
String b = Objects.requireNonNull(null);
System.out.println(b);</pre>
</div>
</div>
<p style="font-size: 13px">Az eredmény:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Az eredmény</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: html/xml; gutter: false" style="font-size: 13px">semmi
Exception in thread "main" java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:201)
at hu.javaforum.showobjects.App.main(App.java:17)</pre>
</div>
</div>
<h3 id="Java7-javautilObjects-requireNonNullszöveg">requireNonNull + szöveg</h3>
<p style="font-size: 13px">Hasonló a fentihez, ám ez esetben megadhatunk egy szöveget, amely adott esetben átadódik a <em>NullPointerException</em> kivételnek:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Objects.java</b>
</div>
<div class="codeContent panelContent">
<pre class="first-line: 224; theme: Default; brush: java; gutter: true" style="font-size: 13px">public static <T> T requireNonNull(T obj, String message) {
if (obj == null)
throw new NullPointerException(message);
return obj;
}</pre>
</div>
</div>
<p style="font-size: 13px">Használata:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Example.java</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size: 13px">String a = Objects.requireNonNull("semmi", "A paraméter értéke null");
System.out.println(a);
String b = Objects.requireNonNull(null, "A paraméter értéke null");
System.out.println(b);</pre>
</div>
</div>
<p style="font-size: 13px">Az eredmény:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeHeader panelHeader" style="border-bottom-width: 1px;">
<b>Az eredmény</b>
</div>
<div class="codeContent panelContent">
<pre class="theme: Default; brush: html/xml; gutter: false" style="font-size: 13px">semmi
Exception in thread "main" java.lang.NullPointerException: A paraméter értéke null
at java.util.Objects.requireNonNull(Objects.java:226)
at hu.javaforum.showobjects.App.main(App.java:17)</pre>
</div>
</div>
<h3 id="Java7-javautilObjects-Konklúzió">Konklúzió</h3>
<p style="font-size: 13px">Nagyon hasznos osztály, használja mindenki – aki teheti, ugyanis nagyon sok saját osztály van a projektjeinkben, amelyek hasonló vagy pontosan ilyen módon működnek, mivel egy-egy fenti metódus használatával a forráskódunk egyszerűbb és átláthatóbb lesz, másrészt kevesebb saját forráskódot kell majd karbantartanunk.</p>
<p style="font-size: 13px">(inspiráció: <a href="http://www.javabeat.net/2012/06/java-util-objects-a-static-utility-for-objects-introduced-in-java-7/" class="external-link" rel="nofollow" style="color: #326ca6; text-decoration: none">www.javabeat.net/2012/06/java-util-objects-a-static-utility-for-objects-introduced-in-java-7/</a>)</p>
<hr />
<p style="font-size: 13px">
<style type="text/css">
.rater {
color: #949494;
font-size: 11px;
margin: 4px 4px;
overflow: auto;
}
.rater td {
vertical-align: middle;
padding-top: 6px;
}
.rater .images {
padding-top: 3px;
}
.rater .links {
cursor: pointer;
}
.rater .disabled a {
cursor: default;
}
.rater img {
height: 18px;
width: 15px;
}
.rater .wait img {
height: 18px;
width: 20px;
background: transparent url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/loading_mini.gif) no-repeat scroll center left;
}
.rater a img {
border-style: none;
}
.results.caption {
padding-left: 8px;
}
.rater .right-space {
padding-right: 8px;
}
/* sprites */
.rater img { background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left; }
.rater a.out img { background-position: 0 -275px; }
.rater a.over img, .rater img.over { background-position: 0 -226px; }
.rater a.off img, .rater img.off { background-position: 0 -128px; }
.rater a.on img, .rater img.on { background-position: 0 -177px; }
.rater img.half { background-position: 0 -79px; }
</style> <img width="0px" height="0px" src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/loading_mini.gif" /> <img width="0px" height="0px" src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif" /> </p>
<!-- only output the .vote td's if they CAN vote, but have NOT yet voted -->
<!-- obviously change the URL's on the a tags to reflect the various choices -->
<!-- only output the .wait td's if they CAN vote, but haven't already voted -->
<!-- always output .results td's - the classes (on, half and off) depict the current avg. rating -->
<!--td> <a id="activatePlusone-24150032" href="#"
                onClick="gapi.plusone.render('plusone-div-24150032');document.getElementById('activatePlusone-24150032').style.display='none';">Activate the +1 button</a>
                <div id="plusone-div-24150032"></div>
        </td-->
<table class="rater ceoId-24150032" style="color: #949494; font-size: 11px; margin: 4px 4px; overflow: auto">
<tbody>
<tr>
<!-- only output the .vote td's if they CAN vote, but have NOT yet voted -->
<td class="vote caption" style="font-size: 13px; vertical-align: middle; padding-top: 6px">Your Rating:</td>
<td class="vote thanks" style="display:none;; font-size: 13px; vertical-align: middle; padding-top: 6px">Thanks for voting!</td>
<!-- obviously change the URL's on the a tags to reflect the various choices -->
<td class="vote links images right-space" style="font-size: 13px; vertical-align: middle; padding-top: 6px; padding-top: 3px; cursor: pointer; padding-right: 8px"> <a class="out" href="/plugins/rate/rating.action?decorator=none&displayFilter.includeCookies=true&displayFilter.includeUsers=true&ceoId=24150032&rating=1&redirect=true" alt="Pathetic" title="Pathetic" style="color: #326ca6; text-decoration: none"><img src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/blank.gif" style="height: 18px; width: 15px; border-style: none; background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left; background-position: 0 -275px" /></a><a class="out" href="/plugins/rate/rating.action?decorator=none&displayFilter.includeCookies=true&displayFilter.includeUsers=true&ceoId=24150032&rating=2&redirect=true" alt="Bad" title="Bad" style="color: #326ca6; text-decoration: none"><img src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/blank.gif" style="height: 18px; width: 15px; border-style: none; background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left; background-position: 0 -275px" /></a><a class="out" href="/plugins/rate/rating.action?decorator=none&displayFilter.includeCookies=true&displayFilter.includeUsers=true&ceoId=24150032&rating=3&redirect=true" alt="OK" title="OK" style="color: #326ca6; text-decoration: none"><img src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/blank.gif" style="height: 18px; width: 15px; border-style: none; background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left; background-position: 0 -275px" /></a><a class="out" href="/plugins/rate/rating.action?decorator=none&displayFilter.includeCookies=true&displayFilter.includeUsers=true&ceoId=24150032&rating=4&redirect=true" alt="Good" title="Good" style="color: #326ca6; text-decoration: none"><img src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/blank.gif" style="height: 18px; width: 15px; border-style: none; background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left; background-position: 0 -275px" /></a><a class="out" href="/plugins/rate/rating.action?decorator=none&displayFilter.includeCookies=true&displayFilter.includeUsers=true&ceoId=24150032&rating=5&redirect=true" alt="Outstanding!" title="Outstanding!" style="color: #326ca6; text-decoration: none"><img src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/blank.gif" style="height: 18px; width: 15px; border-style: none; background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left; background-position: 0 -275px" /></a> </td>
<!-- only output the .wait td's if they CAN vote, but haven't already voted -->
<td class="wait images" style="display:none;; font-size: 13px; vertical-align: middle; padding-top: 6px; padding-top: 3px"><img src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/blank.gif" alt="Please Wait" title="Please Wait" style="height: 18px; width: 15px; height: 18px; width: 20px; background: transparent url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/loading_mini.gif) no-repeat scroll center left; background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left" /></td>
<td class="wait text right-space" style="display:none;; font-size: 13px; vertical-align: middle; padding-top: 6px; padding-right: 8px">Please Wait</td>
<!-- always output .results td's - the classes (on, half and off) depict the current avg. rating -->
<td class="results caption border" style="font-size: 13px; vertical-align: middle; padding-top: 6px; padding-left: 8px">Results:</td>
<td class="results images" style="font-size: 13px; vertical-align: middle; padding-top: 6px; padding-top: 3px"> <img class="off" src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/blank.gif" alt="Pathetic" title="Pathetic" style="height: 18px; width: 15px; background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left; background-position: 0 -128px" /><img class="off" src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/blank.gif" alt="Bad" title="Bad" style="height: 18px; width: 15px; background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left; background-position: 0 -128px" /><img class="off" src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/blank.gif" alt="OK" title="OK" style="height: 18px; width: 15px; background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left; background-position: 0 -128px" /><img class="off" src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/blank.gif" alt="Good" title="Good" style="height: 18px; width: 15px; background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left; background-position: 0 -128px" /><img class="off" src="/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/blank.gif" alt="Outstanding!" title="Outstanding!" style="height: 18px; width: 15px; background: url(/download/resources/com.adaptavist.confluence.rate:rate/resources/themes/v2/gfx/rater.gif) no-repeat top left; background-position: 0 -128px" /> </td>
<td class="results value" style="font-size: 13px; vertical-align: middle; padding-top: 6px">0</td>
<td class="results ratings" style="font-size: 13px; vertical-align: middle; padding-top: 6px">rates</td>
<!--td> <a id="activatePlusone-24150032" href="#"
                onClick="gapi.plusone.render('plusone-div-24150032');document.getElementById('activatePlusone-24150032').style.display='none';">Activate the +1 button</a>
                <div id="plusone-div-24150032"></div>
        </td-->
<td class="results" style="font-size: 13px; vertical-align: middle; padding-top: 6px"> </td>
<td style="font-size: 13px; vertical-align: middle; padding-top: 6px">
<g:plusone></g:plusone></td>
<td class="results" style="font-size: 13px; vertical-align: middle; padding-top: 6px"> </td>
<td style="font-size: 13px; vertical-align: middle; padding-top: 6px">
<div class="fb-like" data-send="true" data-layout="button_count" data-width="450" data-show-faces="true"></div></td>
</tr>
</tbody>
</table>
<p style="font-size: 13px"></p>
<p style="font-size: 13px"> </p>
<div class="bv_viewtracker">
<span class="bv_viewracker_span bv_viewtracker_closed"> Page viewed 1 times by 1 users since Jun 08, 2012 </span>
</div>
<div class="bv_viewtracker_visits" style="display:none;">
<table class="bv_viewtracker_table tableview attachments">
<tbody>
<tr class="bv_viewtracker_header">
<th class="bv_viewtracker_header_name" style="font-size: 13px; border-bottom: 1px solid #69c; font-weight: bold; text-align: left">Name</th>
<th class="bv_viewtracker_header_lastviewed" style="font-size: 13px; border-bottom: 1px solid #69c; font-weight: bold; text-align: left">Last viewed</th>
<th class="bv_viewtracker_header_timesviewed" style="font-size: 13px; border-bottom: 1px solid #69c; font-weight: bold; text-align: left">Times viewed</th>
</tr>
<tr class="bv_viewtracker_body">
<td class="bv_viewtracker_body_name" style="font-size: 13px; border-bottom: 1px solid #bbb; text-align: left; padding: 4px 16px 4px 0"> <a href="/display/~javalist" class="url fn confluence-userlink" data-username="javalist" style="color: #326ca6; text-decoration: none">Javaforum List</a><br /> </td>
<td class="bv_viewtracker_body_lastviewed" style="font-size: 13px; border-bottom: 1px solid #bbb; text-align: left; padding: 4px 16px 4px 0">Jun 08, 2012 19:01</td>
<td class="bv_viewtracker_body_timesviewed" style="font-size: 13px; border-bottom: 1px solid #bbb; text-align: left; padding: 4px 16px 4px 0">1</td>
</tr>
</tbody>
</table>
</div>
<p style="font-size: 13px"></p>
<p style="font-size: 13px"> </p>
</div>
</div>
<table id="email-actions" class="email-metadata" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-top: 1px solid #bbb; color: #505050; margin: 8px 0 0 0; padding: 0; color: #505050">
<tbody>
<tr>
<td class="left" valign="top" style="font-size: 13px; padding-top: 8px; max-width: 45%; text-align: left"> <span class="email-list-item"><a href="http://wiki.javaforum.hu/display/JAVAFORUM/2012/06/08/Java7+-+java.util.Objects" style="color: #326ca6; text-decoration: none">View Online</a> </span> </td>
<td class="right" width="50%" valign="top" style="font-size: 13px; padding-top: 8px; text-align: right"> <span class="email-list-item"><a href="http://wiki.javaforum.hu/users/editmyemailsettings.action" style="color: #326ca6; text-decoration: none">Manage Notifications</a> </span> <span class="email-list-divider" style="color: #505050; padding: 0 0.350em">·</span> <span class="email-list-item"><a href="http://wiki.javaforum.hu/users/viewmyemailsettings.action" style="color: #326ca6; text-decoration: none">Unsubscribe from all blog posts</a> </span> </td>
</tr>
</tbody>
</table> </td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td id="email-footer" align="center" style="font-size: 13px; padding: 0 16px 32px 16px; margin: 0"> <small style="font-size: 11px"> This message was sent by <a class="email-footer-link" style="color:#505050;font-size:11px;text-decoration:none;; color: #326ca6; text-decoration: none; color: #505050; font-size: 11px" href="http://www.atlassian.com/software/confluence">Atlassian Confluence</a> 4.2, the <a class="email-footer-link" style="color:#505050;font-size:11px;text-decoration:none;; color: #326ca6; text-decoration: none; color: #505050; font-size: 11px" href="http://www.atlassian.com/software/confluence/tour/enterprise-wiki.jsp">Enterprise Wiki</a> </small> </td>
</tr>
</tbody>
</table>
</body>
</html>