Java: Add tests

This commit is contained in:
Joe
2020-10-01 15:11:13 +01:00
committed by Joe Farebrother
parent e196c75b4e
commit 28647b20e2
7 changed files with 311 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
/*
* Copyright (C) 2008 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.common.base;
import java.util.Iterator;
import java.util.Map;
public class Joiner {
public static Joiner on(String separator) {
return null;
}
public final StringBuilder appendTo(StringBuilder builder, Object first, Object second, Object... rest) {
return null;
}
public final String join(Object first, Object second, Object... rest) {
return null;
}
public Joiner useForNull(final String nullText) {
return null;
}
public Joiner skipNulls() {
return null;
}
public MapJoiner withKeyValueSeparator(String keyValueSeparator) {
return null;
}
public static final class MapJoiner {
public StringBuilder appendTo(StringBuilder builder, Map<?, ?> map) {
return null;
}
public String join(Map<?, ?> map) {
return null;
}
public MapJoiner useForNull(String nullText) {
return null;
}
}
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright (C) 2009 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.common.base;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
public final class Splitter {
public static Splitter on(final String separator) {
return null;
}
public Splitter omitEmptyStrings() {
return null;;
}
public Iterable<String> split(final CharSequence sequence) {
return null;
}
public List<String> splitToList(CharSequence sequence) {
return null;
}
public MapSplitter withKeyValueSeparator(String separator) {
return null;
}
public static final class MapSplitter {
public Map<String, String> split(CharSequence sequence) {
return null;
}
}
}

View File

@@ -0,0 +1,53 @@
/*
* Copyright (C) 2010 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.common.base;
public final class Strings {
public static String nullToEmpty(String string) {
return null;
}
public static String emptyToNull(String string) {
return null;
}
public static boolean isNullOrEmpty(String string) {
return true;
}
public static String padStart(String string, int minLength, char padChar) {
return null;
}
public static String padEnd(String string, int minLength, char padChar) {
return null;
}
public static String repeat(String string, int count) {
return null;
}
public static String commonPrefix(CharSequence a, CharSequence b) {
return null;
}
public static String commonSuffix(CharSequence a, CharSequence b) {
return null;
}
public static String lenientFormat(String template, Object ... args) {
return null;
}
}