mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 12:25:35 +02:00
Cosmetics.
This commit is contained in:
parent
a994a84977
commit
7941b24080
1 changed files with 9 additions and 15 deletions
|
@ -14,7 +14,6 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ListIterator;
|
import java.util.ListIterator;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Useful utility methods for dealing with Collections.
|
* Useful utility methods for dealing with Collections.
|
||||||
*
|
*
|
||||||
|
@ -26,7 +25,6 @@ public final class CollectionUtils {
|
||||||
// this class has just static utility methods
|
// this class has just static utility methods
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an iterator that iterates backwards over the given list.
|
* Returns an iterator that iterates backwards over the given list.
|
||||||
* The remove() method is not implemented and will throw UnsupportedOperationException.
|
* The remove() method is not implemented and will throw UnsupportedOperationException.
|
||||||
|
@ -50,12 +48,11 @@ public final class CollectionUtils {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows a foreach loop to iterate backwards over a list
|
* Allows a foreach loop to iterate backwards over a list
|
||||||
* from the end to the start.
|
* from the end to the start.
|
||||||
*
|
*
|
||||||
* eg)
|
* e.g.
|
||||||
* for(Object o : reverseIterable(list)) { ... }
|
* for(Object o : reverseIterable(list)) { ... }
|
||||||
*
|
*
|
||||||
* @throws NullPointerException if list is null
|
* @throws NullPointerException if list is null
|
||||||
|
@ -64,14 +61,13 @@ public final class CollectionUtils {
|
||||||
return iterable(reverseIterator(list));
|
return iterable(reverseIterator(list));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an Iterable instance that just returns
|
* Creates an Iterable instance that just returns
|
||||||
* the given Iterator from its iterator() method.
|
* the given Iterator from its iterator() method.
|
||||||
*
|
*
|
||||||
* This is useful for using an iterator in a foreach loop directly.
|
* This is useful for using an iterator in a foreach loop directly.
|
||||||
*
|
*
|
||||||
* eg)
|
* e.g.
|
||||||
*
|
*
|
||||||
* for(Object o : iterable(list.listIterator())) {
|
* for(Object o : iterable(list.listIterator())) {
|
||||||
* // do something
|
* // do something
|
||||||
|
@ -90,8 +86,6 @@ public final class CollectionUtils {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds the first object in the heterogeneous list that is an instance of
|
* Finds the first object in the heterogeneous list that is an instance of
|
||||||
* the given class, removes it from the list, and returns it.
|
* the given class, removes it from the list, and returns it.
|
||||||
|
|
Loading…
Add table
Reference in a new issue