[Mulgara-svn] r1963 - trunk/src/jar/util/java/org/mulgara/util/functional
pag at mulgara.org
pag at mulgara.org
Sat Jul 3 01:22:25 UTC 2010
Author: pag
Date: 2010-07-03 01:22:24 +0000 (Sat, 03 Jul 2010)
New Revision: 1963
Modified:
trunk/src/jar/util/java/org/mulgara/util/functional/C.java
Log:
removed unneeded warning suppression
Modified: trunk/src/jar/util/java/org/mulgara/util/functional/C.java
===================================================================
--- trunk/src/jar/util/java/org/mulgara/util/functional/C.java 2010-07-02 20:39:56 UTC (rev 1962)
+++ trunk/src/jar/util/java/org/mulgara/util/functional/C.java 2010-07-03 01:22:24 UTC (rev 1963)
@@ -115,7 +115,6 @@
* @return The first element in the list.
* @throws NoSuchElementException If the list is empty.
*/
- @SuppressWarnings("unchecked")
public static final <T1> T1 head(List<T1> arg) throws NoSuchElementException {
if (arg instanceof LinkedList) return ((LinkedList<T1>)arg).getFirst();
if (arg.size() == 0) throw new NoSuchElementException("Empty list");
@@ -138,7 +137,6 @@
* @param arg The list.
* @return The first element in the list, or <code>null</code> if the list is empty.
*/
- @SuppressWarnings("unchecked")
public static final <T1> T1 headN(List<T1> arg) {
return arg.isEmpty() ? null : (arg instanceof LinkedList) ? ((LinkedList<T1>)arg).getFirst() : arg.get(0);
}
@@ -162,7 +160,6 @@
* @return The last element in the list.
* @throws IndexOutOfBoundsException If the list is empty.
*/
- @SuppressWarnings("unchecked")
public static final <T1> T1 last(List<T1> arg) throws NoSuchElementException {
if (arg instanceof LinkedList) return ((LinkedList<T1>)arg).getLast();
if (arg.size() == 0) throw new NoSuchElementException("Empty list");
@@ -218,7 +215,6 @@
* @return The first element in the collection.
* @throws NoSuchElementException If the collection is empty.
*/
- @SuppressWarnings("unchecked")
public static final <T1> T1 first(Collection<T1> arg) throws NoSuchElementException {
if (arg instanceof LinkedList) return ((LinkedList<T1>)arg).getFirst();
if (arg.isEmpty()) throw new NoSuchElementException("Empty Collection");
More information about the Mulgara-svn
mailing list