Tal Nisan has uploaded a new change for review. Change subject: frontend: Remove obsolete class ......................................................................
frontend: Remove obsolete class Change-Id: I87235688f1484071f9554594bcae68a8fef7fbc8 Signed-off-by: Tal Nisan <[email protected]> --- D frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Extensions.java 1 file changed, 0 insertions(+), 86 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/28282/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Extensions.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Extensions.java deleted file mode 100644 index e113a21..0000000 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Extensions.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.ovirt.engine.ui.uicommonweb; - -import java.util.ArrayList; - -/** - * Contains extension methods for some common operation. - */ -@SuppressWarnings("unused") -public final class Extensions -{ - /** - * Separates a selected strings (by selector expression) with a separator character. - */ - // public static string Separate<TSource>(this IEnumerable<TSource> source, char separator, Func<TSource, string> - // selector) - // { - // string str = source.Select(selector).Aggregate(String.Empty, (c, d) => c += d + separator); - // if (!String.IsNullOrEmpty(str)) - // { - // str = str.Remove(str.Length - 1); - // } - - // return str; - // } - - /** - * Flattens an exception tree, exception itself and all inner ones. - */ - public static Iterable<RuntimeException> flatten(RuntimeException source) - { - ArrayList<RuntimeException> result = new ArrayList<RuntimeException>(); - RuntimeException ex = source; - - // TODO: Can't convert to Java. - // while (ex != null) - // { - // result.Add(ex); - // ex = ex.InnerException; - // } - - result.add(ex); - - return result; - } - - /** - * Applies a specific action to each element of enumeration. Pay attention! Enumeration is done on the source itself - * rather than on a new instance as it done in case of ToList.ForEach When using this method don't change - * enumeration by adding of removing elements. - */ - // public static void Each<T>(this IEnumerable<T> source, Action<T> action) - // { - // foreach (var item in source) - // { - // action(item); - // } - // } - - // public static void EachRecursive<T>(this T source, Func<T, IEnumerable<T>> childrenSelector, Action<T, - // IEnumerable<T>> action) - // { - // var children = childrenSelector(source); - // action(source, children); - - // if (children != null) - // { - // children.Each(a => a.EachRecursive(childrenSelector, action)); - // } - // } - - - /** - * Sort by comparer created at runtime - * - * <typeparam name="TSource"></typeparam> <typeparam name="TValue"></typeparam> - * - * @param source - * @param selector - */ - // public static void Sort<TSource, TValue>(this List<TSource> source, - // Func<TSource, TValue> selector) - // { - // var comparer = Comparer<TValue>.Default; - // source.Sort((a, b) => comparer.Compare(selector(a), selector(b))); - // } -} -- To view, visit http://gerrit.ovirt.org/28282 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87235688f1484071f9554594bcae68a8fef7fbc8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tal Nisan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
