|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | + * contributor license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright ownership. |
| 5 | + * The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | + * (the "License"); you may not use this file except in compliance with |
| 7 | + * the License. You may obtain a copy of the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
| 16 | + */ |
| 17 | +package org.apache.commons.lang3; |
| 18 | + |
| 19 | +import java.io.IOException; |
| 20 | +import java.io.Serializable; |
| 21 | +import java.lang.reflect.Array; |
| 22 | +import java.lang.reflect.InvocationTargetException; |
| 23 | +import java.lang.reflect.Method; |
| 24 | +import java.time.Duration; |
| 25 | +import java.util.Collection; |
| 26 | +import java.util.Collections; |
| 27 | +import java.util.Comparator; |
| 28 | +import java.util.HashMap; |
| 29 | +import java.util.Map; |
| 30 | +import java.util.Objects; |
| 31 | +import java.util.TreeSet; |
| 32 | +import java.util.function.Supplier; |
| 33 | + |
| 34 | +import org.apache.commons.lang3.text.StrBuilder; |
| 35 | + |
| 36 | +@SuppressWarnings("deprecation") // deprecated class StrBuilder is imported |
| 37 | +// because it is part of the signature of deprecated methods |
| 38 | +public class ObjectUtils { |
| 39 | + public static class Null implements Serializable { |
| 40 | + } |
| 41 | + public static final Null NULL = new Null(); |
| 42 | + |
| 43 | + public static boolean allNotNull(final Object... values) { |
| 44 | + return false; |
| 45 | + } |
| 46 | + |
| 47 | + public static boolean allNull(final Object... values) { |
| 48 | + return false; |
| 49 | + } |
| 50 | + |
| 51 | + public static boolean anyNotNull(final Object... values) { |
| 52 | + return false; |
| 53 | + } |
| 54 | + |
| 55 | + public static boolean anyNull(final Object... values) { |
| 56 | + return false; |
| 57 | + } |
| 58 | + |
| 59 | + public static <T> T clone(final T obj) { |
| 60 | + return null; |
| 61 | + } |
| 62 | + |
| 63 | + public static <T> T cloneIfPossible(final T obj) { |
| 64 | + return null; |
| 65 | + } |
| 66 | + |
| 67 | + public static <T extends Comparable<? super T>> int compare(final T c1, final T c2) { |
| 68 | + return 0; |
| 69 | + } |
| 70 | + |
| 71 | + public static <T extends Comparable<? super T>> int compare(final T c1, final T c2, final boolean nullGreater) { |
| 72 | + return 0; |
| 73 | + } |
| 74 | + |
| 75 | + public static boolean CONST(final boolean v) { |
| 76 | + return false; |
| 77 | + } |
| 78 | + |
| 79 | + public static byte CONST(final byte v) { |
| 80 | + return 0; |
| 81 | + } |
| 82 | + |
| 83 | + public static char CONST(final char v) { |
| 84 | + return '\0'; |
| 85 | + } |
| 86 | + |
| 87 | + public static double CONST(final double v) { |
| 88 | + return 0; |
| 89 | + } |
| 90 | + |
| 91 | + public static float CONST(final float v) { |
| 92 | + return 0; |
| 93 | + } |
| 94 | + |
| 95 | + public static int CONST(final int v) { |
| 96 | + return 0; |
| 97 | + } |
| 98 | + |
| 99 | + public static long CONST(final long v) { |
| 100 | + return 0; |
| 101 | + } |
| 102 | + |
| 103 | + public static short CONST(final short v) { |
| 104 | + return 0; |
| 105 | + } |
| 106 | + |
| 107 | + public static <T> T CONST(final T v) { |
| 108 | + return null; |
| 109 | + } |
| 110 | + |
| 111 | + public static byte CONST_BYTE(final int v) { |
| 112 | + return 0; |
| 113 | + } |
| 114 | + |
| 115 | + public static short CONST_SHORT(final int v) { |
| 116 | + return 0; |
| 117 | + } |
| 118 | + |
| 119 | + public static <T> T defaultIfNull(final T object, final T defaultValue) { |
| 120 | + return null; |
| 121 | + } |
| 122 | + |
| 123 | + public static boolean equals(final Object object1, final Object object2) { |
| 124 | + return false; |
| 125 | + } |
| 126 | + |
| 127 | + public static <T> T firstNonNull(final T... values) { |
| 128 | + return null; |
| 129 | + } |
| 130 | + |
| 131 | + public static <T> T getFirstNonNull(final Supplier<T>... suppliers) { |
| 132 | + return null; |
| 133 | + } |
| 134 | + |
| 135 | + public static <T> T getIfNull(final T object, final Supplier<T> defaultSupplier) { |
| 136 | + return null; |
| 137 | + } |
| 138 | + |
| 139 | + public static int hashCode(final Object obj) { |
| 140 | + return 0; |
| 141 | + } |
| 142 | + |
| 143 | + public static int hashCodeMulti(final Object... objects) { |
| 144 | + return 0; |
| 145 | + } |
| 146 | + |
| 147 | + public static void identityToString(final Appendable appendable, final Object object) throws IOException { |
| 148 | + } |
| 149 | + |
| 150 | + public static String identityToString(final Object object) { |
| 151 | + return null; |
| 152 | + } |
| 153 | + |
| 154 | + public static void identityToString(final StrBuilder builder, final Object object) { |
| 155 | + } |
| 156 | + |
| 157 | + public static void identityToString(final StringBuffer buffer, final Object object) { |
| 158 | + } |
| 159 | + |
| 160 | + public static void identityToString(final StringBuilder builder, final Object object) { |
| 161 | + } |
| 162 | + |
| 163 | + public static boolean isEmpty(final Object object) { |
| 164 | + return false; |
| 165 | + } |
| 166 | + |
| 167 | + public static boolean isNotEmpty(final Object object) { |
| 168 | + return false; |
| 169 | + } |
| 170 | + |
| 171 | + public static <T extends Comparable<? super T>> T max(final T... values) { |
| 172 | + return null; |
| 173 | + } |
| 174 | + |
| 175 | + public static <T> T median(final Comparator<T> comparator, final T... items) { |
| 176 | + return null; |
| 177 | + } |
| 178 | + |
| 179 | + public static <T extends Comparable<? super T>> T median(final T... items) { |
| 180 | + return null; |
| 181 | + } |
| 182 | + |
| 183 | + public static <T extends Comparable<? super T>> T min(final T... values) { |
| 184 | + return null; |
| 185 | + } |
| 186 | + |
| 187 | + public static <T> T mode(final T... items) { |
| 188 | + return null; |
| 189 | + } |
| 190 | + |
| 191 | + public static boolean notEqual(final Object object1, final Object object2) { |
| 192 | + return false; |
| 193 | + } |
| 194 | + |
| 195 | + public static <T> T requireNonEmpty(final T obj) { |
| 196 | + return null; |
| 197 | + } |
| 198 | + |
| 199 | + public static <T> T requireNonEmpty(final T obj, final String message) { |
| 200 | + return null; |
| 201 | + } |
| 202 | + |
| 203 | + public static String toString(final Object obj) { |
| 204 | + return null; |
| 205 | + } |
| 206 | + |
| 207 | + public static String toString(final Object obj, final String nullStr) { |
| 208 | + return null; |
| 209 | + } |
| 210 | + |
| 211 | + public static String toString(final Object obj, final Supplier<String> supplier) { |
| 212 | + return null; |
| 213 | + } |
| 214 | + |
| 215 | + public static void wait(final Object obj, final Duration duration) throws InterruptedException { |
| 216 | + } |
| 217 | + |
| 218 | + public ObjectUtils() { |
| 219 | + } |
| 220 | + |
| 221 | +} |
0 commit comments