diff options
Diffstat (limited to 'component/src/main/java/com/yahoo/container/util/Util.java')
-rw-r--r-- | component/src/main/java/com/yahoo/container/util/Util.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/component/src/main/java/com/yahoo/container/util/Util.java b/component/src/main/java/com/yahoo/container/util/Util.java new file mode 100644 index 00000000000..4a8923ac218 --- /dev/null +++ b/component/src/main/java/com/yahoo/container/util/Util.java @@ -0,0 +1,27 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.container.util; + +/** + * TODO: What is this? + * + * @author tonytv + */ +// TODO: Move to a a more appropriate package in vespajlib +// TODO: Fix name +public class Util { + + // TODO: What is this? + @SafeVarargs + public static <T> T firstNonNull(T... args) { + for (T arg : args) { + if (arg != null) + return arg; + } + return null; + } + + // TODO: What is this? + public static String quote(Object object) { + return "'" + object + "'"; + } +} |