code
stringlengths
3
1.18M
language
stringclasses
1 value
/* * 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.collect; public class TreeMultimapNaturalTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testComparators() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testComparators(); } public void testCreateFromHashMultimap() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testCreateFromHashMultimap(); } public void testCreateFromSortedSetMultimap() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testCreateFromSortedSetMultimap(); } public void testCreateFromTreeMultimap() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testCreateFromTreeMultimap(); } public void testMultimapConstructor() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testMultimapConstructor(); } public void testOrderedAsMapEntries() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testOrderedAsMapEntries(); } public void testOrderedEntries() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testOrderedEntries(); } public void testOrderedGet() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testOrderedGet(); } public void testOrderedKeySet() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testOrderedKeySet(); } public void testOrderedValues() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testOrderedValues(); } public void testTailSetClear() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testTailSetClear(); } public void testToString() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testToString(); } public void testTreeMultimapAsMapSorted() throws Exception { com.google.common.collect.TreeMultimapNaturalTest testCase = new com.google.common.collect.TreeMultimapNaturalTest(); testCase.testTreeMultimapAsMapSorted(); } }
Java
/* * 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.collect; public class MapsTransformValuesTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testClear() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testClear(); } public void testContainsKey() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testContainsKey(); } public void testContainsValue() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testContainsValue(); } public void testEntrySet() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testEqualsForSmallerMap(); } public void testGet() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testGet(); } public void testGetForEmptyMap() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testGetForEmptyMap(); } public void testGetNull() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testGetNull(); } public void testHashCode() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testHashCode(); } public void testHashCodeForEmptyMap() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testKeySetClear(); } public void testKeySetRemove() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testPutAllNewKey(); } public void testPutExistingKey() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testPutExistingKey(); } public void testPutNewKey() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testPutNewKey(); } public void testPutNullKey() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testPutNullKey(); } public void testPutNullValue() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testPutNullValueForExistingKey(); } public void testRemove() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testRemove(); } public void testRemoveMissingKey() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testRemoveMissingKey(); } public void testSize() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testSize(); } public void testTransformChangesAreReflectedInUnderlyingMap() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testTransformChangesAreReflectedInUnderlyingMap(); } public void testTransformEmptyMapEquality() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testTransformEmptyMapEquality(); } public void testTransformEntrySetContains() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testTransformEntrySetContains(); } public void testTransformEqualityOfMapsWithNullValues() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testTransformEqualityOfMapsWithNullValues(); } public void testTransformEquals() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testTransformEquals(); } public void testTransformIdentityFunctionEquality() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testTransformIdentityFunctionEquality(); } public void testTransformPutEntryIsUnsupported() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testTransformPutEntryIsUnsupported(); } public void testTransformReflectsUnderlyingMap() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testTransformReflectsUnderlyingMap(); } public void testTransformRemoveEntry() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testTransformRemoveEntry(); } public void testTransformSingletonMapEquality() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testTransformSingletonMapEquality(); } public void testValues() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testValues(); } public void testValuesClear() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testValuesClear(); } public void testValuesIteratorRemove() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testValuesIteratorRemove(); } public void testValuesRemove() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testValuesRemove(); } public void testValuesRemoveAll() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty() throws Exception { com.google.common.collect.MapsTransformValuesTest testCase = new com.google.common.collect.MapsTransformValuesTest(); testCase.testValuesRetainAllNullFromEmpty(); } }
Java
/* * 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.collect; public class AbstractMapEntryTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testEquals() throws Exception { com.google.common.collect.AbstractMapEntryTest testCase = new com.google.common.collect.AbstractMapEntryTest(); testCase.testEquals(); } public void testEqualsNull() throws Exception { com.google.common.collect.AbstractMapEntryTest testCase = new com.google.common.collect.AbstractMapEntryTest(); testCase.testEqualsNull(); } public void testHashCode() throws Exception { com.google.common.collect.AbstractMapEntryTest testCase = new com.google.common.collect.AbstractMapEntryTest(); testCase.testHashCode(); } public void testHashCodeNull() throws Exception { com.google.common.collect.AbstractMapEntryTest testCase = new com.google.common.collect.AbstractMapEntryTest(); testCase.testHashCodeNull(); } public void testToString() throws Exception { com.google.common.collect.AbstractMapEntryTest testCase = new com.google.common.collect.AbstractMapEntryTest(); testCase.testToString(); } public void testToStringNull() throws Exception { com.google.common.collect.AbstractMapEntryTest testCase = new com.google.common.collect.AbstractMapEntryTest(); testCase.testToStringNull(); } }
Java
/* * 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.collect; public class TableCollectionTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testClear__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testClear(); } public void testContainsKey__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testContainsKey(); } public void testContainsValue__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testContainsValue(); } public void testEntrySet__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testGet(); } public void testGetForEmptyMap__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testGetNull(); } public void testHashCode__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testRemoveMissingKey(); } public void testSize__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testSize(); } public void testValues__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testValues(); } public void testValuesClear__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__UnmodifiableTreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testClear(); } public void testContainsKey__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testContainsKey(); } public void testContainsValue__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testContainsValue(); } public void testEntrySet__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testGet(); } public void testGetForEmptyMap__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testGetNull(); } public void testHashCode__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testRemoveMissingKey(); } public void testSize__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testSize(); } public void testValues__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testValues(); } public void testValuesClear__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__UnmodifiableHashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testClear(); } public void testContainsKey__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testContainsKey(); } public void testContainsValue__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testContainsValue(); } public void testEntrySet__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testGet(); } public void testGetForEmptyMap__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testGetNull(); } public void testHashCode__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testRemoveMissingKey(); } public void testSize__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testSize(); } public void testValues__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testValues(); } public void testValuesClear__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TransformValueColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testClear(); } public void testContainsKey__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testContainsKey(); } public void testContainsValue__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testContainsValue(); } public void testEntrySet__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testGet(); } public void testGetForEmptyMap__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testGetNull(); } public void testHashCode__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testRemoveMissingKey(); } public void testSize__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testSize(); } public void testValues__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testValues(); } public void testValuesClear__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TreeColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testClear(); } public void testContainsKey__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testContainsKey(); } public void testContainsValue__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testContainsValue(); } public void testEntrySet__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testGet(); } public void testGetForEmptyMap__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testGetNull(); } public void testHashCode__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testRemoveMissingKey(); } public void testSize__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testSize(); } public void testValues__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testValues(); } public void testValuesClear__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__HashColumnMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnMapTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testClear(); } public void testContainsKey__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testContainsKey(); } public void testContainsValue__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testContainsValue(); } public void testEntrySet__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testGet(); } public void testGetForEmptyMap__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testGetNull(); } public void testHashCode__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testRemoveMissingKey(); } public void testSize__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testSize(); } public void testValues__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testValues(); } public void testValuesClear__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__UnmodifiableTreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testClear(); } public void testContainsKey__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testContainsKey(); } public void testContainsValue__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testContainsValue(); } public void testEntrySet__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testGet(); } public void testGetForEmptyMap__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testGetNull(); } public void testHashCode__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testRemoveMissingKey(); } public void testSize__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testSize(); } public void testValues__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testValues(); } public void testValuesClear__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__UnmodifiableHashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testClear(); } public void testContainsKey__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testContainsKey(); } public void testContainsValue__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testContainsValue(); } public void testEntrySet__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testGet(); } public void testGetForEmptyMap__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testGetNull(); } public void testHashCode__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testRemoveMissingKey(); } public void testSize__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testSize(); } public void testValues__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testValues(); } public void testValuesClear__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TransformValueRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testClear(); } public void testContainsKey__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testContainsKey(); } public void testContainsValue__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testContainsValue(); } public void testEntrySet__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testGet(); } public void testGetForEmptyMap__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testGetNull(); } public void testHashCode__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testRemoveMissingKey(); } public void testSize__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testSize(); } public void testValues__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testValues(); } public void testValuesClear__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TreeRowMapSubMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapSubMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testClear(); } public void testContainsKey__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testContainsKey(); } public void testContainsValue__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testContainsValue(); } public void testEntrySet__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testGet(); } public void testGetForEmptyMap__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testGetNull(); } public void testHashCode__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testRemoveMissingKey(); } public void testSize__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testSize(); } public void testValues__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testValues(); } public void testValuesClear__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TreeRowMapTailMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTailMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testClear(); } public void testContainsKey__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testContainsKey(); } public void testContainsValue__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testContainsValue(); } public void testEntrySet__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testGet(); } public void testGetForEmptyMap__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testGetNull(); } public void testHashCode__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testRemoveMissingKey(); } public void testSize__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testSize(); } public void testValues__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testValues(); } public void testValuesClear__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TreeRowMapHeadMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapHeadMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testClear(); } public void testContainsKey__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testContainsKey(); } public void testContainsValue__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testContainsValue(); } public void testEntrySet__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testGet(); } public void testGetForEmptyMap__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testGetNull(); } public void testHashCode__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testRemoveMissingKey(); } public void testSize__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testSize(); } public void testValues__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testValues(); } public void testValuesClear__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TreeRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowMapTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testClear(); } public void testContainsKey__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testContainsKey(); } public void testContainsValue__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testContainsValue(); } public void testEntrySet__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testEqualsForSmallerMap(); } public void testGet__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testGet(); } public void testGetForEmptyMap__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testGetForEmptyMap(); } public void testGetNull__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testGetNull(); } public void testHashCode__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testKeySetClear(); } public void testKeySetRemove__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testPutExistingKey(); } public void testPutNewKey__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testPutNewKey(); } public void testPutNullKey__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testPutNullKey(); } public void testPutNullValue__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testRemove(); } public void testRemoveMissingKey__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testRemoveMissingKey(); } public void testSize__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testSize(); } public void testValues__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testValues(); } public void testValuesClear__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__HashRowMapTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowMapTests testCase = new com.google.common.collect.TableCollectionTest.HashRowMapTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testClear(); } public void testContainsKey__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testContainsKey(); } public void testContainsValue__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testContainsValue(); } public void testEntrySet__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testEqualsForSmallerMap(); } public void testGet__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testGet(); } public void testGetForEmptyMap__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testGetForEmptyMap(); } public void testGetNull__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testGetNull(); } public void testHashCode__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testKeySetClear(); } public void testKeySetRemove__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testPutExistingKey(); } public void testPutNewKey__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testPutNewKey(); } public void testPutNullKey__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testPutNullKey(); } public void testPutNullValue__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testRemove(); } public void testRemoveMissingKey__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testRemoveMissingKey(); } public void testSize__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testSize(); } public void testValues__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testValues(); } public void testValuesClear__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__UnmodifiableTreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeColumnTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testClear(); } public void testContainsKey__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testContainsKey(); } public void testContainsValue__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testContainsValue(); } public void testEntrySet__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testEqualsForSmallerMap(); } public void testGet__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testGet(); } public void testGetForEmptyMap__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testGetForEmptyMap(); } public void testGetNull__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testGetNull(); } public void testHashCode__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testKeySetClear(); } public void testKeySetRemove__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testPutExistingKey(); } public void testPutNewKey__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testPutNewKey(); } public void testPutNullKey__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testPutNullKey(); } public void testPutNullValue__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testRemove(); } public void testRemoveMissingKey__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testRemoveMissingKey(); } public void testSize__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testSize(); } public void testValues__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testValues(); } public void testValuesClear__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__UnmodifiableHashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashColumnTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testClear(); } public void testContainsKey__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testContainsKey(); } public void testContainsValue__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testContainsValue(); } public void testEntrySet__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testGet(); } public void testGetForEmptyMap__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testGetNull(); } public void testHashCode__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testPutNewKey(); } public void testPutNullKey__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testPutNullKey(); } public void testPutNullValue__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testRemove(); } public void testRemoveMissingKey__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testRemoveMissingKey(); } public void testSize__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testSize(); } public void testValues__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testValues(); } public void testValuesClear__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TransformValueColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueColumnTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testClear(); } public void testContainsKey__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testContainsKey(); } public void testContainsValue__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testContainsValue(); } public void testEntrySet__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testGet(); } public void testGetForEmptyMap__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testGetNull(); } public void testHashCode__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testPutNewKey(); } public void testPutNullKey__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testPutNullKey(); } public void testPutNullValue__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testRemove(); } public void testRemoveMissingKey__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testRemoveMissingKey(); } public void testSize__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testSize(); } public void testValues__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testValues(); } public void testValuesClear__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TransposeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TransposeColumnTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testClear(); } public void testContainsKey__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testContainsKey(); } public void testContainsValue__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testContainsValue(); } public void testEntrySet__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testGet(); } public void testGetForEmptyMap__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testGetNull(); } public void testHashCode__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testPutNewKey(); } public void testPutNullKey__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testPutNullKey(); } public void testPutNullValue__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testRemove(); } public void testRemoveMissingKey__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testRemoveMissingKey(); } public void testSize__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testSize(); } public void testValues__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testValues(); } public void testValuesClear__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TreeColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeColumnTests testCase = new com.google.common.collect.TableCollectionTest.TreeColumnTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testClear(); } public void testContainsKey__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testContainsKey(); } public void testContainsValue__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testContainsValue(); } public void testEntrySet__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testEqualsForSmallerMap(); } public void testGet__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testGet(); } public void testGetForEmptyMap__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testGetForEmptyMap(); } public void testGetNull__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testGetNull(); } public void testHashCode__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testKeySetClear(); } public void testKeySetRemove__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testPutExistingKey(); } public void testPutNewKey__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testPutNewKey(); } public void testPutNullKey__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testPutNullKey(); } public void testPutNullValue__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testRemove(); } public void testRemoveMissingKey__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testRemoveMissingKey(); } public void testSize__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testSize(); } public void testValues__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testValues(); } public void testValuesClear__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__HashColumnTests() throws Exception { com.google.common.collect.TableCollectionTest.HashColumnTests testCase = new com.google.common.collect.TableCollectionTest.HashColumnTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testClear(); } public void testContainsKey__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testContainsKey(); } public void testContainsValue__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testContainsValue(); } public void testEntrySet__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testEqualsForSmallerMap(); } public void testGet__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testGet(); } public void testGetForEmptyMap__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testGetForEmptyMap(); } public void testGetNull__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testGetNull(); } public void testHashCode__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testKeySetClear(); } public void testKeySetRemove__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testPutExistingKey(); } public void testPutNewKey__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testPutNewKey(); } public void testPutNullKey__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testPutNullKey(); } public void testPutNullValue__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testRemove(); } public void testRemoveMissingKey__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testRemoveMissingKey(); } public void testSize__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testSize(); } public void testValues__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testValues(); } public void testValuesClear__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__UnmodifiableTreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableTreeRowTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testClear(); } public void testContainsKey__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testContainsKey(); } public void testContainsValue__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testContainsValue(); } public void testEntrySet__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testEqualsForSmallerMap(); } public void testGet__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testGet(); } public void testGetForEmptyMap__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testGetForEmptyMap(); } public void testGetNull__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testGetNull(); } public void testHashCode__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testKeySetClear(); } public void testKeySetRemove__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testPutExistingKey(); } public void testPutNewKey__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testPutNewKey(); } public void testPutNullKey__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testPutNullKey(); } public void testPutNullValue__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testRemove(); } public void testRemoveMissingKey__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testRemoveMissingKey(); } public void testSize__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testSize(); } public void testValues__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testValues(); } public void testValuesClear__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__UnmodifiableHashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests testCase = new com.google.common.collect.TableCollectionTest.UnmodifiableHashRowTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testClear(); } public void testContainsKey__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testContainsKey(); } public void testContainsValue__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testContainsValue(); } public void testEntrySet__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testGet(); } public void testGetForEmptyMap__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testGetNull(); } public void testHashCode__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testPutNewKey(); } public void testPutNullKey__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testPutNullKey(); } public void testPutNullValue__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testRemove(); } public void testRemoveMissingKey__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testRemoveMissingKey(); } public void testSize__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testSize(); } public void testValues__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testValues(); } public void testValuesClear__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TransformValueRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransformValueRowTests testCase = new com.google.common.collect.TableCollectionTest.TransformValueRowTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testClear(); } public void testContainsKey__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testContainsKey(); } public void testContainsValue__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testContainsValue(); } public void testEntrySet__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testGet(); } public void testGetForEmptyMap__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testGetNull(); } public void testHashCode__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testPutNewKey(); } public void testPutNullKey__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testPutNullKey(); } public void testPutNullValue__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testRemove(); } public void testRemoveMissingKey__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testRemoveMissingKey(); } public void testSize__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testSize(); } public void testValues__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testValues(); } public void testValuesClear__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TransposeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TransposeRowTests testCase = new com.google.common.collect.TableCollectionTest.TransposeRowTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testClear(); } public void testContainsKey__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testContainsKey(); } public void testContainsValue__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testContainsValue(); } public void testEntrySet__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testEqualsForSmallerMap(); } public void testGet__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testGet(); } public void testGetForEmptyMap__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testGetForEmptyMap(); } public void testGetNull__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testGetNull(); } public void testHashCode__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testKeySetClear(); } public void testKeySetRemove__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testPutExistingKey(); } public void testPutNewKey__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testPutNewKey(); } public void testPutNullKey__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testPutNullKey(); } public void testPutNullValue__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testRemove(); } public void testRemoveMissingKey__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testRemoveMissingKey(); } public void testSize__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testSize(); } public void testValues__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testValues(); } public void testValuesClear__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__TreeRowTests() throws Exception { com.google.common.collect.TableCollectionTest.TreeRowTests testCase = new com.google.common.collect.TableCollectionTest.TreeRowTests(); testCase.testValuesRetainAllNullFromEmpty(); } public void testClear__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testClear(); } public void testContainsKey__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testContainsKey(); } public void testContainsValue__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testContainsValue(); } public void testEntrySet__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testEqualsForSmallerMap(); } public void testGet__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testGet(); } public void testGetForEmptyMap__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testGetForEmptyMap(); } public void testGetNull__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testGetNull(); } public void testHashCode__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testHashCode(); } public void testHashCodeForEmptyMap__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testKeySetClear(); } public void testKeySetRemove__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testPutAllNewKey(); } public void testPutExistingKey__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testPutExistingKey(); } public void testPutNewKey__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testPutNewKey(); } public void testPutNullKey__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testPutNullKey(); } public void testPutNullValue__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testPutNullValueForExistingKey(); } public void testRemove__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testRemove(); } public void testRemoveMissingKey__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testRemoveMissingKey(); } public void testSize__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testSize(); } public void testValues__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testValues(); } public void testValuesClear__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testValuesClear(); } public void testValuesIteratorRemove__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testValuesIteratorRemove(); } public void testValuesRemove__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testValuesRemove(); } public void testValuesRemoveAll__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty__HashRowTests() throws Exception { com.google.common.collect.TableCollectionTest.HashRowTests testCase = new com.google.common.collect.TableCollectionTest.HashRowTests(); testCase.testValuesRetainAllNullFromEmpty(); } }
Java
/* * 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.collect; public class LinkedHashMultisetTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testCreate() throws Exception { com.google.common.collect.LinkedHashMultisetTest testCase = new com.google.common.collect.LinkedHashMultisetTest(); testCase.testCreate(); } public void testCreateFromIterable() throws Exception { com.google.common.collect.LinkedHashMultisetTest testCase = new com.google.common.collect.LinkedHashMultisetTest(); testCase.testCreateFromIterable(); } public void testCreateWithSize() throws Exception { com.google.common.collect.LinkedHashMultisetTest testCase = new com.google.common.collect.LinkedHashMultisetTest(); testCase.testCreateWithSize(); } public void testLosesPlaceInLine() throws Exception { com.google.common.collect.LinkedHashMultisetTest testCase = new com.google.common.collect.LinkedHashMultisetTest(); testCase.testLosesPlaceInLine(); } public void testToString() throws Exception { com.google.common.collect.LinkedHashMultisetTest testCase = new com.google.common.collect.LinkedHashMultisetTest(); testCase.testToString(); } }
Java
/* * 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.collect; public class MapConstraintsTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testConstrainedBiMapIllegal() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testConstrainedBiMapIllegal(); } public void testConstrainedBiMapLegal() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testConstrainedBiMapLegal(); } public void testConstrainedMapIllegal() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testConstrainedMapIllegal(); } public void testConstrainedMapLegal() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testConstrainedMapLegal(); } public void testConstrainedMultimapIllegal() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testConstrainedMultimapIllegal(); } public void testConstrainedMultimapLegal() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testConstrainedMultimapLegal(); } public void testConstrainedMultimapQueue() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testConstrainedMultimapQueue(); } public void testConstrainedTypePreservingList() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testConstrainedTypePreservingList(); } public void testConstrainedTypePreservingRandomAccessList() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testConstrainedTypePreservingRandomAccessList(); } public void testConstrainedTypePreservingSet() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testConstrainedTypePreservingSet(); } public void testConstrainedTypePreservingSortedSet() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testConstrainedTypePreservingSortedSet(); } public void testMapEntrySetContainsNefariousEntry() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testMapEntrySetContainsNefariousEntry(); } public void testMapEntrySetToArray() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testMapEntrySetToArray(); } public void testMultimapAsMapEntriesContainsNefariousEntry() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testMultimapAsMapEntriesContainsNefariousEntry(); } public void testMultimapAsMapEntriesRemoveNefariousEntry() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testMultimapAsMapEntriesRemoveNefariousEntry(); } public void testMultimapAsMapEntriesToArray() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testMultimapAsMapEntriesToArray(); } public void testMultimapAsMapValuesToArray() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testMultimapAsMapValuesToArray(); } public void testMultimapEntriesContainsNefariousEntry() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testMultimapEntriesContainsNefariousEntry(); } public void testMultimapEntriesRemoveNefariousEntry() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testMultimapEntriesRemoveNefariousEntry(); } public void testNefariousMapPutAll() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testNefariousMapPutAll(); } public void testNefariousMultimapGetAddAll() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testNefariousMultimapGetAddAll(); } public void testNefariousMultimapPutAllIterable() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testNefariousMultimapPutAllIterable(); } public void testNefariousMultimapPutAllMultimap() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testNefariousMultimapPutAllMultimap(); } public void testNotNull() throws Exception { com.google.common.collect.MapConstraintsTest testCase = new com.google.common.collect.MapConstraintsTest(); testCase.testNotNull(); } }
Java
/* * 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.collect.testing; import com.google.common.annotations.GwtCompatible; /** * Version of {@link GwtPlatform} used in hosted-mode. It includes methods in * {@link Platform} that requires different implementions in web mode and * hosted mode. It is factored out from {@link Platform} because <code> * {@literal @}GwtScriptOnly</code> (which is applied to the emul version) * supports only public classes and methods. * * @author Hayward Chan */ @GwtCompatible public final class GwtPlatform { private GwtPlatform() {} /** See {@link Platform#clone(Object[])} */ public static <T> T[] clone(T[] array) { return array.clone(); } }
Java
/* * 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.collect; public class ConstraintsTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testConstrainedCollectionIllegal() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testConstrainedCollectionIllegal(); } public void testConstrainedCollectionLegal() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testConstrainedCollectionLegal(); } public void testConstrainedListIllegal() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testConstrainedListIllegal(); } public void testConstrainedListLegal() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testConstrainedListLegal(); } public void testConstrainedListRandomAccessFalse() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testConstrainedListRandomAccessFalse(); } public void testConstrainedMultisetIllegal() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testConstrainedMultisetIllegal(); } public void testConstrainedMultisetLegal() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testConstrainedMultisetLegal(); } public void testConstrainedSetIllegal() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testConstrainedSetIllegal(); } public void testConstrainedSetLegal() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testConstrainedSetLegal(); } public void testConstrainedSortedSetIllegal() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testConstrainedSortedSetIllegal(); } public void testConstrainedSortedSetLegal() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testConstrainedSortedSetLegal(); } public void testNefariousAddAll() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testNefariousAddAll(); } public void testNotNull() throws Exception { com.google.common.collect.ConstraintsTest testCase = new com.google.common.collect.ConstraintsTest(); testCase.testNotNull(); } }
Java
/* * 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.collect; public class ArrayListMultimapTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testCreate() throws Exception { com.google.common.collect.ArrayListMultimapTest testCase = new com.google.common.collect.ArrayListMultimapTest(); testCase.testCreate(); } public void testCreateFromArrayListMultimap() throws Exception { com.google.common.collect.ArrayListMultimapTest testCase = new com.google.common.collect.ArrayListMultimapTest(); testCase.testCreateFromArrayListMultimap(); } public void testCreateFromHashMultimap() throws Exception { com.google.common.collect.ArrayListMultimapTest testCase = new com.google.common.collect.ArrayListMultimapTest(); testCase.testCreateFromHashMultimap(); } public void testCreateFromIllegalSizes() throws Exception { com.google.common.collect.ArrayListMultimapTest testCase = new com.google.common.collect.ArrayListMultimapTest(); testCase.testCreateFromIllegalSizes(); } public void testCreateFromMultimap() throws Exception { com.google.common.collect.ArrayListMultimapTest testCase = new com.google.common.collect.ArrayListMultimapTest(); testCase.testCreateFromMultimap(); } public void testCreateFromSizes() throws Exception { com.google.common.collect.ArrayListMultimapTest testCase = new com.google.common.collect.ArrayListMultimapTest(); testCase.testCreateFromSizes(); } public void testGetRandomAccess() throws Exception { com.google.common.collect.ArrayListMultimapTest testCase = new com.google.common.collect.ArrayListMultimapTest(); testCase.testGetRandomAccess(); } public void testRemoveAllRandomAccess() throws Exception { com.google.common.collect.ArrayListMultimapTest testCase = new com.google.common.collect.ArrayListMultimapTest(); testCase.testRemoveAllRandomAccess(); } public void testReplaceValuesRandomAccess() throws Exception { com.google.common.collect.ArrayListMultimapTest testCase = new com.google.common.collect.ArrayListMultimapTest(); testCase.testReplaceValuesRandomAccess(); } public void testSublistConcurrentModificationException() throws Exception { com.google.common.collect.ArrayListMultimapTest testCase = new com.google.common.collect.ArrayListMultimapTest(); testCase.testSublistConcurrentModificationException(); } public void testTrimToSize() throws Exception { com.google.common.collect.ArrayListMultimapTest testCase = new com.google.common.collect.ArrayListMultimapTest(); testCase.testTrimToSize(); } }
Java
/* * 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.collect; public class LinkedHashMultimapTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testCreate() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testCreate(); } public void testCreateFromIllegalSizes() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testCreateFromIllegalSizes(); } public void testCreateFromMultimap() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testCreateFromMultimap(); } public void testCreateFromSizes() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testCreateFromSizes(); } public void testKeysToString_ordering() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testKeysToString_ordering(); } public void testOrderingReadOnly() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testOrderingReadOnly(); } public void testOrderingSynchronized() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testOrderingSynchronized(); } public void testOrderingUnmodifiable() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testOrderingUnmodifiable(); } public void testOrderingUpdates() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testOrderingUpdates(); } public void testPutMultimapOrdered() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testPutMultimapOrdered(); } public void testToString() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testToString(); } public void testToStringNullExact() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testToStringNullExact(); } public void testValueSetHashTableExpansion() throws Exception { com.google.common.collect.LinkedHashMultimapTest testCase = new com.google.common.collect.LinkedHashMultimapTest(); testCase.testValueSetHashTableExpansion(); } }
Java
/* * 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.collect; public class EmptyImmutableTableTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testCellSet() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testCellSet(); } public void testClear() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testClear(); } public void testColumn() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testColumn(); } public void testColumnKeySet() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testColumnKeySet(); } public void testColumnMap() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testColumnMap(); } public void testConsistentHashCode() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testConsistentHashCode(); } public void testConsistentToString() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testConsistentToString(); } public void testContains() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testContains(); } public void testContainsColumn() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testContainsColumn(); } public void testContainsRow() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testContainsRow(); } public void testContainsValue() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testContainsValue(); } public void testEqualsObject() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testEqualsObject(); } public void testGet() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testGet(); } public void testHashCode() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testHashCode(); } public void testIsEmpty() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testIsEmpty(); } public void testPut() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testPut(); } public void testPutAll() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testPutAll(); } public void testRemove() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testRemove(); } public void testRow() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testRow(); } public void testRowKeySet() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testRowKeySet(); } public void testRowMap() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testRowMap(); } public void testSize() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testSize(); } public void testToString() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testToString(); } public void testValues() throws Exception { com.google.common.collect.EmptyImmutableTableTest testCase = new com.google.common.collect.EmptyImmutableTableTest(); testCase.testValues(); } }
Java
/* * 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.collect; public class RegularImmutableAsListTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testDoesntCheckForNull() throws Exception { com.google.common.collect.RegularImmutableAsListTest testCase = new com.google.common.collect.RegularImmutableAsListTest(); testCase.testDoesntCheckForNull(); } }
Java
/* * 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.collect; public class ImmutableListTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testAsList__BasicTests() throws Exception { com.google.common.collect.ImmutableListTest.BasicTests testCase = new com.google.common.collect.ImmutableListTest.BasicTests(); testCase.testAsList(); } public void testBuilderAdd__BasicTests() throws Exception { com.google.common.collect.ImmutableListTest.BasicTests testCase = new com.google.common.collect.ImmutableListTest.BasicTests(); testCase.testBuilderAdd(); } public void testBuilderAddAllHandlesNullsCorrectly__BasicTests() throws Exception { com.google.common.collect.ImmutableListTest.BasicTests testCase = new com.google.common.collect.ImmutableListTest.BasicTests(); testCase.testBuilderAddAllHandlesNullsCorrectly(); } public void testBuilderAddAll_iterable__BasicTests() throws Exception { com.google.common.collect.ImmutableListTest.BasicTests testCase = new com.google.common.collect.ImmutableListTest.BasicTests(); testCase.testBuilderAddAll_iterable(); } public void testBuilderAddAll_iterator__BasicTests() throws Exception { com.google.common.collect.ImmutableListTest.BasicTests testCase = new com.google.common.collect.ImmutableListTest.BasicTests(); testCase.testBuilderAddAll_iterator(); } public void testBuilderAddHandlesNullsCorrectly__BasicTests() throws Exception { com.google.common.collect.ImmutableListTest.BasicTests testCase = new com.google.common.collect.ImmutableListTest.BasicTests(); testCase.testBuilderAddHandlesNullsCorrectly(); } public void testBuilderAdd_varargs__BasicTests() throws Exception { com.google.common.collect.ImmutableListTest.BasicTests testCase = new com.google.common.collect.ImmutableListTest.BasicTests(); testCase.testBuilderAdd_varargs(); } public void testComplexBuilder__BasicTests() throws Exception { com.google.common.collect.ImmutableListTest.BasicTests testCase = new com.google.common.collect.ImmutableListTest.BasicTests(); testCase.testComplexBuilder(); } public void testEquals_immutableList__BasicTests() throws Exception { com.google.common.collect.ImmutableListTest.BasicTests testCase = new com.google.common.collect.ImmutableListTest.BasicTests(); testCase.testEquals_immutableList(); } public void testBuilderAddArrayHandlesNulls__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testBuilderAddArrayHandlesNulls(); } public void testBuilderAddCollectionHandlesNulls__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testBuilderAddCollectionHandlesNulls(); } public void testCopyOf_arrayContainingOnlyNull__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_arrayContainingOnlyNull(); } public void testCopyOf_arrayOfOneElement__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_arrayOfOneElement(); } public void testCopyOf_collectionContainingNull__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_collectionContainingNull(); } public void testCopyOf_collection_empty__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_collection_empty(); } public void testCopyOf_collection_general__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_collection_general(); } public void testCopyOf_collection_oneElement__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_collection_oneElement(); } public void testCopyOf_concurrentlyMutating__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_concurrentlyMutating(); } public void testCopyOf_emptyArray__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_emptyArray(); } public void testCopyOf_iteratorContainingNull__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_iteratorContainingNull(); } public void testCopyOf_iteratorNull__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_iteratorNull(); } public void testCopyOf_iterator_empty__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_iterator_empty(); } public void testCopyOf_iterator_general__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_iterator_general(); } public void testCopyOf_iterator_oneElement__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_iterator_oneElement(); } public void testCopyOf_nullArray__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_nullArray(); } public void testCopyOf_plainIterable__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_plainIterable(); } public void testCopyOf_plainIterable_iteratesOnce__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_plainIterable_iteratesOnce(); } public void testCopyOf_shortcut_empty__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_shortcut_empty(); } public void testCopyOf_shortcut_immutableList__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_shortcut_immutableList(); } public void testCopyOf_shortcut_singleton__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCopyOf_shortcut_singleton(); } public void testCreation_arrayOfArray__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_arrayOfArray(); } public void testCreation_eightElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_eightElements(); } public void testCreation_elevenElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_elevenElements(); } public void testCreation_fiveElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_fiveElements(); } public void testCreation_fourElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_fourElements(); } public void testCreation_fourteenElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_fourteenElements(); } public void testCreation_generic__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_generic(); } public void testCreation_nineElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_nineElements(); } public void testCreation_noArgs__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_noArgs(); } public void testCreation_oneElement__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_oneElement(); } public void testCreation_sevenElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_sevenElements(); } public void testCreation_singletonNull__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_singletonNull(); } public void testCreation_sixElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_sixElements(); } public void testCreation_tenElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_tenElements(); } public void testCreation_thirteenElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_thirteenElements(); } public void testCreation_threeElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_threeElements(); } public void testCreation_twelveElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_twelveElements(); } public void testCreation_twoElements__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_twoElements(); } public void testCreation_withNull__CreationTests() throws Exception { com.google.common.collect.ImmutableListTest.CreationTests testCase = new com.google.common.collect.ImmutableListTest.CreationTests(); testCase.testCreation_withNull(); } }
Java
/* * 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.collect; public class SubMapMultimapAsMapImplementsMapTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testClear() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testClear(); } public void testContainsKey() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testContainsKey(); } public void testContainsValue() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testContainsValue(); } public void testEntrySet() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testEqualsForSmallerMap(); } public void testGet() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testGet(); } public void testGetForEmptyMap() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testGetForEmptyMap(); } public void testGetNull() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testGetNull(); } public void testHashCode() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testHashCode(); } public void testHashCodeForEmptyMap() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testKeySetClear(); } public void testKeySetRemove() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testPutAllNewKey(); } public void testPutExistingKey() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testPutExistingKey(); } public void testPutNewKey() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testPutNewKey(); } public void testPutNullKey() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testPutNullKey(); } public void testPutNullValue() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testPutNullValueForExistingKey(); } public void testRemove() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testRemove(); } public void testRemoveMissingKey() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testRemoveMissingKey(); } public void testSize() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testSize(); } public void testValues() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testValues(); } public void testValuesClear() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testValuesClear(); } public void testValuesIteratorRemove() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testValuesIteratorRemove(); } public void testValuesRemove() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testValuesRemove(); } public void testValuesRemoveAll() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty() throws Exception { com.google.common.collect.SubMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.SubMapMultimapAsMapImplementsMapTest(); testCase.testValuesRetainAllNullFromEmpty(); } }
Java
/* * 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.collect; public class ContiguousSetTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testContains() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testContains(); } public void testContainsAll() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testContainsAll(); } public void testCreate_empty() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testCreate_empty(); } public void testCreate_noMax() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testCreate_noMax(); } public void testCreate_noMin() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testCreate_noMin(); } public void testEquals() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testEquals(); } public void testFirst() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testFirst(); } public void testHeadSet() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testHeadSet(); } public void testHeadSet_tooSmall() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testHeadSet_tooSmall(); } public void testIntersection() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testIntersection(); } public void testIntersection_empty() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testIntersection_empty(); } public void testLast() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testLast(); } public void testRange() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testRange(); } public void testRange_unboundedRange() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testRange_unboundedRange(); } public void testSubSet() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testSubSet(); } public void testSubSet_outOfOrder() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testSubSet_outOfOrder(); } public void testSubSet_tooLarge() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testSubSet_tooLarge(); } public void testSubSet_tooSmall() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testSubSet_tooSmall(); } public void testTailSet() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testTailSet(); } public void testTailSet_tooLarge() throws Exception { com.google.common.collect.ContiguousSetTest testCase = new com.google.common.collect.ContiguousSetTest(); testCase.testTailSet_tooLarge(); } }
Java
/* * 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.collect; public class SetsTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testCartesianProductTooBig() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProductTooBig(); } public void testCartesianProduct_2x2x2() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_2x2x2(); } public void testCartesianProduct_binary0x0() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_binary0x0(); } public void testCartesianProduct_binary0x1() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_binary0x1(); } public void testCartesianProduct_binary1x0() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_binary1x0(); } public void testCartesianProduct_binary1x1() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_binary1x1(); } public void testCartesianProduct_binary1x2() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_binary1x2(); } public void testCartesianProduct_binary2x2() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_binary2x2(); } public void testCartesianProduct_contains() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_contains(); } public void testCartesianProduct_hashCode() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_hashCode(); } public void testCartesianProduct_unary() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_unary(); } public void testCartesianProduct_unrelatedTypes() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_unrelatedTypes(); } public void testCartesianProduct_zeroary() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testCartesianProduct_zeroary(); } public void testComplementOfEmptyEnumSetWithoutType() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testComplementOfEmptyEnumSetWithoutType(); } public void testComplementOfEmptySet() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testComplementOfEmptySet(); } public void testComplementOfEmptySetWithoutTypeDoesntWork() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testComplementOfEmptySetWithoutTypeDoesntWork(); } public void testComplementOfEnumSet() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testComplementOfEnumSet(); } public void testComplementOfEnumSetWithType() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testComplementOfEnumSetWithType(); } public void testComplementOfFullSet() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testComplementOfFullSet(); } public void testComplementOfRegularSet() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testComplementOfRegularSet(); } public void testComplementOfRegularSetWithType() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testComplementOfRegularSetWithType(); } public void testImmutableEnumSet() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testImmutableEnumSet(); } public void testImmutableEnumSet_fromIterable() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testImmutableEnumSet_fromIterable(); } public void testNewConcurrentHashSetEmpty() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewConcurrentHashSetEmpty(); } public void testNewConcurrentHashSetFromCollection() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewConcurrentHashSetFromCollection(); } public void testNewEnumSet_collection() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewEnumSet_collection(); } public void testNewEnumSet_empty() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewEnumSet_empty(); } public void testNewEnumSet_enumSet() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewEnumSet_enumSet(); } public void testNewEnumSet_iterable() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewEnumSet_iterable(); } public void testNewHashSetEmpty() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewHashSetEmpty(); } public void testNewHashSetFromCollection() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewHashSetFromCollection(); } public void testNewHashSetFromIterable() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewHashSetFromIterable(); } public void testNewHashSetFromIterator() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewHashSetFromIterator(); } public void testNewHashSetVarArgs() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewHashSetVarArgs(); } public void testNewHashSetWithExpectedSizeLarge() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewHashSetWithExpectedSizeLarge(); } public void testNewHashSetWithExpectedSizeSmall() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewHashSetWithExpectedSizeSmall(); } public void testNewIdentityHashSet() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewIdentityHashSet(); } public void testNewLinkedHashSetEmpty() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewLinkedHashSetEmpty(); } public void testNewLinkedHashSetFromCollection() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewLinkedHashSetFromCollection(); } public void testNewLinkedHashSetFromIterable() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewLinkedHashSetFromIterable(); } public void testNewLinkedHashSetWithExpectedSizeLarge() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewLinkedHashSetWithExpectedSizeLarge(); } public void testNewLinkedHashSetWithExpectedSizeSmall() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewLinkedHashSetWithExpectedSizeSmall(); } public void testNewSetFromMap() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewSetFromMap(); } public void testNewSetFromMapIllegal() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewSetFromMapIllegal(); } public void testNewTreeSetEmpty() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewTreeSetEmpty(); } public void testNewTreeSetEmptyDerived() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewTreeSetEmptyDerived(); } public void testNewTreeSetEmptyNonGeneric() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewTreeSetEmptyNonGeneric(); } public void testNewTreeSetEmptyWithComparator() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewTreeSetEmptyWithComparator(); } public void testNewTreeSetFromCollection() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewTreeSetFromCollection(); } public void testNewTreeSetFromIterable() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewTreeSetFromIterable(); } public void testNewTreeSetFromIterableDerived() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewTreeSetFromIterableDerived(); } public void testNewTreeSetFromIterableNonGeneric() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testNewTreeSetFromIterableNonGeneric(); } public void testPowerSetContents() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testPowerSetContents(); } public void testPowerSetCreationErrors() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testPowerSetCreationErrors(); } public void testPowerSetEmpty() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testPowerSetEmpty(); } public void testPowerSetEqualsAndHashCode_verifyAgainstHashSet() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testPowerSetEqualsAndHashCode_verifyAgainstHashSet(); } public void testPowerSetHashCode_inputHashCodeTimesTooFarValueIsZero() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testPowerSetHashCode_inputHashCodeTimesTooFarValueIsZero(); } public void testPowerSetIteration_iteratorTester_fast() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testPowerSetIteration_iteratorTester_fast(); } public void testPowerSetIteration_manual() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testPowerSetIteration_manual(); } public void testPowerSetShowOff() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testPowerSetShowOff(); } public void testPowerSetSize() throws Exception { com.google.common.collect.SetsTest testCase = new com.google.common.collect.SetsTest(); testCase.testPowerSetSize(); } }
Java
/* * 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.collect; public class ForMapMultimapAsMapImplementsMapTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testClear() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testClear(); } public void testContainsKey() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testContainsKey(); } public void testContainsValue() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testContainsValue(); } public void testEntrySet() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testEqualsForSmallerMap(); } public void testGet() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testGet(); } public void testGetForEmptyMap() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testGetForEmptyMap(); } public void testGetNull() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testGetNull(); } public void testHashCode() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testHashCode(); } public void testHashCodeForEmptyMap() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testKeySetClear(); } public void testKeySetRemove() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testPutAllNewKey(); } public void testPutExistingKey() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testPutExistingKey(); } public void testPutNewKey() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testPutNewKey(); } public void testPutNullKey() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testPutNullKey(); } public void testPutNullValue() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testPutNullValueForExistingKey(); } public void testRemove() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testRemove(); } public void testRemoveMissingKey() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testRemoveMissingKey(); } public void testSize() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testSize(); } public void testValues() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testValues(); } public void testValuesClear() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testValuesClear(); } public void testValuesIteratorRemove() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testValuesIteratorRemove(); } public void testValuesRemove() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testValuesRemove(); } public void testValuesRemoveAll() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty() throws Exception { com.google.common.collect.ForMapMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ForMapMultimapAsMapImplementsMapTest(); testCase.testValuesRetainAllNullFromEmpty(); } }
Java
/* * 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.collect; public class UnmodifiableListIteratorTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testAdd() throws Exception { com.google.common.collect.UnmodifiableListIteratorTest testCase = new com.google.common.collect.UnmodifiableListIteratorTest(); testCase.testAdd(); } public void testRemove() throws Exception { com.google.common.collect.UnmodifiableListIteratorTest testCase = new com.google.common.collect.UnmodifiableListIteratorTest(); testCase.testRemove(); } public void testSet() throws Exception { com.google.common.collect.UnmodifiableListIteratorTest testCase = new com.google.common.collect.UnmodifiableListIteratorTest(); testCase.testSet(); } }
Java
/* * 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.collect; public class UnmodifiableMultimapAsMapImplementsMapTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testClear() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testClear(); } public void testContainsKey() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testContainsKey(); } public void testContainsValue() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testContainsValue(); } public void testEntrySet() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testEqualsForSmallerMap(); } public void testGet() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testGet(); } public void testGetForEmptyMap() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testGetForEmptyMap(); } public void testGetNull() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testGetNull(); } public void testHashCode() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testHashCode(); } public void testHashCodeForEmptyMap() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testKeySetClear(); } public void testKeySetRemove() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testPutAllNewKey(); } public void testPutExistingKey() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testPutExistingKey(); } public void testPutNewKey() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testPutNewKey(); } public void testPutNullKey() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testPutNullKey(); } public void testPutNullValue() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testPutNullValueForExistingKey(); } public void testRemove() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testRemove(); } public void testRemoveMissingKey() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testRemoveMissingKey(); } public void testSize() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testSize(); } public void testValues() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testValues(); } public void testValuesClear() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testValuesClear(); } public void testValuesIteratorRemove() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testValuesIteratorRemove(); } public void testValuesRemove() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testValuesRemove(); } public void testValuesRemoveAll() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty() throws Exception { com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.UnmodifiableMultimapAsMapImplementsMapTest(); testCase.testValuesRetainAllNullFromEmpty(); } }
Java
/* * 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.collect; public class MapMakerTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testComputerThatReturnsNull__ComputingTest() throws Exception { com.google.common.collect.MapMakerTest.ComputingTest testCase = new com.google.common.collect.MapMakerTest.ComputingTest(); testCase.testComputerThatReturnsNull(); } public void testRuntimeException__ComputingTest() throws Exception { com.google.common.collect.MapMakerTest.ComputingTest testCase = new com.google.common.collect.MapMakerTest.ComputingTest(); testCase.testRuntimeException(); } public void testRecursiveComputation__RecursiveComputationTest() throws Exception { com.google.common.collect.MapMakerTest.RecursiveComputationTest testCase = new com.google.common.collect.MapMakerTest.RecursiveComputationTest(); testCase.testRecursiveComputation(); } public void testPut_sizeIsZero__MaximumSizeTest() throws Exception { com.google.common.collect.MapMakerTest.MaximumSizeTest testCase = new com.google.common.collect.MapMakerTest.MaximumSizeTest(); testCase.testPut_sizeIsZero(); } public void testSizeBasedEviction__MaximumSizeTest() throws Exception { com.google.common.collect.MapMakerTest.MaximumSizeTest testCase = new com.google.common.collect.MapMakerTest.MaximumSizeTest(); testCase.testSizeBasedEviction(); } public void testExpiration_setTwice__MakerTest() throws Exception { com.google.common.collect.MapMakerTest.MakerTest testCase = new com.google.common.collect.MapMakerTest.MakerTest(); testCase.testExpiration_setTwice(); } public void testInitialCapacity_negative__MakerTest() throws Exception { com.google.common.collect.MapMakerTest.MakerTest testCase = new com.google.common.collect.MapMakerTest.MakerTest(); testCase.testInitialCapacity_negative(); } public void testMaximumSize_setTwice__MakerTest() throws Exception { com.google.common.collect.MapMakerTest.MakerTest testCase = new com.google.common.collect.MapMakerTest.MakerTest(); testCase.testMaximumSize_setTwice(); } public void testReturnsPlainConcurrentHashMapWhenPossible__MakerTest() throws Exception { com.google.common.collect.MapMakerTest.MakerTest testCase = new com.google.common.collect.MapMakerTest.MakerTest(); testCase.testReturnsPlainConcurrentHashMapWhenPossible(); } }
Java
/* * 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.collect; public class RangeTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testAll() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testAll(); } public void testApply() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testApply(); } public void testAtLeast() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testAtLeast(); } public void testAtMost() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testAtMost(); } public void testCanonical() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testCanonical(); } public void testCanonical_unboundedDomain() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testCanonical_unboundedDomain(); } public void testClosed() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testClosed(); } public void testClosedOpen() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testClosedOpen(); } public void testClosed_invalid() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testClosed_invalid(); } public void testContainsAll() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testContainsAll(); } public void testEmpty1() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testEmpty1(); } public void testEmpty2() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testEmpty2(); } public void testEncloseAll() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testEncloseAll(); } public void testEncloseAll_empty() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testEncloseAll_empty(); } public void testEncloseAll_nullValue() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testEncloseAll_nullValue(); } public void testEncloses_closed() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testEncloses_closed(); } public void testEncloses_open() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testEncloses_open(); } public void testEquals() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testEquals(); } public void testEquivalentFactories() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testEquivalentFactories(); } public void testGreaterThan() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testGreaterThan(); } public void testIntersection_deFactoEmpty() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testIntersection_deFactoEmpty(); } public void testIntersection_empty() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testIntersection_empty(); } public void testIntersection_general() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testIntersection_general(); } public void testIntersection_singleton() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testIntersection_singleton(); } public void testIsConnected() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testIsConnected(); } public void testLegacyComparable() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testLegacyComparable(); } public void testLessThan() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testLessThan(); } public void testOpen() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testOpen(); } public void testOpenClosed() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testOpenClosed(); } public void testOpen_invalid() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testOpen_invalid(); } public void testOrderingCuts() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testOrderingCuts(); } public void testSingleton() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testSingleton(); } public void testSpan_general() throws Exception { com.google.common.collect.RangeTest testCase = new com.google.common.collect.RangeTest(); testCase.testSpan_general(); } }
Java
/* * 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.collect; public class ImmutableMultimapTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testBuilder_withImmutableEntry() throws Exception { com.google.common.collect.ImmutableMultimapTest testCase = new com.google.common.collect.ImmutableMultimapTest(); testCase.testBuilder_withImmutableEntry(); } public void testBuilder_withImmutableEntryAndNullContents() throws Exception { com.google.common.collect.ImmutableMultimapTest testCase = new com.google.common.collect.ImmutableMultimapTest(); testCase.testBuilder_withImmutableEntryAndNullContents(); } public void testBuilder_withMutableEntry() throws Exception { com.google.common.collect.ImmutableMultimapTest testCase = new com.google.common.collect.ImmutableMultimapTest(); testCase.testBuilder_withMutableEntry(); } public void testCopyOf() throws Exception { com.google.common.collect.ImmutableMultimapTest testCase = new com.google.common.collect.ImmutableMultimapTest(); testCase.testCopyOf(); } public void testEquals() throws Exception { com.google.common.collect.ImmutableMultimapTest testCase = new com.google.common.collect.ImmutableMultimapTest(); testCase.testEquals(); } public void testUnhashableMixedValues() throws Exception { com.google.common.collect.ImmutableMultimapTest testCase = new com.google.common.collect.ImmutableMultimapTest(); testCase.testUnhashableMixedValues(); } public void testUnhashableSingletonValue() throws Exception { com.google.common.collect.ImmutableMultimapTest testCase = new com.google.common.collect.ImmutableMultimapTest(); testCase.testUnhashableSingletonValue(); } }
Java
/* * 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.collect; public class HashMultimapTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testCreate() throws Exception { com.google.common.collect.HashMultimapTest testCase = new com.google.common.collect.HashMultimapTest(); testCase.testCreate(); } public void testCreateFromIllegalSizes() throws Exception { com.google.common.collect.HashMultimapTest testCase = new com.google.common.collect.HashMultimapTest(); testCase.testCreateFromIllegalSizes(); } public void testCreateFromMultimap() throws Exception { com.google.common.collect.HashMultimapTest testCase = new com.google.common.collect.HashMultimapTest(); testCase.testCreateFromMultimap(); } public void testCreateFromSizes() throws Exception { com.google.common.collect.HashMultimapTest testCase = new com.google.common.collect.HashMultimapTest(); testCase.testCreateFromSizes(); } public void testEmptyMultimapsEqual() throws Exception { com.google.common.collect.HashMultimapTest testCase = new com.google.common.collect.HashMultimapTest(); testCase.testEmptyMultimapsEqual(); } }
Java
/* * 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.collect; public class PeekingIteratorTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testCantRemoveAfterPeek() throws Exception { com.google.common.collect.PeekingIteratorTest testCase = new com.google.common.collect.PeekingIteratorTest(); testCase.testCantRemoveAfterPeek(); } public void testPeekDoesntChangeIteration() throws Exception { com.google.common.collect.PeekingIteratorTest testCase = new com.google.common.collect.PeekingIteratorTest(); testCase.testPeekDoesntChangeIteration(); } public void testPeekOnEmptyList() throws Exception { com.google.common.collect.PeekingIteratorTest testCase = new com.google.common.collect.PeekingIteratorTest(); testCase.testPeekOnEmptyList(); } public void testPeekingIteratorBehavesLikeIteratorOnEmptyIterable() throws Exception { com.google.common.collect.PeekingIteratorTest testCase = new com.google.common.collect.PeekingIteratorTest(); testCase.testPeekingIteratorBehavesLikeIteratorOnEmptyIterable(); } public void testPeekingIteratorBehavesLikeIteratorOnSingletonIterable() throws Exception { com.google.common.collect.PeekingIteratorTest testCase = new com.google.common.collect.PeekingIteratorTest(); testCase.testPeekingIteratorBehavesLikeIteratorOnSingletonIterable(); } public void testPeekingIteratorDoesntAdvancePrematurely() throws Exception { com.google.common.collect.PeekingIteratorTest testCase = new com.google.common.collect.PeekingIteratorTest(); testCase.testPeekingIteratorDoesntAdvancePrematurely(); } }
Java
/* * 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.collect; public class TreeTraverserTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testBreadthOrder() throws Exception { com.google.common.collect.TreeTraverserTest testCase = new com.google.common.collect.TreeTraverserTest(); testCase.testBreadthOrder(); } public void testInOrder() throws Exception { com.google.common.collect.TreeTraverserTest testCase = new com.google.common.collect.TreeTraverserTest(); testCase.testInOrder(); } public void testPostOrder() throws Exception { com.google.common.collect.TreeTraverserTest testCase = new com.google.common.collect.TreeTraverserTest(); testCase.testPostOrder(); } public void testPreOrder() throws Exception { com.google.common.collect.TreeTraverserTest testCase = new com.google.common.collect.TreeTraverserTest(); testCase.testPreOrder(); } }
Java
/* * 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.collect; public class TablesTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testEntryEquals() throws Exception { com.google.common.collect.TablesTest testCase = new com.google.common.collect.TablesTest(); testCase.testEntryEquals(); } public void testEntryEqualsNull() throws Exception { com.google.common.collect.TablesTest testCase = new com.google.common.collect.TablesTest(); testCase.testEntryEqualsNull(); } public void testImmutableEntryToString() throws Exception { com.google.common.collect.TablesTest testCase = new com.google.common.collect.TablesTest(); testCase.testImmutableEntryToString(); } }
Java
/* * 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.collect; public class ImmutableSetMultimapAsMapImplementsMapTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testClear() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testClear(); } public void testContainsKey() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testContainsKey(); } public void testContainsValue() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testContainsValue(); } public void testEntrySet() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySet(); } public void testEntrySetAddAndAddAll() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetAddAndAddAll(); } public void testEntrySetClear() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetClear(); } public void testEntrySetContainsEntryIncompatibleKey() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryIncompatibleKey(); } public void testEntrySetContainsEntryNullKeyMissing() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryNullKeyMissing(); } public void testEntrySetContainsEntryNullKeyPresent() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetContainsEntryNullKeyPresent(); } public void testEntrySetForEmptyMap() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetForEmptyMap(); } public void testEntrySetIteratorRemove() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetIteratorRemove(); } public void testEntrySetRemove() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemove(); } public void testEntrySetRemoveAll() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveAll(); } public void testEntrySetRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveAllNullFromEmpty(); } public void testEntrySetRemoveDifferentValue() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveDifferentValue(); } public void testEntrySetRemoveMissingKey() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveMissingKey(); } public void testEntrySetRemoveNullKeyMissing() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveNullKeyMissing(); } public void testEntrySetRemoveNullKeyPresent() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetRemoveNullKeyPresent(); } public void testEntrySetRetainAll() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetRetainAll(); } public void testEntrySetRetainAllNullFromEmpty() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetRetainAllNullFromEmpty(); } public void testEntrySetSetValue() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetSetValue(); } public void testEntrySetSetValueSameValue() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEntrySetSetValueSameValue(); } public void testEqualsForEmptyMap() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEqualsForEmptyMap(); } public void testEqualsForEqualMap() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEqualsForEqualMap(); } public void testEqualsForLargerMap() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEqualsForLargerMap(); } public void testEqualsForSmallerMap() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testEqualsForSmallerMap(); } public void testGet() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testGet(); } public void testGetForEmptyMap() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testGetForEmptyMap(); } public void testGetNull() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testGetNull(); } public void testHashCode() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testHashCode(); } public void testHashCodeForEmptyMap() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testHashCodeForEmptyMap(); } public void testKeySetClear() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testKeySetClear(); } public void testKeySetRemove() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testKeySetRemove(); } public void testKeySetRemoveAll() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testKeySetRemoveAll(); } public void testKeySetRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testKeySetRemoveAllNullFromEmpty(); } public void testKeySetRetainAll() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testKeySetRetainAll(); } public void testKeySetRetainAllNullFromEmpty() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testKeySetRetainAllNullFromEmpty(); } public void testPutAllExistingKey() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testPutAllExistingKey(); } public void testPutAllNewKey() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testPutAllNewKey(); } public void testPutExistingKey() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testPutExistingKey(); } public void testPutNewKey() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testPutNewKey(); } public void testPutNullKey() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testPutNullKey(); } public void testPutNullValue() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testPutNullValue(); } public void testPutNullValueForExistingKey() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testPutNullValueForExistingKey(); } public void testRemove() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testRemove(); } public void testRemoveMissingKey() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testRemoveMissingKey(); } public void testSize() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testSize(); } public void testValues() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testValues(); } public void testValuesClear() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testValuesClear(); } public void testValuesIteratorRemove() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testValuesIteratorRemove(); } public void testValuesRemove() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testValuesRemove(); } public void testValuesRemoveAll() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveAll(); } public void testValuesRemoveAllNullFromEmpty() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveAllNullFromEmpty(); } public void testValuesRemoveMissing() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testValuesRemoveMissing(); } public void testValuesRetainAll() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testValuesRetainAll(); } public void testValuesRetainAllNullFromEmpty() throws Exception { com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest testCase = new com.google.common.collect.ImmutableSetMultimapAsMapImplementsMapTest(); testCase.testValuesRetainAllNullFromEmpty(); } }
Java
/* * 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.collect; public class RegularImmutableTableTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testCellSet() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testCellSet(); } public void testClear() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testClear(); } public void testColumn() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testColumn(); } public void testColumnKeySet() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testColumnKeySet(); } public void testColumnMap() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testColumnMap(); } public void testConsistentHashCode() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testConsistentHashCode(); } public void testConsistentToString() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testConsistentToString(); } public void testContains() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testContains(); } public void testContainsColumn() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testContainsColumn(); } public void testContainsRow() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testContainsRow(); } public void testContainsValue() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testContainsValue(); } public void testForCells() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testForCells(); } public void testGet() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testGet(); } public void testIsEmpty() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testIsEmpty(); } public void testPut() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testPut(); } public void testPutAll() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testPutAll(); } public void testRemove() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testRemove(); } public void testRow() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testRow(); } public void testRowKeySet() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testRowKeySet(); } public void testRowMap() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testRowMap(); } public void testSize() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testSize(); } public void testValues() throws Exception { com.google.common.collect.RegularImmutableTableTest testCase = new com.google.common.collect.RegularImmutableTableTest(); testCase.testValues(); } }
Java
/* * 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.collect; public class Collections2Test_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testOrderedPermutationSetContains() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testOrderedPermutationSetContains(); } public void testOrderedPermutationSetEmpty() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testOrderedPermutationSetEmpty(); } public void testOrderedPermutationSetOneElement() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testOrderedPermutationSetOneElement(); } public void testOrderedPermutationSetRepeatedElements() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testOrderedPermutationSetRepeatedElements(); } public void testOrderedPermutationSetRepeatedElementsSize() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testOrderedPermutationSetRepeatedElementsSize(); } public void testOrderedPermutationSetSizeOverflow() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testOrderedPermutationSetSizeOverflow(); } public void testOrderedPermutationSetThreeElements() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testOrderedPermutationSetThreeElements(); } public void testPermutationSetContains() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testPermutationSetContains(); } public void testPermutationSetEmpty() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testPermutationSetEmpty(); } public void testPermutationSetFourElements() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testPermutationSetFourElements(); } public void testPermutationSetOneElement() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testPermutationSetOneElement(); } public void testPermutationSetSize() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testPermutationSetSize(); } public void testPermutationSetSizeOverflow() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testPermutationSetSizeOverflow(); } public void testPermutationSetThreeElements() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testPermutationSetThreeElements(); } public void testPermutationSetThreeElementsOutOfOrder() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testPermutationSetThreeElementsOutOfOrder(); } public void testPermutationSetThreeRepeatedElements() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testPermutationSetThreeRepeatedElements(); } public void testPermutationSetTwoElements() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testPermutationSetTwoElements(); } public void testToStringImplWithNullEntries() throws Exception { com.google.common.collect.Collections2Test testCase = new com.google.common.collect.Collections2Test(); testCase.testToStringImplWithNullEntries(); } }
Java
/* * 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.collect; public class EnumBiMapTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testCreate() throws Exception { com.google.common.collect.EnumBiMapTest testCase = new com.google.common.collect.EnumBiMapTest(); testCase.testCreate(); } public void testCreateFromMap() throws Exception { com.google.common.collect.EnumBiMapTest testCase = new com.google.common.collect.EnumBiMapTest(); testCase.testCreateFromMap(); } public void testEntrySet() throws Exception { com.google.common.collect.EnumBiMapTest testCase = new com.google.common.collect.EnumBiMapTest(); testCase.testEntrySet(); } public void testEnumBiMapConstructor() throws Exception { com.google.common.collect.EnumBiMapTest testCase = new com.google.common.collect.EnumBiMapTest(); testCase.testEnumBiMapConstructor(); } public void testEquals() throws Exception { com.google.common.collect.EnumBiMapTest testCase = new com.google.common.collect.EnumBiMapTest(); testCase.testEquals(); } public void testIterationOrder() throws Exception { com.google.common.collect.EnumBiMapTest testCase = new com.google.common.collect.EnumBiMapTest(); testCase.testIterationOrder(); } public void testKeySetIteratorRemove() throws Exception { com.google.common.collect.EnumBiMapTest testCase = new com.google.common.collect.EnumBiMapTest(); testCase.testKeySetIteratorRemove(); } public void testKeyType() throws Exception { com.google.common.collect.EnumBiMapTest testCase = new com.google.common.collect.EnumBiMapTest(); testCase.testKeyType(); } public void testValueType() throws Exception { com.google.common.collect.EnumBiMapTest testCase = new com.google.common.collect.EnumBiMapTest(); testCase.testValueType(); } public void testValuesIteratorRemove() throws Exception { com.google.common.collect.EnumBiMapTest testCase = new com.google.common.collect.EnumBiMapTest(); testCase.testValuesIteratorRemove(); } }
Java
/* * 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.collect; public class MapsTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testAsMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testAsMap(); } public void testAsMapEmpty() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testAsMapEmpty(); } public void testAsMapReadsThrough() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testAsMapReadsThrough(); } public void testAsMapReturnsSortedMapForSortedSetInput() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testAsMapReturnsSortedMapForSortedSetInput(); } public void testAsMapSorted() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testAsMapSorted(); } public void testAsMapSortedEmpty() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testAsMapSortedEmpty(); } public void testAsMapSortedReadsThrough() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testAsMapSortedReadsThrough(); } public void testAsMapSortedSubViewKeySetsDoNotSupportAdd() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testAsMapSortedSubViewKeySetsDoNotSupportAdd(); } public void testAsMapSortedWritesThrough() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testAsMapSortedWritesThrough(); } public void testAsMapWritesThrough() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testAsMapWritesThrough(); } public void testCapacityForLargeSizes() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testCapacityForLargeSizes(); } public void testCapacityForNegativeSizeFails() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testCapacityForNegativeSizeFails(); } public void testConcurrentMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testConcurrentMap(); } public void testEnumMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testEnumMap(); } public void testEnumMapNullClass() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testEnumMapNullClass(); } public void testEnumMapWithInitialEmptyEnumMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testEnumMapWithInitialEmptyEnumMap(); } public void testEnumMapWithInitialEmptyMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testEnumMapWithInitialEmptyMap(); } public void testEnumMapWithInitialEnumMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testEnumMapWithInitialEnumMap(); } public void testEnumMapWithInitialMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testEnumMapWithInitialMap(); } public void testHashMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testHashMap(); } public void testHashMapGeneralizesTypes() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testHashMapGeneralizesTypes(); } public void testHashMapWithInitialMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testHashMapWithInitialMap(); } public void testIdentityHashMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testIdentityHashMap(); } public void testImmutableEntry() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testImmutableEntry(); } public void testImmutableEntryNull() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testImmutableEntryNull(); } public void testLinkedHashMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testLinkedHashMap(); } public void testLinkedHashMapGeneralizesTypes() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testLinkedHashMapGeneralizesTypes(); } public void testLinkedHashMapWithInitialMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testLinkedHashMapWithInitialMap(); } public void testMapDifferenceEmptyEmpty() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testMapDifferenceEmptyEmpty(); } public void testMapDifferenceEmptySingleton() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testMapDifferenceEmptySingleton(); } public void testMapDifferenceEquals() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testMapDifferenceEquals(); } public void testMapDifferenceOfSortedMapIsSorted() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testMapDifferenceOfSortedMapIsSorted(); } public void testMapDifferencePredicateTypical() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testMapDifferencePredicateTypical(); } public void testMapDifferenceSingletonEmpty() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testMapDifferenceSingletonEmpty(); } public void testMapDifferenceTypical() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testMapDifferenceTypical(); } public void testSortedMapDifferenceEmptyEmpty() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testSortedMapDifferenceEmptyEmpty(); } public void testSortedMapDifferenceEmptySingleton() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testSortedMapDifferenceEmptySingleton(); } public void testSortedMapDifferenceEquals() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testSortedMapDifferenceEquals(); } public void testSortedMapDifferenceImmutable() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testSortedMapDifferenceImmutable(); } public void testSortedMapDifferenceSingletonEmpty() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testSortedMapDifferenceSingletonEmpty(); } public void testSortedMapDifferenceTypical() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testSortedMapDifferenceTypical(); } public void testSortedMapTransformEntries() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testSortedMapTransformEntries(); } public void testSortedMapTransformValues() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testSortedMapTransformValues(); } public void testSynchronizedBiMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testSynchronizedBiMap(); } public void testToMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testToMap(); } public void testToMapIterator() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testToMapIterator(); } public void testToMapWithDuplicateKeys() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testToMapWithDuplicateKeys(); } public void testToMapWithNullKeys() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testToMapWithNullKeys(); } public void testToMapWithNullValues() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testToMapWithNullValues(); } public void testToStringImplWithNullKeys() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testToStringImplWithNullKeys(); } public void testToStringImplWithNullValues() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testToStringImplWithNullValues(); } public void testTransformEntries() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testTransformEntries(); } public void testTransformEntriesExample() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testTransformEntriesExample(); } public void testTransformEntriesGenerics() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testTransformEntriesGenerics(); } public void testTransformEntriesSecretlySorted() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testTransformEntriesSecretlySorted(); } public void testTransformValues() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testTransformValues(); } public void testTransformValuesSecretlySorted() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testTransformValuesSecretlySorted(); } public void testTreeMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testTreeMap(); } public void testTreeMapDerived() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testTreeMapDerived(); } public void testTreeMapNonGeneric() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testTreeMapNonGeneric(); } public void testTreeMapWithComparator() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testTreeMapWithComparator(); } public void testTreeMapWithInitialMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testTreeMapWithInitialMap(); } public void testUniqueIndexCollection() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testUniqueIndexCollection(); } public void testUniqueIndexDuplicates() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testUniqueIndexDuplicates(); } public void testUniqueIndexIterable() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testUniqueIndexIterable(); } public void testUniqueIndexIterator() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testUniqueIndexIterator(); } public void testUniqueIndexNullKey() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testUniqueIndexNullKey(); } public void testUniqueIndexNullValue() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testUniqueIndexNullValue(); } public void testUnmodifiableBiMap() throws Exception { com.google.common.collect.MapsTest testCase = new com.google.common.collect.MapsTest(); testCase.testUnmodifiableBiMap(); } public void testFilterEntriesIdentifiesBiMap__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilterEntriesIdentifiesBiMap(); } public void testFilterKeysIdentifiesBiMap__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilterKeysIdentifiesBiMap(); } public void testFilterValuesIdentifiesBiMap__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilterValuesIdentifiesBiMap(); } public void testFilteredEntriesIllegalPut__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilteredEntriesIllegalPut(); } public void testFilteredEntriesIllegalPutAll__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilteredEntriesIllegalPutAll(); } public void testFilteredEntriesObjectPredicate__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilteredEntriesObjectPredicate(); } public void testFilteredEntriesWildCardEntryPredicate__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilteredEntriesWildCardEntryPredicate(); } public void testFilteredKeysFilteredReflectsBackingChanges__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilteredKeysFilteredReflectsBackingChanges(); } public void testFilteredKeysIllegalPut__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilteredKeysIllegalPut(); } public void testFilteredKeysIllegalPutAll__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilteredKeysIllegalPutAll(); } public void testFilteredValuesClear__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilteredValuesClear(); } public void testFilteredValuesIllegalPut__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilteredValuesIllegalPut(); } public void testFilteredValuesIllegalPutAll__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilteredValuesIllegalPutAll(); } public void testFilteredValuesIllegalSetValue__FilteredBiMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredBiMapTest testCase = new com.google.common.collect.MapsTest.FilteredBiMapTest(); testCase.testFilteredValuesIllegalSetValue(); } public void testFilterEntriesIdentifiesSortedMap__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilterEntriesIdentifiesSortedMap(); } public void testFilterKeysIdentifiesSortedMap__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilterKeysIdentifiesSortedMap(); } public void testFilterValuesIdentifiesSortedMap__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilterValuesIdentifiesSortedMap(); } public void testFilteredEntriesIllegalPut__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilteredEntriesIllegalPut(); } public void testFilteredEntriesIllegalPutAll__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilteredEntriesIllegalPutAll(); } public void testFilteredEntriesObjectPredicate__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilteredEntriesObjectPredicate(); } public void testFilteredEntriesWildCardEntryPredicate__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilteredEntriesWildCardEntryPredicate(); } public void testFilteredKeysFilteredReflectsBackingChanges__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilteredKeysFilteredReflectsBackingChanges(); } public void testFilteredKeysIllegalPut__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilteredKeysIllegalPut(); } public void testFilteredKeysIllegalPutAll__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilteredKeysIllegalPutAll(); } public void testFilteredValuesClear__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilteredValuesClear(); } public void testFilteredValuesIllegalPut__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilteredValuesIllegalPut(); } public void testFilteredValuesIllegalPutAll__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilteredValuesIllegalPutAll(); } public void testFilteredValuesIllegalSetValue__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFilteredValuesIllegalSetValue(); } public void testFirstAndLastKeyFilteredMap__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testFirstAndLastKeyFilteredMap(); } public void testHeadSubTailMap_FilteredMap__FilteredSortedMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredSortedMapTest testCase = new com.google.common.collect.MapsTest.FilteredSortedMapTest(); testCase.testHeadSubTailMap_FilteredMap(); } public void testFilteredEntriesIllegalPut__FilteredMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredMapTest testCase = new com.google.common.collect.MapsTest.FilteredMapTest(); testCase.testFilteredEntriesIllegalPut(); } public void testFilteredEntriesIllegalPutAll__FilteredMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredMapTest testCase = new com.google.common.collect.MapsTest.FilteredMapTest(); testCase.testFilteredEntriesIllegalPutAll(); } public void testFilteredEntriesObjectPredicate__FilteredMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredMapTest testCase = new com.google.common.collect.MapsTest.FilteredMapTest(); testCase.testFilteredEntriesObjectPredicate(); } public void testFilteredEntriesWildCardEntryPredicate__FilteredMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredMapTest testCase = new com.google.common.collect.MapsTest.FilteredMapTest(); testCase.testFilteredEntriesWildCardEntryPredicate(); } public void testFilteredKeysFilteredReflectsBackingChanges__FilteredMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredMapTest testCase = new com.google.common.collect.MapsTest.FilteredMapTest(); testCase.testFilteredKeysFilteredReflectsBackingChanges(); } public void testFilteredKeysIllegalPut__FilteredMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredMapTest testCase = new com.google.common.collect.MapsTest.FilteredMapTest(); testCase.testFilteredKeysIllegalPut(); } public void testFilteredKeysIllegalPutAll__FilteredMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredMapTest testCase = new com.google.common.collect.MapsTest.FilteredMapTest(); testCase.testFilteredKeysIllegalPutAll(); } public void testFilteredValuesClear__FilteredMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredMapTest testCase = new com.google.common.collect.MapsTest.FilteredMapTest(); testCase.testFilteredValuesClear(); } public void testFilteredValuesIllegalPut__FilteredMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredMapTest testCase = new com.google.common.collect.MapsTest.FilteredMapTest(); testCase.testFilteredValuesIllegalPut(); } public void testFilteredValuesIllegalPutAll__FilteredMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredMapTest testCase = new com.google.common.collect.MapsTest.FilteredMapTest(); testCase.testFilteredValuesIllegalPutAll(); } public void testFilteredValuesIllegalSetValue__FilteredMapTest() throws Exception { com.google.common.collect.MapsTest.FilteredMapTest testCase = new com.google.common.collect.MapsTest.FilteredMapTest(); testCase.testFilteredValuesIllegalSetValue(); } }
Java
/* * 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.collect; public class TransposedTableTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testClear() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testClear(); } public void testColumn() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testColumn(); } public void testColumnNull() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testColumnNull(); } public void testColumnSetPartialOverlap() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testColumnSetPartialOverlap(); } public void testContains() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testContains(); } public void testContainsColumn() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testContainsColumn(); } public void testContainsRow() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testContainsRow(); } public void testContainsValue() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testContainsValue(); } public void testEquals() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testEquals(); } public void testGet() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testGet(); } public void testHashCode() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testHashCode(); } public void testIsEmpty() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testIsEmpty(); } public void testPut() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testPut(); } public void testPutAllTable() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testPutAllTable(); } public void testPutNull() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testPutNull(); } public void testPutNullReplace() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testPutNullReplace(); } public void testPutOriginalModifiesTranspose() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testPutOriginalModifiesTranspose(); } public void testPutTransposeModifiesOriginal() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testPutTransposeModifiesOriginal(); } public void testRemove() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testRemove(); } public void testRow() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testRow(); } public void testRowClearAndPut() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testRowClearAndPut(); } public void testRowNull() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testRowNull(); } public void testSize() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testSize(); } public void testToStringSize1() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testToStringSize1(); } public void testTransposeTransposed() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testTransposeTransposed(); } public void testTransposedViews() throws Exception { com.google.common.collect.TransposedTableTest testCase = new com.google.common.collect.TransposedTableTest(); testCase.setUp(); testCase.testTransposedViews(); } }
Java
/* * 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.collect; public class ImmutableSetTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testBuilderAddAll() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testBuilderAddAll(); } public void testBuilderAddAllHandlesNullsCorrectly() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testBuilderAddAllHandlesNullsCorrectly(); } public void testBuilderAddHandlesNullsCorrectly() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testBuilderAddHandlesNullsCorrectly(); } public void testBuilderWithDuplicateElements() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testBuilderWithDuplicateElements(); } public void testBuilderWithNonDuplicateElements() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testBuilderWithNonDuplicateElements(); } public void testComplexBuilder() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testComplexBuilder(); } public void testContainsAll_sameType() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testContainsAll_sameType(); } public void testCopyOf_arrayContainingOnlyNull() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_arrayContainingOnlyNull(); } public void testCopyOf_arrayOfOneElement() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_arrayOfOneElement(); } public void testCopyOf_collectionContainingNull() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_collectionContainingNull(); } public void testCopyOf_collection_empty() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_collection_empty(); } public void testCopyOf_collection_general() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_collection_general(); } public void testCopyOf_collection_oneElement() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_collection_oneElement(); } public void testCopyOf_collection_oneElementRepeated() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_collection_oneElementRepeated(); } public void testCopyOf_copiesImmutableSortedSet() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_copiesImmutableSortedSet(); } public void testCopyOf_emptyArray() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_emptyArray(); } public void testCopyOf_iteratorContainingNull() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_iteratorContainingNull(); } public void testCopyOf_iterator_empty() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_iterator_empty(); } public void testCopyOf_iterator_general() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_iterator_general(); } public void testCopyOf_iterator_oneElement() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_iterator_oneElement(); } public void testCopyOf_iterator_oneElementRepeated() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_iterator_oneElementRepeated(); } public void testCopyOf_nullArray() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_nullArray(); } public void testCopyOf_plainIterable() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_plainIterable(); } public void testCopyOf_plainIterable_iteratesOnce() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_plainIterable_iteratesOnce(); } public void testCopyOf_shortcut_empty() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_shortcut_empty(); } public void testCopyOf_shortcut_sameType() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_shortcut_sameType(); } public void testCopyOf_shortcut_singleton() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCopyOf_shortcut_singleton(); } public void testCreation_allDuplicates() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_allDuplicates(); } public void testCreation_arrayOfArray() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_arrayOfArray(); } public void testCreation_eightElements() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_eightElements(); } public void testCreation_fiveElements() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_fiveElements(); } public void testCreation_fourElements() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_fourElements(); } public void testCreation_manyDuplicates() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_manyDuplicates(); } public void testCreation_noArgs() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_noArgs(); } public void testCreation_oneDuplicate() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_oneDuplicate(); } public void testCreation_oneElement() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_oneElement(); } public void testCreation_sevenElements() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_sevenElements(); } public void testCreation_sixElements() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_sixElements(); } public void testCreation_threeElements() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_threeElements(); } public void testCreation_twoElements() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testCreation_twoElements(); } public void testEquals() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testEquals(); } public void testEquals_sameType() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testEquals_sameType(); } public void testReuseBuilderWithDuplicateElements() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testReuseBuilderWithDuplicateElements(); } public void testReuseBuilderWithNonDuplicateElements() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testReuseBuilderWithNonDuplicateElements(); } public void testToString() throws Exception { com.google.common.collect.ImmutableSetTest testCase = new com.google.common.collect.ImmutableSetTest(); testCase.testToString(); } }
Java
/* * 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.collect; public class TablesTransformValuesTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testClear() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testClear(); } public void testColumn() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testColumn(); } public void testColumnNull() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testColumnNull(); } public void testColumnSetPartialOverlap() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testColumnSetPartialOverlap(); } public void testContains() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testContains(); } public void testContainsColumn() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testContainsColumn(); } public void testContainsRow() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testContainsRow(); } public void testContainsValue() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testContainsValue(); } public void testEquals() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testEquals(); } public void testGet() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testGet(); } public void testHashCode() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testHashCode(); } public void testIsEmpty() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testIsEmpty(); } public void testPut() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testPut(); } public void testPutAllTable() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testPutAllTable(); } public void testPutNull() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testPutNull(); } public void testPutNullReplace() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testPutNullReplace(); } public void testRemove() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testRemove(); } public void testRow() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testRow(); } public void testRowClearAndPut() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testRowClearAndPut(); } public void testRowNull() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testRowNull(); } public void testSize() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testSize(); } public void testToStringSize1() throws Exception { com.google.common.collect.TablesTransformValuesTest testCase = new com.google.common.collect.TablesTransformValuesTest(); testCase.setUp(); testCase.testToStringSize1(); } }
Java
/* * 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.collect; public class ObjectArraysTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.collect.testModule"; } public void testAppendOneElement() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testAppendOneElement(); } public void testAppendTwoElements() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testAppendTwoElements(); } public void testAppendZeroElements() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testAppendZeroElements(); } public void testEmptyArrayToEmpty() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testEmptyArrayToEmpty(); } public void testEmptyArrayToNonEmpty() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testEmptyArrayToNonEmpty(); } public void testNewArray_fromArray_Empty() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testNewArray_fromArray_Empty(); } public void testNewArray_fromArray_Nonempty() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testNewArray_fromArray_Nonempty(); } public void testNewArray_fromArray_OfArray() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testNewArray_fromArray_OfArray(); } public void testNonEmptyToLonger() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testNonEmptyToLonger(); } public void testNonEmptyToSameLength() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testNonEmptyToSameLength(); } public void testNonEmptyToShorter() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testNonEmptyToShorter(); } public void testPrependOneElement() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testPrependOneElement(); } public void testPrependTwoElements() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testPrependTwoElements(); } public void testPrependZeroElements() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testPrependZeroElements(); } public void testToArrayImpl1() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testToArrayImpl1(); } public void testToArrayImpl2() throws Exception { com.google.common.collect.ObjectArraysTest testCase = new com.google.common.collect.ObjectArraysTest(); testCase.testToArrayImpl2(); } }
Java
/* * 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.testing; public class EquivalenceTesterTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.testing.testModule"; } public void testOf_NullPointerException() throws Exception { com.google.common.testing.EquivalenceTesterTest testCase = new com.google.common.testing.EquivalenceTesterTest(); testCase.setUp(); testCase.testOf_NullPointerException(); } public void testTest() throws Exception { com.google.common.testing.EquivalenceTesterTest testCase = new com.google.common.testing.EquivalenceTesterTest(); testCase.setUp(); testCase.testTest(); } public void testTest_NoData() throws Exception { com.google.common.testing.EquivalenceTesterTest testCase = new com.google.common.testing.EquivalenceTesterTest(); testCase.setUp(); testCase.testTest_NoData(); } public void testTest_hash() throws Exception { com.google.common.testing.EquivalenceTesterTest testCase = new com.google.common.testing.EquivalenceTesterTest(); testCase.setUp(); testCase.testTest_hash(); } public void testTest_inequivalence() throws Exception { com.google.common.testing.EquivalenceTesterTest testCase = new com.google.common.testing.EquivalenceTesterTest(); testCase.setUp(); testCase.testTest_inequivalence(); } public void testTest_symmetric() throws Exception { com.google.common.testing.EquivalenceTesterTest testCase = new com.google.common.testing.EquivalenceTesterTest(); testCase.setUp(); testCase.testTest_symmetric(); } public void testTest_trasitive() throws Exception { com.google.common.testing.EquivalenceTesterTest testCase = new com.google.common.testing.EquivalenceTesterTest(); testCase.setUp(); testCase.testTest_trasitive(); } }
Java
/* * 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.testing; public class TearDownStackTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.testing.testModule"; } public void testMultipleTearDownsHappenInOrder() throws Exception { com.google.common.testing.TearDownStackTest testCase = new com.google.common.testing.TearDownStackTest(); Throwable failure = null; try { testCase.testMultipleTearDownsHappenInOrder(); } catch (Throwable t) { failure = t; } try { testCase.tearDown(); } catch (Throwable t) { if (failure != null) { failure = t; } } if (failure instanceof Exception) { throw (Exception) failure; } if (failure instanceof Error) { throw (Error) failure; } if (failure != null) { throw new RuntimeException(failure); } } public void testSingleTearDown() throws Exception { com.google.common.testing.TearDownStackTest testCase = new com.google.common.testing.TearDownStackTest(); Throwable failure = null; try { testCase.testSingleTearDown(); } catch (Throwable t) { failure = t; } try { testCase.tearDown(); } catch (Throwable t) { if (failure != null) { failure = t; } } if (failure instanceof Exception) { throw (Exception) failure; } if (failure instanceof Error) { throw (Error) failure; } if (failure != null) { throw new RuntimeException(failure); } } public void testThrowingTearDown() throws Exception { com.google.common.testing.TearDownStackTest testCase = new com.google.common.testing.TearDownStackTest(); Throwable failure = null; try { testCase.testThrowingTearDown(); } catch (Throwable t) { failure = t; } try { testCase.tearDown(); } catch (Throwable t) { if (failure != null) { failure = t; } } if (failure instanceof Exception) { throw (Exception) failure; } if (failure instanceof Error) { throw (Error) failure; } if (failure != null) { throw new RuntimeException(failure); } } }
Java
/* * 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.testing; public class EqualsTesterTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.testing.testModule"; } public void testAddEqualObjectWithOArgConstructor() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testAddEqualObjectWithOArgConstructor(); } public void testAddNullEqualObject() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testAddNullEqualObject(); } public void testAddNullReference() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testAddNullReference(); } public void testAddTwoEqualObjectsAtOnceWithNull() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testAddTwoEqualObjectsAtOnceWithNull(); } public void testEqualityGroups() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testEqualityGroups(); } public void testInvalidEqualsIncompatibleClass() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testInvalidEqualsIncompatibleClass(); } public void testInvalidEqualsNull() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testInvalidEqualsNull(); } public void testInvalidHashCode() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testInvalidHashCode(); } public void testInvalidNotEqualsEqualObject() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testInvalidNotEqualsEqualObject(); } public void testNonreflexiveEquals() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testNonreflexiveEquals(); } public void testNullEqualityGroup() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testNullEqualityGroup(); } public void testNullObjectInEqualityGroup() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testNullObjectInEqualityGroup(); } public void testSymmetryBroken() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testSymmetryBroken(); } public void testTestEqualsEmptyLists() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testTestEqualsEmptyLists(); } public void testTestEqualsEqualsObjects() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testTestEqualsEqualsObjects(); } public void testTransitivityBrokenAcrossEqualityGroups() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testTransitivityBrokenAcrossEqualityGroups(); } public void testTransitivityBrokenInEqualityGroup() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testTransitivityBrokenInEqualityGroup(); } public void testUnequalObjectsInEqualityGroup() throws Exception { com.google.common.testing.EqualsTesterTest testCase = new com.google.common.testing.EqualsTesterTest(); testCase.setUp(); testCase.testUnequalObjectsInEqualityGroup(); } }
Java
/* * 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.testing; public class FakeTickerTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.testing.testModule"; } public void testAdvance() throws Exception { com.google.common.testing.FakeTickerTest testCase = new com.google.common.testing.FakeTickerTest(); testCase.testAdvance(); } public void testAutoIncrementStep_millis() throws Exception { com.google.common.testing.FakeTickerTest testCase = new com.google.common.testing.FakeTickerTest(); testCase.testAutoIncrementStep_millis(); } public void testAutoIncrementStep_nanos() throws Exception { com.google.common.testing.FakeTickerTest testCase = new com.google.common.testing.FakeTickerTest(); testCase.testAutoIncrementStep_nanos(); } public void testAutoIncrementStep_resetToZero() throws Exception { com.google.common.testing.FakeTickerTest testCase = new com.google.common.testing.FakeTickerTest(); testCase.testAutoIncrementStep_resetToZero(); } public void testAutoIncrementStep_returnsSameInstance() throws Exception { com.google.common.testing.FakeTickerTest testCase = new com.google.common.testing.FakeTickerTest(); testCase.testAutoIncrementStep_returnsSameInstance(); } public void testAutoIncrementStep_seconds() throws Exception { com.google.common.testing.FakeTickerTest testCase = new com.google.common.testing.FakeTickerTest(); testCase.testAutoIncrementStep_seconds(); } public void testAutoIncrement_negative() throws Exception { com.google.common.testing.FakeTickerTest testCase = new com.google.common.testing.FakeTickerTest(); testCase.testAutoIncrement_negative(); } }
Java
/* * Copyright (C) 2013 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; import com.google.common.reflect.ClassPath; import com.google.common.reflect.ClassPath.ClassInfo; import com.google.gwt.junit.client.GWTTestCase; import com.google.gwt.junit.tools.GWTTestSuite; import junit.framework.Test; import junit.framework.TestCase; import java.io.IOException; /** * Runs all _gwt tests. Grouping them into a suite is much faster than running each as a one-test * "suite," as the per-suite setup is expensive. */ public class GwtTestSuite extends TestCase { public static Test suite() throws IOException { GWTTestSuite suite = new GWTTestSuite(); for (ClassInfo info : ClassPath.from(GwtTestSuite.class.getClassLoader()).getTopLevelClasses()) { // TODO(cpovirk): why is this problematic when combined with the others but fine on its own? if (info.getName().equals("com.google.common.util.concurrent.AtomicLongMapTest_gwt")) { continue; } if (info.getName().endsWith("_gwt")) { Class<?> clazz = info.load(); // TODO(cpovirk): why does asSubclass() throw? Is it something about ClassLoaders? @SuppressWarnings("unchecked") Class<? extends GWTTestCase> cast = (Class<? extends GWTTestCase>) clazz; suite.addTestSuite(cast); } } return suite; } }
Java
/* * 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.util.concurrent; public class AtomicLongMapTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.util.concurrent.testModule"; } public void testAddAndGet() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testAddAndGet(); } public void testAddAndGet_zero() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testAddAndGet_zero(); } public void testClear() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testClear(); } public void testCreate_map() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testCreate_map(); } public void testDecrementAndGet() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testDecrementAndGet(); } public void testDecrementAndGet_zero() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testDecrementAndGet_zero(); } public void testEmpty() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testEmpty(); } public void testGetAndAdd() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testGetAndAdd(); } public void testGetAndAdd_zero() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testGetAndAdd_zero(); } public void testGetAndDecrement() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testGetAndDecrement(); } public void testGetAndDecrement_zero() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testGetAndDecrement_zero(); } public void testGetAndIncrement() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testGetAndIncrement(); } public void testGetAndIncrement_zero() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testGetAndIncrement_zero(); } public void testIncrementAndGet() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testIncrementAndGet(); } public void testIncrementAndGet_zero() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testIncrementAndGet_zero(); } public void testPut() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testPut(); } public void testPutAll() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testPutAll(); } public void testPutIfAbsent() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testPutIfAbsent(); } public void testPutIfAbsent_zero() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testPutIfAbsent_zero(); } public void testPut_zero() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testPut_zero(); } public void testRemove() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testRemove(); } public void testRemoveValue() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testRemoveValue(); } public void testRemoveValue_zero() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testRemoveValue_zero(); } public void testRemoveZeros() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testRemoveZeros(); } public void testRemove_zero() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testRemove_zero(); } public void testReplace() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testReplace(); } public void testReplace_zero() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testReplace_zero(); } public void testSum() throws Exception { com.google.common.util.concurrent.AtomicLongMapTest testCase = new com.google.common.util.concurrent.AtomicLongMapTest(); testCase.testSum(); } }
Java
/* * 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.io; public class BaseEncodingTest_gwt extends com.google.gwt.junit.client.GWTTestCase { @Override public String getModuleName() { return "com.google.common.io.testModule"; } public void testAtMostOneSeparator() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testAtMostOneSeparator(); } public void testBase16() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase16(); } public void testBase16UpperCaseIsNoOp() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase16UpperCaseIsNoOp(); } public void testBase32() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase32(); } public void testBase32AlternatePadding() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase32AlternatePadding(); } public void testBase32Hex() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase32Hex(); } public void testBase32HexInvalidDecodings() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase32HexInvalidDecodings(); } public void testBase32HexLenientPadding() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase32HexLenientPadding(); } public void testBase32HexUpperCaseIsNoOp() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase32HexUpperCaseIsNoOp(); } public void testBase32InvalidDecodings() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase32InvalidDecodings(); } public void testBase32LenientPadding() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase32LenientPadding(); } public void testBase32UpperCaseIsNoOp() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase32UpperCaseIsNoOp(); } public void testBase64() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase64(); } public void testBase64AlternatePadding() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase64AlternatePadding(); } public void testBase64CannotLowerCase() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase64CannotLowerCase(); } public void testBase64CannotUpperCase() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase64CannotUpperCase(); } public void testBase64InvalidDecodings() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase64InvalidDecodings(); } public void testBase64LenientPadding() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase64LenientPadding(); } public void testBase64OmitPadding() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testBase64OmitPadding(); } public void testSeparatorSameAsPadChar() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testSeparatorSameAsPadChar(); } public void testSeparatorsExplicitly() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testSeparatorsExplicitly(); } public void testToString() throws Exception { com.google.common.io.BaseEncodingTest testCase = new com.google.common.io.BaseEncodingTest(); testCase.testToString(); } }
Java
/* * Copyright (C) 2007 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 static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.regex.Pattern; import javax.annotation.Nullable; /** * Static utility methods pertaining to {@code Predicate} instances. * * <p>All methods returns serializable predicates as long as they're given * serializable parameters. * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/FunctionalExplained">the * use of {@code Predicate}</a>. * * @author Kevin Bourrillion * @since 2.0 (imported from Google Collections Library) */ @GwtCompatible(emulated = true) public final class Predicates { private Predicates() {} // TODO(kevinb): considering having these implement a VisitablePredicate // interface which specifies an accept(PredicateVisitor) method. /** * Returns a predicate that always evaluates to {@code true}. */ @GwtCompatible(serializable = true) public static <T> Predicate<T> alwaysTrue() { return ObjectPredicate.ALWAYS_TRUE.withNarrowedType(); } /** * Returns a predicate that always evaluates to {@code false}. */ @GwtCompatible(serializable = true) public static <T> Predicate<T> alwaysFalse() { return ObjectPredicate.ALWAYS_FALSE.withNarrowedType(); } /** * Returns a predicate that evaluates to {@code true} if the object reference * being tested is null. */ @GwtCompatible(serializable = true) public static <T> Predicate<T> isNull() { return ObjectPredicate.IS_NULL.withNarrowedType(); } /** * Returns a predicate that evaluates to {@code true} if the object reference * being tested is not null. */ @GwtCompatible(serializable = true) public static <T> Predicate<T> notNull() { return ObjectPredicate.NOT_NULL.withNarrowedType(); } /** * Returns a predicate that evaluates to {@code true} if the given predicate * evaluates to {@code false}. */ public static <T> Predicate<T> not(Predicate<T> predicate) { return new NotPredicate<T>(predicate); } /** * Returns a predicate that evaluates to {@code true} if each of its * components evaluates to {@code true}. The components are evaluated in * order, and evaluation will be "short-circuited" as soon as a false * predicate is found. It defensively copies the iterable passed in, so future * changes to it won't alter the behavior of this predicate. If {@code * components} is empty, the returned predicate will always evaluate to {@code * true}. */ public static <T> Predicate<T> and( Iterable<? extends Predicate<? super T>> components) { return new AndPredicate<T>(defensiveCopy(components)); } /** * Returns a predicate that evaluates to {@code true} if each of its * components evaluates to {@code true}. The components are evaluated in * order, and evaluation will be "short-circuited" as soon as a false * predicate is found. It defensively copies the array passed in, so future * changes to it won't alter the behavior of this predicate. If {@code * components} is empty, the returned predicate will always evaluate to {@code * true}. */ public static <T> Predicate<T> and(Predicate<? super T>... components) { return new AndPredicate<T>(defensiveCopy(components)); } /** * Returns a predicate that evaluates to {@code true} if both of its * components evaluate to {@code true}. The components are evaluated in * order, and evaluation will be "short-circuited" as soon as a false * predicate is found. */ public static <T> Predicate<T> and(Predicate<? super T> first, Predicate<? super T> second) { return new AndPredicate<T>(Predicates.<T>asList( checkNotNull(first), checkNotNull(second))); } /** * Returns a predicate that evaluates to {@code true} if any one of its * components evaluates to {@code true}. The components are evaluated in * order, and evaluation will be "short-circuited" as soon as a * true predicate is found. It defensively copies the iterable passed in, so * future changes to it won't alter the behavior of this predicate. If {@code * components} is empty, the returned predicate will always evaluate to {@code * false}. */ public static <T> Predicate<T> or( Iterable<? extends Predicate<? super T>> components) { return new OrPredicate<T>(defensiveCopy(components)); } /** * Returns a predicate that evaluates to {@code true} if any one of its * components evaluates to {@code true}. The components are evaluated in * order, and evaluation will be "short-circuited" as soon as a * true predicate is found. It defensively copies the array passed in, so * future changes to it won't alter the behavior of this predicate. If {@code * components} is empty, the returned predicate will always evaluate to {@code * false}. */ public static <T> Predicate<T> or(Predicate<? super T>... components) { return new OrPredicate<T>(defensiveCopy(components)); } /** * Returns a predicate that evaluates to {@code true} if either of its * components evaluates to {@code true}. The components are evaluated in * order, and evaluation will be "short-circuited" as soon as a * true predicate is found. */ public static <T> Predicate<T> or( Predicate<? super T> first, Predicate<? super T> second) { return new OrPredicate<T>(Predicates.<T>asList( checkNotNull(first), checkNotNull(second))); } /** * Returns a predicate that evaluates to {@code true} if the object being * tested {@code equals()} the given target or both are null. */ public static <T> Predicate<T> equalTo(@Nullable T target) { return (target == null) ? Predicates.<T>isNull() : new IsEqualToPredicate<T>(target); } /** * Returns a predicate that evaluates to {@code true} if the object being * tested is an instance of the given class. If the object being tested * is {@code null} this predicate evaluates to {@code false}. * * <p>If you want to filter an {@code Iterable} to narrow its type, consider * using {@link com.google.common.collect.Iterables#filter(Iterable, Class)} * in preference. * * <p><b>Warning:</b> contrary to the typical assumptions about predicates (as * documented at {@link Predicate#apply}), the returned predicate may not be * <i>consistent with equals</i>. For example, {@code * instanceOf(ArrayList.class)} will yield different results for the two equal * instances {@code Lists.newArrayList(1)} and {@code Arrays.asList(1)}. */ @GwtIncompatible("Class.isInstance") public static Predicate<Object> instanceOf(Class<?> clazz) { return new InstanceOfPredicate(clazz); } /** * Returns a predicate that evaluates to {@code true} if the class being * tested is assignable from the given class. The returned predicate * does not allow null inputs. * * @since 10.0 */ @GwtIncompatible("Class.isAssignableFrom") @Beta public static Predicate<Class<?>> assignableFrom(Class<?> clazz) { return new AssignableFromPredicate(clazz); } /** * Returns a predicate that evaluates to {@code true} if the object reference * being tested is a member of the given collection. It does not defensively * copy the collection passed in, so future changes to it will alter the * behavior of the predicate. * * <p>This method can technically accept any {@code Collection<?>}, but using * a typed collection helps prevent bugs. This approach doesn't block any * potential users since it is always possible to use {@code * Predicates.<Object>in()}. * * @param target the collection that may contain the function input */ public static <T> Predicate<T> in(Collection<? extends T> target) { return new InPredicate<T>(target); } /** * Returns the composition of a function and a predicate. For every {@code x}, * the generated predicate returns {@code predicate(function(x))}. * * @return the composition of the provided function and predicate */ public static <A, B> Predicate<A> compose( Predicate<B> predicate, Function<A, ? extends B> function) { return new CompositionPredicate<A, B>(predicate, function); } /** * Returns a predicate that evaluates to {@code true} if the * {@code CharSequence} being tested contains any match for the given * regular expression pattern. The test used is equivalent to * {@code Pattern.compile(pattern).matcher(arg).find()} * * @throws java.util.regex.PatternSyntaxException if the pattern is invalid * @since 3.0 */ @GwtIncompatible(value = "java.util.regex.Pattern") public static Predicate<CharSequence> containsPattern(String pattern) { return new ContainsPatternPredicate(pattern); } /** * Returns a predicate that evaluates to {@code true} if the * {@code CharSequence} being tested contains any match for the given * regular expression pattern. The test used is equivalent to * {@code pattern.matcher(arg).find()} * * @since 3.0 */ @GwtIncompatible(value = "java.util.regex.Pattern") public static Predicate<CharSequence> contains(Pattern pattern) { return new ContainsPatternPredicate(pattern); } // End public API, begin private implementation classes. // Package private for GWT serialization. enum ObjectPredicate implements Predicate<Object> { ALWAYS_TRUE { @Override public boolean apply(@Nullable Object o) { return true; } }, ALWAYS_FALSE { @Override public boolean apply(@Nullable Object o) { return false; } }, IS_NULL { @Override public boolean apply(@Nullable Object o) { return o == null; } }, NOT_NULL { @Override public boolean apply(@Nullable Object o) { return o != null; } }; @SuppressWarnings("unchecked") // these Object predicates work for any T <T> Predicate<T> withNarrowedType() { return (Predicate<T>) this; } } /** @see Predicates#not(Predicate) */ private static class NotPredicate<T> implements Predicate<T>, Serializable { final Predicate<T> predicate; NotPredicate(Predicate<T> predicate) { this.predicate = checkNotNull(predicate); } @Override public boolean apply(@Nullable T t) { return !predicate.apply(t); } @Override public int hashCode() { return ~predicate.hashCode(); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof NotPredicate) { NotPredicate<?> that = (NotPredicate<?>) obj; return predicate.equals(that.predicate); } return false; } @Override public String toString() { return "Not(" + predicate.toString() + ")"; } private static final long serialVersionUID = 0; } private static final Joiner COMMA_JOINER = Joiner.on(","); /** @see Predicates#and(Iterable) */ private static class AndPredicate<T> implements Predicate<T>, Serializable { private final List<? extends Predicate<? super T>> components; private AndPredicate(List<? extends Predicate<? super T>> components) { this.components = components; } @Override public boolean apply(@Nullable T t) { // Avoid using the Iterator to avoid generating garbage (issue 820). for (int i = 0; i < components.size(); i++) { if (!components.get(i).apply(t)) { return false; } } return true; } @Override public int hashCode() { // add a random number to avoid collisions with OrPredicate return components.hashCode() + 0x12472c2c; } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof AndPredicate) { AndPredicate<?> that = (AndPredicate<?>) obj; return components.equals(that.components); } return false; } @Override public String toString() { return "And(" + COMMA_JOINER.join(components) + ")"; } private static final long serialVersionUID = 0; } /** @see Predicates#or(Iterable) */ private static class OrPredicate<T> implements Predicate<T>, Serializable { private final List<? extends Predicate<? super T>> components; private OrPredicate(List<? extends Predicate<? super T>> components) { this.components = components; } @Override public boolean apply(@Nullable T t) { // Avoid using the Iterator to avoid generating garbage (issue 820). for (int i = 0; i < components.size(); i++) { if (components.get(i).apply(t)) { return true; } } return false; } @Override public int hashCode() { // add a random number to avoid collisions with AndPredicate return components.hashCode() + 0x053c91cf; } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof OrPredicate) { OrPredicate<?> that = (OrPredicate<?>) obj; return components.equals(that.components); } return false; } @Override public String toString() { return "Or(" + COMMA_JOINER.join(components) + ")"; } private static final long serialVersionUID = 0; } /** @see Predicates#equalTo(Object) */ private static class IsEqualToPredicate<T> implements Predicate<T>, Serializable { private final T target; private IsEqualToPredicate(T target) { this.target = target; } @Override public boolean apply(T t) { return target.equals(t); } @Override public int hashCode() { return target.hashCode(); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof IsEqualToPredicate) { IsEqualToPredicate<?> that = (IsEqualToPredicate<?>) obj; return target.equals(that.target); } return false; } @Override public String toString() { return "IsEqualTo(" + target + ")"; } private static final long serialVersionUID = 0; } /** @see Predicates#instanceOf(Class) */ @GwtIncompatible("Class.isInstance") private static class InstanceOfPredicate implements Predicate<Object>, Serializable { private final Class<?> clazz; private InstanceOfPredicate(Class<?> clazz) { this.clazz = checkNotNull(clazz); } @Override public boolean apply(@Nullable Object o) { return clazz.isInstance(o); } @Override public int hashCode() { return clazz.hashCode(); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof InstanceOfPredicate) { InstanceOfPredicate that = (InstanceOfPredicate) obj; return clazz == that.clazz; } return false; } @Override public String toString() { return "IsInstanceOf(" + clazz.getName() + ")"; } private static final long serialVersionUID = 0; } /** @see Predicates#assignableFrom(Class) */ @GwtIncompatible("Class.isAssignableFrom") private static class AssignableFromPredicate implements Predicate<Class<?>>, Serializable { private final Class<?> clazz; private AssignableFromPredicate(Class<?> clazz) { this.clazz = checkNotNull(clazz); } @Override public boolean apply(Class<?> input) { return clazz.isAssignableFrom(input); } @Override public int hashCode() { return clazz.hashCode(); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof AssignableFromPredicate) { AssignableFromPredicate that = (AssignableFromPredicate) obj; return clazz == that.clazz; } return false; } @Override public String toString() { return "IsAssignableFrom(" + clazz.getName() + ")"; } private static final long serialVersionUID = 0; } /** @see Predicates#in(Collection) */ private static class InPredicate<T> implements Predicate<T>, Serializable { private final Collection<?> target; private InPredicate(Collection<?> target) { this.target = checkNotNull(target); } @Override public boolean apply(@Nullable T t) { try { return target.contains(t); } catch (NullPointerException e) { return false; } catch (ClassCastException e) { return false; } } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof InPredicate) { InPredicate<?> that = (InPredicate<?>) obj; return target.equals(that.target); } return false; } @Override public int hashCode() { return target.hashCode(); } @Override public String toString() { return "In(" + target + ")"; } private static final long serialVersionUID = 0; } /** @see Predicates#compose(Predicate, Function) */ private static class CompositionPredicate<A, B> implements Predicate<A>, Serializable { final Predicate<B> p; final Function<A, ? extends B> f; private CompositionPredicate(Predicate<B> p, Function<A, ? extends B> f) { this.p = checkNotNull(p); this.f = checkNotNull(f); } @Override public boolean apply(@Nullable A a) { return p.apply(f.apply(a)); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof CompositionPredicate) { CompositionPredicate<?, ?> that = (CompositionPredicate<?, ?>) obj; return f.equals(that.f) && p.equals(that.p); } return false; } @Override public int hashCode() { return f.hashCode() ^ p.hashCode(); } @Override public String toString() { return p.toString() + "(" + f.toString() + ")"; } private static final long serialVersionUID = 0; } /** * @see Predicates#contains(Pattern) * @see Predicates#containsPattern(String) */ @GwtIncompatible("Only used by other GWT-incompatible code.") private static class ContainsPatternPredicate implements Predicate<CharSequence>, Serializable { final Pattern pattern; ContainsPatternPredicate(Pattern pattern) { this.pattern = checkNotNull(pattern); } ContainsPatternPredicate(String patternStr) { this(Pattern.compile(patternStr)); } @Override public boolean apply(CharSequence t) { return pattern.matcher(t).find(); } @Override public int hashCode() { // Pattern uses Object.hashCode, so we have to reach // inside to build a hashCode consistent with equals. return Objects.hashCode(pattern.pattern(), pattern.flags()); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof ContainsPatternPredicate) { ContainsPatternPredicate that = (ContainsPatternPredicate) obj; // Pattern uses Object (identity) equality, so we have to reach // inside to compare individual fields. return Objects.equal(pattern.pattern(), that.pattern.pattern()) && Objects.equal(pattern.flags(), that.pattern.flags()); } return false; } @Override public String toString() { return Objects.toStringHelper(this) .add("pattern", pattern) .add("pattern.flags", Integer.toHexString(pattern.flags())) .toString(); } private static final long serialVersionUID = 0; } @SuppressWarnings("unchecked") private static <T> List<Predicate<? super T>> asList( Predicate<? super T> first, Predicate<? super T> second) { return Arrays.<Predicate<? super T>>asList(first, second); } private static <T> List<T> defensiveCopy(T... array) { return defensiveCopy(Arrays.asList(array)); } static <T> List<T> defensiveCopy(Iterable<T> iterable) { ArrayList<T> list = new ArrayList<T>(); for (T element : iterable) { list.add(checkNotNull(element)); } return list; } }
Java
/* * Copyright (C) 2007 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; /** * Implemented by references that have code to run after garbage collection of their referents. * * @see FinalizableReferenceQueue * @author Bob Lee * @since 2.0 (imported from Google Collections Library) */ public interface FinalizableReference { /** * Invoked on a background thread after the referent has been garbage collected unless security * restrictions prevented starting a background thread, in which case this method is invoked when * new references are created. */ void finalizeReferent(); }
Java
/* * Copyright (C) 2011 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 static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import java.util.Iterator; import java.util.Set; import javax.annotation.Nullable; /** * An immutable object that may contain a non-null reference to another object. Each * instance of this type either contains a non-null reference, or contains nothing (in * which case we say that the reference is "absent"); it is never said to "contain {@code * null}". * * <p>A non-null {@code Optional<T>} reference can be used as a replacement for a nullable * {@code T} reference. It allows you to represent "a {@code T} that must be present" and * a "a {@code T} that might be absent" as two distinct types in your program, which can * aid clarity. * * <p>Some uses of this class include * * <ul> * <li>As a method return type, as an alternative to returning {@code null} to indicate * that no value was available * <li>To distinguish between "unknown" (for example, not present in a map) and "known to * have no value" (present in the map, with value {@code Optional.absent()}) * <li>To wrap nullable references for storage in a collection that does not support * {@code null} (though there are * <a href="http://code.google.com/p/guava-libraries/wiki/LivingWithNullHostileCollections"> * several other approaches to this</a> that should be considered first) * </ul> * * <p>A common alternative to using this class is to find or create a suitable * <a href="http://en.wikipedia.org/wiki/Null_Object_pattern">null object</a> for the * type in question. * * <p>This class is not intended as a direct analogue of any existing "option" or "maybe" * construct from other programming environments, though it may bear some similarities. * * <p>See the Guava User Guide article on <a * href="http://code.google.com/p/guava-libraries/wiki/UsingAndAvoidingNullExplained#Optional"> * using {@code Optional}</a>. * * @param <T> the type of instance that can be contained. {@code Optional} is naturally * covariant on this type, so it is safe to cast an {@code Optional<T>} to {@code * Optional<S>} for any supertype {@code S} of {@code T}. * @author Kurt Alfred Kluever * @author Kevin Bourrillion * @since 10.0 */ @GwtCompatible(serializable = true) public abstract class Optional<T> implements Serializable { /** * Returns an {@code Optional} instance with no contained reference. */ @SuppressWarnings("unchecked") public static <T> Optional<T> absent() { return (Optional<T>) Absent.INSTANCE; } /** * Returns an {@code Optional} instance containing the given non-null reference. */ public static <T> Optional<T> of(T reference) { return new Present<T>(checkNotNull(reference)); } /** * If {@code nullableReference} is non-null, returns an {@code Optional} instance containing that * reference; otherwise returns {@link Optional#absent}. */ public static <T> Optional<T> fromNullable(@Nullable T nullableReference) { return (nullableReference == null) ? Optional.<T>absent() : new Present<T>(nullableReference); } Optional() {} /** * Returns {@code true} if this holder contains a (non-null) instance. */ public abstract boolean isPresent(); /** * Returns the contained instance, which must be present. If the instance might be * absent, use {@link #or(Object)} or {@link #orNull} instead. * * @throws IllegalStateException if the instance is absent ({@link #isPresent} returns * {@code false}) */ public abstract T get(); /** * Returns the contained instance if it is present; {@code defaultValue} otherwise. If * no default value should be required because the instance is known to be present, use * {@link #get()} instead. For a default value of {@code null}, use {@link #orNull}. * * <p>Note about generics: The signature {@code public T or(T defaultValue)} is overly * restrictive. However, the ideal signature, {@code public <S super T> S or(S)}, is not legal * Java. As a result, some sensible operations involving subtypes are compile errors: * <pre> {@code * * Optional<Integer> optionalInt = getSomeOptionalInt(); * Number value = optionalInt.or(0.5); // error * * FluentIterable<? extends Number> numbers = getSomeNumbers(); * Optional<? extends Number> first = numbers.first(); * Number value = first.or(0.5); // error}</pre> * * <p>As a workaround, it is always safe to cast an {@code Optional<? extends T>} to {@code * Optional<T>}. Casting either of the above example {@code Optional} instances to {@code * Optional<Number>} (where {@code Number} is the desired output type) solves the problem: * <pre> {@code * * Optional<Number> optionalInt = (Optional) getSomeOptionalInt(); * Number value = optionalInt.or(0.5); // fine * * FluentIterable<? extends Number> numbers = getSomeNumbers(); * Optional<Number> first = (Optional) numbers.first(); * Number value = first.or(0.5); // fine}</pre> */ public abstract T or(T defaultValue); /** * Returns this {@code Optional} if it has a value present; {@code secondChoice} * otherwise. */ public abstract Optional<T> or(Optional<? extends T> secondChoice); /** * Returns the contained instance if it is present; {@code supplier.get()} otherwise. If the * supplier returns {@code null}, a {@link NullPointerException} is thrown. * * @throws NullPointerException if the supplier returns {@code null} */ @Beta public abstract T or(Supplier<? extends T> supplier); /** * Returns the contained instance if it is present; {@code null} otherwise. If the * instance is known to be present, use {@link #get()} instead. */ @Nullable public abstract T orNull(); /** * Returns an immutable singleton {@link Set} whose only element is the contained instance * if it is present; an empty immutable {@link Set} otherwise. * * @since 11.0 */ public abstract Set<T> asSet(); /** * If the instance is present, it is transformed with the given {@link Function}; otherwise, * {@link Optional#absent} is returned. If the function returns {@code null}, a * {@link NullPointerException} is thrown. * * @throws NullPointerException if the function returns {@code null} * * @since 12.0 */ public abstract <V> Optional<V> transform(Function<? super T, V> function); /** * Returns {@code true} if {@code object} is an {@code Optional} instance, and either * the contained references are {@linkplain Object#equals equal} to each other or both * are absent. Note that {@code Optional} instances of differing parameterized types can * be equal. */ @Override public abstract boolean equals(@Nullable Object object); /** * Returns a hash code for this instance. */ @Override public abstract int hashCode(); /** * Returns a string representation for this instance. The form of this string * representation is unspecified. */ @Override public abstract String toString(); /** * Returns the value of each present instance from the supplied {@code optionals}, in order, * skipping over occurrences of {@link Optional#absent}. Iterators are unmodifiable and are * evaluated lazily. * * @since 11.0 (generics widened in 13.0) */ @Beta public static <T> Iterable<T> presentInstances( final Iterable<? extends Optional<? extends T>> optionals) { checkNotNull(optionals); return new Iterable<T>() { @Override public Iterator<T> iterator() { return new AbstractIterator<T>() { private final Iterator<? extends Optional<? extends T>> iterator = checkNotNull(optionals.iterator()); @Override protected T computeNext() { while (iterator.hasNext()) { Optional<? extends T> optional = iterator.next(); if (optional.isPresent()) { return optional.get(); } } return endOfData(); } }; } }; } private static final long serialVersionUID = 0; }
Java
/* * 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; import com.google.common.annotations.GwtCompatible; /** * Static methods pertaining to ASCII characters (those in the range of values * {@code 0x00} through {@code 0x7F}), and to strings containing such * characters. * * <p>ASCII utilities also exist in other classes of this package: * <ul> * <!-- TODO(kevinb): how can we make this not produce a warning when building gwt javadoc? --> * <li>{@link Charsets#US_ASCII} specifies the {@code Charset} of ASCII characters. * <li>{@link CharMatcher#ASCII} matches ASCII characters and provides text processing methods * which operate only on the ASCII characters of a string. * </ul> * * @author Craig Berry * @author Gregory Kick * @since 7.0 */ @GwtCompatible public final class Ascii { private Ascii() {} /* The ASCII control characters, per RFC 20. */ /** * Null ('\0'): The all-zeros character which may serve to accomplish * time fill and media fill. Normally used as a C string terminator. * <p>Although RFC 20 names this as "Null", note that it is distinct * from the C/C++ "NULL" pointer. * * @since 8.0 */ public static final byte NUL = 0; /** * Start of Heading: A communication control character used at * the beginning of a sequence of characters which constitute a * machine-sensible address or routing information. Such a sequence is * referred to as the "heading." An STX character has the effect of * terminating a heading. * * @since 8.0 */ public static final byte SOH = 1; /** * Start of Text: A communication control character which * precedes a sequence of characters that is to be treated as an entity * and entirely transmitted through to the ultimate destination. Such a * sequence is referred to as "text." STX may be used to terminate a * sequence of characters started by SOH. * * @since 8.0 */ public static final byte STX = 2; /** * End of Text: A communication control character used to * terminate a sequence of characters started with STX and transmitted * as an entity. * * @since 8.0 */ public static final byte ETX = 3; /** * End of Transmission: A communication control character used * to indicate the conclusion of a transmission, which may have * contained one or more texts and any associated headings. * * @since 8.0 */ public static final byte EOT = 4; /** * Enquiry: A communication control character used in data * communication systems as a request for a response from a remote * station. It may be used as a "Who Are You" (WRU) to obtain * identification, or may be used to obtain station status, or both. * * @since 8.0 */ public static final byte ENQ = 5; /** * Acknowledge: A communication control character transmitted * by a receiver as an affirmative response to a sender. * * @since 8.0 */ public static final byte ACK = 6; /** * Bell ('\a'): A character for use when there is a need to call for * human attention. It may control alarm or attention devices. * * @since 8.0 */ public static final byte BEL = 7; /** * Backspace ('\b'): A format effector which controls the movement of * the printing position one printing space backward on the same * printing line. (Applicable also to display devices.) * * @since 8.0 */ public static final byte BS = 8; /** * Horizontal Tabulation ('\t'): A format effector which controls the * movement of the printing position to the next in a series of * predetermined positions along the printing line. (Applicable also to * display devices and the skip function on punched cards.) * * @since 8.0 */ public static final byte HT = 9; /** * Line Feed ('\n'): A format effector which controls the movement of * the printing position to the next printing line. (Applicable also to * display devices.) Where appropriate, this character may have the * meaning "New Line" (NL), a format effector which controls the * movement of the printing point to the first printing position on the * next printing line. Use of this convention requires agreement * between sender and recipient of data. * * @since 8.0 */ public static final byte LF = 10; /** * Alternate name for {@link #LF}. ({@code LF} is preferred.) * * @since 8.0 */ public static final byte NL = 10; /** * Vertical Tabulation ('\v'): A format effector which controls the * movement of the printing position to the next in a series of * predetermined printing lines. (Applicable also to display devices.) * * @since 8.0 */ public static final byte VT = 11; /** * Form Feed ('\f'): A format effector which controls the movement of * the printing position to the first pre-determined printing line on * the next form or page. (Applicable also to display devices.) * * @since 8.0 */ public static final byte FF = 12; /** * Carriage Return ('\r'): A format effector which controls the * movement of the printing position to the first printing position on * the same printing line. (Applicable also to display devices.) * * @since 8.0 */ public static final byte CR = 13; /** * Shift Out: A control character indicating that the code * combinations which follow shall be interpreted as outside of the * character set of the standard code table until a Shift In character * is reached. * * @since 8.0 */ public static final byte SO = 14; /** * Shift In: A control character indicating that the code * combinations which follow shall be interpreted according to the * standard code table. * * @since 8.0 */ public static final byte SI = 15; /** * Data Link Escape: A communication control character which * will change the meaning of a limited number of contiguously following * characters. It is used exclusively to provide supplementary controls * in data communication networks. * * @since 8.0 */ public static final byte DLE = 16; /** * Device Control 1. Characters for the control * of ancillary devices associated with data processing or * telecommunication systems, more especially switching devices "on" or * "off." (If a single "stop" control is required to interrupt or turn * off ancillary devices, DC4 is the preferred assignment.) * * @since 8.0 */ public static final byte DC1 = 17; // aka XON /** * Transmission On: Although originally defined as DC1, this ASCII * control character is now better known as the XON code used for software * flow control in serial communications. The main use is restarting * the transmission after the communication has been stopped by the XOFF * control code. * * @since 8.0 */ public static final byte XON = 17; // aka DC1 /** * Device Control 2. Characters for the control * of ancillary devices associated with data processing or * telecommunication systems, more especially switching devices "on" or * "off." (If a single "stop" control is required to interrupt or turn * off ancillary devices, DC4 is the preferred assignment.) * * @since 8.0 */ public static final byte DC2 = 18; /** * Device Control 3. Characters for the control * of ancillary devices associated with data processing or * telecommunication systems, more especially switching devices "on" or * "off." (If a single "stop" control is required to interrupt or turn * off ancillary devices, DC4 is the preferred assignment.) * * @since 8.0 */ public static final byte DC3 = 19; // aka XOFF /** * Transmission off. See {@link #XON} for explanation. * * @since 8.0 */ public static final byte XOFF = 19; // aka DC3 /** * Device Control 4. Characters for the control * of ancillary devices associated with data processing or * telecommunication systems, more especially switching devices "on" or * "off." (If a single "stop" control is required to interrupt or turn * off ancillary devices, DC4 is the preferred assignment.) * * @since 8.0 */ public static final byte DC4 = 20; /** * Negative Acknowledge: A communication control character * transmitted by a receiver as a negative response to the sender. * * @since 8.0 */ public static final byte NAK = 21; /** * Synchronous Idle: A communication control character used by * a synchronous transmission system in the absence of any other * character to provide a signal from which synchronism may be achieved * or retained. * * @since 8.0 */ public static final byte SYN = 22; /** * End of Transmission Block: A communication control character * used to indicate the end of a block of data for communication * purposes. ETB is used for blocking data where the block structure is * not necessarily related to the processing format. * * @since 8.0 */ public static final byte ETB = 23; /** * Cancel: A control character used to indicate that the data * with which it is sent is in error or is to be disregarded. * * @since 8.0 */ public static final byte CAN = 24; /** * End of Medium: A control character associated with the sent * data which may be used to identify the physical end of the medium, or * the end of the used, or wanted, portion of information recorded on a * medium. (The position of this character does not necessarily * correspond to the physical end of the medium.) * * @since 8.0 */ public static final byte EM = 25; /** * Substitute: A character that may be substituted for a * character which is determined to be invalid or in error. * * @since 8.0 */ public static final byte SUB = 26; /** * Escape: A control character intended to provide code * extension (supplementary characters) in general information * interchange. The Escape character itself is a prefix affecting the * interpretation of a limited number of contiguously following * characters. * * @since 8.0 */ public static final byte ESC = 27; /** * File Separator: These four information separators may be * used within data in optional fashion, except that their hierarchical * relationship shall be: FS is the most inclusive, then GS, then RS, * and US is least inclusive. (The content and length of a File, Group, * Record, or Unit are not specified.) * * @since 8.0 */ public static final byte FS = 28; /** * Group Separator: These four information separators may be * used within data in optional fashion, except that their hierarchical * relationship shall be: FS is the most inclusive, then GS, then RS, * and US is least inclusive. (The content and length of a File, Group, * Record, or Unit are not specified.) * * @since 8.0 */ public static final byte GS = 29; /** * Record Separator: These four information separators may be * used within data in optional fashion, except that their hierarchical * relationship shall be: FS is the most inclusive, then GS, then RS, * and US is least inclusive. (The content and length of a File, Group, * Record, or Unit are not specified.) * * @since 8.0 */ public static final byte RS = 30; /** * Unit Separator: These four information separators may be * used within data in optional fashion, except that their hierarchical * relationship shall be: FS is the most inclusive, then GS, then RS, * and US is least inclusive. (The content and length of a File, Group, * Record, or Unit are not specified.) * * @since 8.0 */ public static final byte US = 31; /** * Space: A normally non-printing graphic character used to * separate words. It is also a format effector which controls the * movement of the printing position, one printing position forward. * (Applicable also to display devices.) * * @since 8.0 */ public static final byte SP = 32; /** * Alternate name for {@link #SP}. * * @since 8.0 */ public static final byte SPACE = 32; /** * Delete: This character is used primarily to "erase" or * "obliterate" erroneous or unwanted characters in perforated tape. * * @since 8.0 */ public static final byte DEL = 127; /** * The minimum value of an ASCII character. * * @since 9.0 (was type {@code int} before 12.0) */ public static final char MIN = 0; /** * The maximum value of an ASCII character. * * @since 9.0 (was type {@code int} before 12.0) */ public static final char MAX = 127; /** * Returns a copy of the input string in which all {@linkplain #isUpperCase(char) uppercase ASCII * characters} have been converted to lowercase. All other characters are copied without * modification. */ public static String toLowerCase(String string) { return toLowerCase((CharSequence) string); } /** * Returns a copy of the input character sequence in which all {@linkplain #isUpperCase(char) * uppercase ASCII characters} have been converted to lowercase. All other characters are copied * without modification. * * @since 14.0 */ public static String toLowerCase(CharSequence chars) { int length = chars.length(); StringBuilder builder = new StringBuilder(length); for (int i = 0; i < length; i++) { builder.append(toLowerCase(chars.charAt(i))); } return builder.toString(); } /** * If the argument is an {@linkplain #isUpperCase(char) uppercase ASCII character} returns the * lowercase equivalent. Otherwise returns the argument. */ public static char toLowerCase(char c) { return isUpperCase(c) ? (char) (c ^ 0x20) : c; } /** * Returns a copy of the input string in which all {@linkplain #isLowerCase(char) lowercase ASCII * characters} have been converted to uppercase. All other characters are copied without * modification. */ public static String toUpperCase(String string) { return toUpperCase((CharSequence) string); } /** * Returns a copy of the input character sequence in which all {@linkplain #isLowerCase(char) * lowercase ASCII characters} have been converted to uppercase. All other characters are copied * without modification. * * @since 14.0 */ public static String toUpperCase(CharSequence chars) { int length = chars.length(); StringBuilder builder = new StringBuilder(length); for (int i = 0; i < length; i++) { builder.append(toUpperCase(chars.charAt(i))); } return builder.toString(); } /** * If the argument is a {@linkplain #isLowerCase(char) lowercase ASCII character} returns the * uppercase equivalent. Otherwise returns the argument. */ public static char toUpperCase(char c) { return isLowerCase(c) ? (char) (c & 0x5f) : c; } /** * Indicates whether {@code c} is one of the twenty-six lowercase ASCII alphabetic characters * between {@code 'a'} and {@code 'z'} inclusive. All others (including non-ASCII characters) * return {@code false}. */ public static boolean isLowerCase(char c) { return (c >= 'a') && (c <= 'z'); } /** * Indicates whether {@code c} is one of the twenty-six uppercase ASCII alphabetic characters * between {@code 'A'} and {@code 'Z'} inclusive. All others (including non-ASCII characters) * return {@code false}. */ public static boolean isUpperCase(char c) { return (c >= 'A') && (c <= 'Z'); } }
Java
/* * Copyright (C) 2006 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 static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtCompatible; /** * Utility class for converting between various ASCII case formats. * * @author Mike Bostock * @since 1.0 */ @GwtCompatible public enum CaseFormat { /** * Hyphenated variable naming convention, e.g., "lower-hyphen". */ LOWER_HYPHEN(CharMatcher.is('-'), "-") { @Override String normalizeWord(String word) { return Ascii.toLowerCase(word); } @Override String convert(CaseFormat format, String s) { if (format == LOWER_UNDERSCORE) { return s.replace('-', '_'); } if (format == UPPER_UNDERSCORE) { return Ascii.toUpperCase(s.replace('-', '_')); } return super.convert(format, s); } }, /** * C++ variable naming convention, e.g., "lower_underscore". */ LOWER_UNDERSCORE(CharMatcher.is('_'), "_") { @Override String normalizeWord(String word) { return Ascii.toLowerCase(word); } @Override String convert(CaseFormat format, String s) { if (format == LOWER_HYPHEN) { return s.replace('_', '-'); } if (format == UPPER_UNDERSCORE) { return Ascii.toUpperCase(s); } return super.convert(format, s); } }, /** * Java variable naming convention, e.g., "lowerCamel". */ LOWER_CAMEL(CharMatcher.inRange('A', 'Z'), "") { @Override String normalizeWord(String word) { return firstCharOnlyToUpper(word); } }, /** * Java and C++ class naming convention, e.g., "UpperCamel". */ UPPER_CAMEL(CharMatcher.inRange('A', 'Z'), "") { @Override String normalizeWord(String word) { return firstCharOnlyToUpper(word); } }, /** * Java and C++ constant naming convention, e.g., "UPPER_UNDERSCORE". */ UPPER_UNDERSCORE(CharMatcher.is('_'), "_") { @Override String normalizeWord(String word) { return Ascii.toUpperCase(word); } @Override String convert(CaseFormat format, String s) { if (format == LOWER_HYPHEN) { return Ascii.toLowerCase(s.replace('_', '-')); } if (format == LOWER_UNDERSCORE) { return Ascii.toLowerCase(s); } return super.convert(format, s); } }; private final CharMatcher wordBoundary; private final String wordSeparator; CaseFormat(CharMatcher wordBoundary, String wordSeparator) { this.wordBoundary = wordBoundary; this.wordSeparator = wordSeparator; } /** * Converts the specified {@code String str} from this format to the specified {@code format}. A * "best effort" approach is taken; if {@code str} does not conform to the assumed format, then * the behavior of this method is undefined but we make a reasonable effort at converting anyway. */ public final String to(CaseFormat format, String str) { checkNotNull(format); checkNotNull(str); return (format == this) ? str : convert(format, str); } /** * Enum values can override for performance reasons. */ String convert(CaseFormat format, String s) { // deal with camel conversion StringBuilder out = null; int i = 0; int j = -1; while ((j = wordBoundary.indexIn(s, ++j)) != -1) { if (i == 0) { // include some extra space for separators out = new StringBuilder(s.length() + 4 * wordSeparator.length()); out.append(format.normalizeFirstWord(s.substring(i, j))); } else { out.append(format.normalizeWord(s.substring(i, j))); } out.append(format.wordSeparator); i = j + wordSeparator.length(); } return (i == 0) ? format.normalizeFirstWord(s) : out.append(format.normalizeWord(s.substring(i))).toString(); } abstract String normalizeWord(String word); private String normalizeFirstWord(String word) { return (this == LOWER_CAMEL) ? Ascii.toLowerCase(word) : normalizeWord(word); } private static String firstCharOnlyToUpper(String word) { return (word.isEmpty()) ? word : new StringBuilder(word.length()) .append(Ascii.toUpperCase(word.charAt(0))) .append(Ascii.toLowerCase(word.substring(1))) .toString(); } }
Java
/* * Copyright (C) 2007 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 com.google.common.annotations.GwtCompatible; /** * A class that can supply objects of a single type. Semantically, this could * be a factory, generator, builder, closure, or something else entirely. No * guarantees are implied by this interface. * * @author Harry Heymann * @since 2.0 (imported from Google Collections Library) */ @GwtCompatible public interface Supplier<T> { /** * Retrieves an instance of the appropriate type. The returned object may or * may not be a new instance, depending on the implementation. * * @return an instance of the appropriate type */ T get(); }
Java
/* * Copyright (C) 2007 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 static com.google.common.base.Preconditions.checkNotNull; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * This class provides default values for all Java types, as defined by the JLS. * * @author Ben Yu * @since 1.0 */ public final class Defaults { private Defaults() {} private static final Map<Class<?>, Object> DEFAULTS; static { Map<Class<?>, Object> map = new HashMap<Class<?>, Object>(); put(map, boolean.class, false); put(map, char.class, '\0'); put(map, byte.class, (byte) 0); put(map, short.class, (short) 0); put(map, int.class, 0); put(map, long.class, 0L); put(map, float.class, 0f); put(map, double.class, 0d); DEFAULTS = Collections.unmodifiableMap(map); } private static <T> void put(Map<Class<?>, Object> map, Class<T> type, T value) { map.put(type, value); } /** * Returns the default value of {@code type} as defined by JLS --- {@code 0} for numbers, {@code * false} for {@code boolean} and {@code '\0'} for {@code char}. For non-primitive types and * {@code void}, null is returned. */ @SuppressWarnings("unchecked") public static <T> T defaultValue(Class<T> type) { return (T) DEFAULTS.get(checkNotNull(type)); } }
Java
/* * 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 static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.HOURS; import static java.util.concurrent.TimeUnit.MICROSECONDS; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.NANOSECONDS; import static java.util.concurrent.TimeUnit.SECONDS; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import java.util.concurrent.TimeUnit; /** * An object that measures elapsed time in nanoseconds. It is useful to measure * elapsed time using this class instead of direct calls to {@link * System#nanoTime} for a few reasons: * * <ul> * <li>An alternate time source can be substituted, for testing or performance * reasons. * <li>As documented by {@code nanoTime}, the value returned has no absolute * meaning, and can only be interpreted as relative to another timestamp * returned by {@code nanoTime} at a different time. {@code Stopwatch} is a * more effective abstraction because it exposes only these relative values, * not the absolute ones. * </ul> * * <p>Basic usage: * <pre> * Stopwatch stopwatch = Stopwatch.{@link #createStarted createStarted}(); * doSomething(); * stopwatch.{@link #stop stop}(); // optional * * long millis = stopwatch.elapsed(MILLISECONDS); * * log.info("that took: " + stopwatch); // formatted string like "12.3 ms" * </pre> * * <p>Stopwatch methods are not idempotent; it is an error to start or stop a * stopwatch that is already in the desired state. * * <p>When testing code that uses this class, use the {@linkplain * #Stopwatch(Ticker) alternate constructor} to supply a fake or mock ticker. * <!-- TODO(kevinb): restore the "such as" --> This allows you to * simulate any valid behavior of the stopwatch. * * <p><b>Note:</b> This class is not thread-safe. * * @author Kevin Bourrillion * @since 10.0 */ @Beta @GwtCompatible(emulated = true) public final class Stopwatch { private final Ticker ticker; private boolean isRunning; private long elapsedNanos; private long startTick; /** * Creates (but does not start) a new stopwatch using {@link System#nanoTime} * as its time source. * * @since 15.0 */ public static Stopwatch createUnstarted() { return new Stopwatch(); } /** * Creates (but does not start) a new stopwatch, using the specified time * source. * * @since 15.0 */ public static Stopwatch createUnstarted(Ticker ticker) { return new Stopwatch(ticker); } /** * Creates (and starts) a new stopwatch using {@link System#nanoTime} * as its time source. * * @since 15.0 */ public static Stopwatch createStarted() { return new Stopwatch().start(); } /** * Creates (and starts) a new stopwatch, using the specified time * source. * * @since 15.0 */ public static Stopwatch createStarted(Ticker ticker) { return new Stopwatch(ticker).start(); } /** * Creates (but does not start) a new stopwatch using {@link System#nanoTime} * as its time source. * * @deprecated Use {@link Stopwatch#createUnstarted()} instead. This * constructor is scheduled to be remove in Guava release 17.0. */ @Deprecated public Stopwatch() { this(Ticker.systemTicker()); } /** * Creates (but does not start) a new stopwatch, using the specified time * source. * * @deprecated Use {@link Stopwatch#createUnstarted(Ticker)} instead. This * constructor is scheduled to be remove in Guava release 17.0. */ @Deprecated public Stopwatch(Ticker ticker) { this.ticker = checkNotNull(ticker, "ticker"); } /** * Returns {@code true} if {@link #start()} has been called on this stopwatch, * and {@link #stop()} has not been called since the last call to {@code * start()}. */ public boolean isRunning() { return isRunning; } /** * Starts the stopwatch. * * @return this {@code Stopwatch} instance * @throws IllegalStateException if the stopwatch is already running. */ public Stopwatch start() { checkState(!isRunning, "This stopwatch is already running."); isRunning = true; startTick = ticker.read(); return this; } /** * Stops the stopwatch. Future reads will return the fixed duration that had * elapsed up to this point. * * @return this {@code Stopwatch} instance * @throws IllegalStateException if the stopwatch is already stopped. */ public Stopwatch stop() { long tick = ticker.read(); checkState(isRunning, "This stopwatch is already stopped."); isRunning = false; elapsedNanos += tick - startTick; return this; } /** * Sets the elapsed time for this stopwatch to zero, * and places it in a stopped state. * * @return this {@code Stopwatch} instance */ public Stopwatch reset() { elapsedNanos = 0; isRunning = false; return this; } private long elapsedNanos() { return isRunning ? ticker.read() - startTick + elapsedNanos : elapsedNanos; } /** * Returns the current elapsed time shown on this stopwatch, expressed * in the desired time unit, with any fraction rounded down. * * <p>Note that the overhead of measurement can be more than a microsecond, so * it is generally not useful to specify {@link TimeUnit#NANOSECONDS} * precision here. * * @since 14.0 (since 10.0 as {@code elapsedTime()}) */ public long elapsed(TimeUnit desiredUnit) { return desiredUnit.convert(elapsedNanos(), NANOSECONDS); } /** * Returns the current elapsed time shown on this stopwatch, expressed * in the desired time unit, with any fraction rounded down. * * <p>Note that the overhead of measurement can be more than a microsecond, so * it is generally not useful to specify {@link TimeUnit#NANOSECONDS} * precision here. * * @deprecated Use {@link Stopwatch#elapsed(TimeUnit)} instead. This method is * scheduled to be removed in Guava release 16.0. */ @Deprecated public long elapsedTime(TimeUnit desiredUnit) { return elapsed(desiredUnit); } /** * Returns the current elapsed time shown on this stopwatch, expressed * in milliseconds, with any fraction rounded down. This is identical to * {@code elapsed(TimeUnit.MILLISECONDS)}. * * @deprecated Use {@code stopwatch.elapsed(MILLISECONDS)} instead. This * method is scheduled to be removed in Guava release 16.0. */ @Deprecated public long elapsedMillis() { return elapsed(MILLISECONDS); } /** * Returns a string representation of the current elapsed time. */ @GwtIncompatible("String.format()") @Override public String toString() { long nanos = elapsedNanos(); TimeUnit unit = chooseUnit(nanos); double value = (double) nanos / NANOSECONDS.convert(1, unit); // Too bad this functionality is not exposed as a regular method call return String.format("%.4g %s", value, abbreviate(unit)); } private static TimeUnit chooseUnit(long nanos) { if (DAYS.convert(nanos, NANOSECONDS) > 0) { return DAYS; } if (HOURS.convert(nanos, NANOSECONDS) > 0) { return HOURS; } if (MINUTES.convert(nanos, NANOSECONDS) > 0) { return MINUTES; } if (SECONDS.convert(nanos, NANOSECONDS) > 0) { return SECONDS; } if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) { return MILLISECONDS; } if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) { return MICROSECONDS; } return NANOSECONDS; } private static String abbreviate(TimeUnit unit) { switch (unit) { case NANOSECONDS: return "ns"; case MICROSECONDS: return "\u03bcs"; // μs case MILLISECONDS: return "ms"; case SECONDS: return "s"; case MINUTES: return "min"; case HOURS: return "h"; case DAYS: return "d"; default: throw new AssertionError(); } } }
Java
/* * 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 com.google.common.annotations.GwtCompatible; /** * Methods factored out so that they can be emulated differently in GWT. * * @author Jesse Wilson */ @GwtCompatible(emulated = true) final class Platform { private Platform() {} /** Returns a thread-local 1024-char array. */ static char[] charBufferFromThreadLocal() { return DEST_TL.get(); } /** Calls {@link System#nanoTime()}. */ static long systemNanoTime() { return System.nanoTime(); } /** * A thread-local destination buffer to keep us from creating new buffers. * The starting size is 1024 characters. If we grow past this we don't * put it back in the threadlocal, we just keep going and grow as needed. */ private static final ThreadLocal<char[]> DEST_TL = new ThreadLocal<char[]>() { @Override protected char[] initialValue() { return new char[1024]; } }; static CharMatcher precomputeCharMatcher(CharMatcher matcher) { return matcher.precomputedInternal(); } }
Java
/* * 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; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.VisibleForTesting; import java.util.Formatter; import javax.annotation.Nullable; /** * Static utility methods pertaining to {@code String} or {@code CharSequence} * instances. * * @author Kevin Bourrillion * @since 3.0 */ @GwtCompatible public final class Strings { private Strings() {} /** * Returns the given string if it is non-null; the empty string otherwise. * * @param string the string to test and possibly return * @return {@code string} itself if it is non-null; {@code ""} if it is null */ public static String nullToEmpty(@Nullable String string) { return (string == null) ? "" : string; } /** * Returns the given string if it is nonempty; {@code null} otherwise. * * @param string the string to test and possibly return * @return {@code string} itself if it is nonempty; {@code null} if it is * empty or null */ public static @Nullable String emptyToNull(@Nullable String string) { return isNullOrEmpty(string) ? null : string; } /** * Returns {@code true} if the given string is null or is the empty string. * * <p>Consider normalizing your string references with {@link #nullToEmpty}. * If you do, you can use {@link String#isEmpty()} instead of this * method, and you won't need special null-safe forms of methods like {@link * String#toUpperCase} either. Or, if you'd like to normalize "in the other * direction," converting empty strings to {@code null}, you can use {@link * #emptyToNull}. * * @param string a string reference to check * @return {@code true} if the string is null or is the empty string */ public static boolean isNullOrEmpty(@Nullable String string) { return string == null || string.length() == 0; // string.isEmpty() in Java 6 } /** * Returns a string, of length at least {@code minLength}, consisting of * {@code string} prepended with as many copies of {@code padChar} as are * necessary to reach that length. For example, * * <ul> * <li>{@code padStart("7", 3, '0')} returns {@code "007"} * <li>{@code padStart("2010", 3, '0')} returns {@code "2010"} * </ul> * * <p>See {@link Formatter} for a richer set of formatting capabilities. * * @param string the string which should appear at the end of the result * @param minLength the minimum length the resulting string must have. Can be * zero or negative, in which case the input string is always returned. * @param padChar the character to insert at the beginning of the result until * the minimum length is reached * @return the padded string */ public static String padStart(String string, int minLength, char padChar) { checkNotNull(string); // eager for GWT. if (string.length() >= minLength) { return string; } StringBuilder sb = new StringBuilder(minLength); for (int i = string.length(); i < minLength; i++) { sb.append(padChar); } sb.append(string); return sb.toString(); } /** * Returns a string, of length at least {@code minLength}, consisting of * {@code string} appended with as many copies of {@code padChar} as are * necessary to reach that length. For example, * * <ul> * <li>{@code padEnd("4.", 5, '0')} returns {@code "4.000"} * <li>{@code padEnd("2010", 3, '!')} returns {@code "2010"} * </ul> * * <p>See {@link Formatter} for a richer set of formatting capabilities. * * @param string the string which should appear at the beginning of the result * @param minLength the minimum length the resulting string must have. Can be * zero or negative, in which case the input string is always returned. * @param padChar the character to append to the end of the result until the * minimum length is reached * @return the padded string */ public static String padEnd(String string, int minLength, char padChar) { checkNotNull(string); // eager for GWT. if (string.length() >= minLength) { return string; } StringBuilder sb = new StringBuilder(minLength); sb.append(string); for (int i = string.length(); i < minLength; i++) { sb.append(padChar); } return sb.toString(); } /** * Returns a string consisting of a specific number of concatenated copies of * an input string. For example, {@code repeat("hey", 3)} returns the string * {@code "heyheyhey"}. * * @param string any non-null string * @param count the number of times to repeat it; a nonnegative integer * @return a string containing {@code string} repeated {@code count} times * (the empty string if {@code count} is zero) * @throws IllegalArgumentException if {@code count} is negative */ public static String repeat(String string, int count) { checkNotNull(string); // eager for GWT. if (count <= 1) { checkArgument(count >= 0, "invalid count: %s", count); return (count == 0) ? "" : string; } // IF YOU MODIFY THE CODE HERE, you must update StringsRepeatBenchmark final int len = string.length(); final long longSize = (long) len * (long) count; final int size = (int) longSize; if (size != longSize) { throw new ArrayIndexOutOfBoundsException("Required array size too large: " + String.valueOf(longSize)); } final char[] array = new char[size]; string.getChars(0, len, array, 0); int n; for (n = len; n < size - n; n <<= 1) { System.arraycopy(array, 0, array, n, n); } System.arraycopy(array, 0, array, n, size - n); return new String(array); } /** * Returns the longest string {@code prefix} such that * {@code a.toString().startsWith(prefix) && b.toString().startsWith(prefix)}, * taking care not to split surrogate pairs. If {@code a} and {@code b} have * no common prefix, returns the empty string. * * @since 11.0 */ public static String commonPrefix(CharSequence a, CharSequence b) { checkNotNull(a); checkNotNull(b); int maxPrefixLength = Math.min(a.length(), b.length()); int p = 0; while (p < maxPrefixLength && a.charAt(p) == b.charAt(p)) { p++; } if (validSurrogatePairAt(a, p - 1) || validSurrogatePairAt(b, p - 1)) { p--; } return a.subSequence(0, p).toString(); } /** * Returns the longest string {@code suffix} such that * {@code a.toString().endsWith(suffix) && b.toString().endsWith(suffix)}, * taking care not to split surrogate pairs. If {@code a} and {@code b} have * no common suffix, returns the empty string. * * @since 11.0 */ public static String commonSuffix(CharSequence a, CharSequence b) { checkNotNull(a); checkNotNull(b); int maxSuffixLength = Math.min(a.length(), b.length()); int s = 0; while (s < maxSuffixLength && a.charAt(a.length() - s - 1) == b.charAt(b.length() - s - 1)) { s++; } if (validSurrogatePairAt(a, a.length() - s - 1) || validSurrogatePairAt(b, b.length() - s - 1)) { s--; } return a.subSequence(a.length() - s, a.length()).toString(); } /** * True when a valid surrogate pair starts at the given {@code index} in the * given {@code string}. Out-of-range indexes return false. */ @VisibleForTesting static boolean validSurrogatePairAt(CharSequence string, int index) { return index >= 0 && index <= (string.length() - 2) && Character.isHighSurrogate(string.charAt(index)) && Character.isLowSurrogate(string.charAt(index + 1)); } }
Java
/* * Copyright (C) 2007 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. */ /** * Basic utility libraries and interfaces. * * <p>This package is a part of the open-source * <a href="http://guava-libraries.googlecode.com">Guava libraries</a>. * * <h2>Contents</h2> * * <h3>String-related utilities</h3> * * <ul> * <li>{@link com.google.common.base.Ascii} * <li>{@link com.google.common.base.CaseFormat} * <li>{@link com.google.common.base.CharMatcher} * <li>{@link com.google.common.base.Charsets} * <li>{@link com.google.common.base.Joiner} * <li>{@link com.google.common.base.Splitter} * <li>{@link com.google.common.base.Strings} * </ul> * * <h3>Function types</h3> * * <ul> * <li>{@link com.google.common.base.Function}, * {@link com.google.common.base.Functions} * <li>{@link com.google.common.base.Predicate}, * {@link com.google.common.base.Predicates} * <li>{@link com.google.common.base.Equivalence} * <li>{@link com.google.common.base.Supplier}, * {@link com.google.common.base.Suppliers} * </ul> * * <h3>Other</h3> * * <ul> * <li>{@link com.google.common.base.Defaults} * <li>{@link com.google.common.base.Enums} * <li>{@link com.google.common.base.Objects} * <li>{@link com.google.common.base.Optional} * <li>{@link com.google.common.base.Preconditions} * <li>{@link com.google.common.base.Stopwatch} * <li>{@link com.google.common.base.Throwables} * </ul> * */ @ParametersAreNonnullByDefault package com.google.common.base; import javax.annotation.ParametersAreNonnullByDefault;
Java
/* * Copyright (C) 2011 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 static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import java.io.Serializable; import java.lang.reflect.Field; import javax.annotation.Nullable; /** * Utility methods for working with {@link Enum} instances. * * @author Steve McKay * * @since 9.0 */ @GwtCompatible(emulated = true) @Beta public final class Enums { private Enums() {} /** * Returns the {@link Field} in which {@code enumValue} is defined. * For example, to get the {@code Description} annotation on the {@code GOLF} * constant of enum {@code Sport}, use * {@code Enums.getField(Sport.GOLF).getAnnotation(Description.class)}. * * @since 12.0 */ @GwtIncompatible("reflection") public static Field getField(Enum<?> enumValue) { Class<?> clazz = enumValue.getDeclaringClass(); try { return clazz.getDeclaredField(enumValue.name()); } catch (NoSuchFieldException impossible) { throw new AssertionError(impossible); } } /** * Returns a {@link Function} that maps an {@link Enum} name to the associated * {@code Enum} constant. The {@code Function} will return {@code null} if the * {@code Enum} constant does not exist. * * @param enumClass the {@link Class} of the {@code Enum} declaring the * constant values. */ public static <T extends Enum<T>> Function<String, T> valueOfFunction(Class<T> enumClass) { return new ValueOfFunction<T>(enumClass); } /** * A {@link Function} that maps an {@link Enum} name to the associated * constant, or {@code null} if the constant does not exist. */ private static final class ValueOfFunction<T extends Enum<T>> implements Function<String, T>, Serializable { private final Class<T> enumClass; private ValueOfFunction(Class<T> enumClass) { this.enumClass = checkNotNull(enumClass); } @Override public T apply(String value) { try { return Enum.valueOf(enumClass, value); } catch (IllegalArgumentException e) { return null; } } @Override public boolean equals(@Nullable Object obj) { return obj instanceof ValueOfFunction && enumClass.equals(((ValueOfFunction) obj).enumClass); } @Override public int hashCode() { return enumClass.hashCode(); } @Override public String toString() { return "Enums.valueOf(" + enumClass + ")"; } private static final long serialVersionUID = 0; } /** * Returns an optional enum constant for the given type, using {@link Enum#valueOf}. If the * constant does not exist, {@link Optional#absent} is returned. A common use case is for parsing * user input or falling back to a default enum constant. For example, * {@code Enums.getIfPresent(Country.class, countryInput).or(Country.DEFAULT);} * * @since 12.0 */ public static <T extends Enum<T>> Optional<T> getIfPresent(Class<T> enumClass, String value) { checkNotNull(enumClass); checkNotNull(value); try { return Optional.of(Enum.valueOf(enumClass, value)); } catch (IllegalArgumentException iae) { return Optional.absent(); } } }
Java
/* * Copyright (C) 2007 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.lang.ref.ReferenceQueue; import java.lang.ref.SoftReference; /** * Soft reference with a {@code finalizeReferent()} method which a background thread invokes after * the garbage collector reclaims the referent. This is a simpler alternative to using a {@link * ReferenceQueue}. * * @author Bob Lee * @since 2.0 (imported from Google Collections Library) */ public abstract class FinalizableSoftReference<T> extends SoftReference<T> implements FinalizableReference { /** * Constructs a new finalizable soft reference. * * @param referent to softly reference * @param queue that should finalize the referent */ protected FinalizableSoftReference(T referent, FinalizableReferenceQueue queue) { super(referent, queue.queue); queue.cleanUp(); } }
Java
/* * Copyright (C) 2012 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 com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.CharMatcher.FastMatcher; import java.util.BitSet; /** * An immutable version of CharMatcher for smallish sets of characters that uses a hash table * with linear probing to check for matches. * * @author Christopher Swenson */ @GwtIncompatible("no precomputation is done in GWT") final class SmallCharMatcher extends FastMatcher { static final int MAX_SIZE = 1023; private final char[] table; private final boolean containsZero; private final long filter; private SmallCharMatcher(char[] table, long filter, boolean containsZero, String description) { super(description); this.table = table; this.filter = filter; this.containsZero = containsZero; } private static final int C1 = 0xcc9e2d51; private static final int C2 = 0x1b873593; /* * This method was rewritten in Java from an intermediate step of the Murmur hash function in * http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp, which contained the * following header: * * MurmurHash3 was written by Austin Appleby, and is placed in the public domain. The author * hereby disclaims copyright to this source code. */ static int smear(int hashCode) { return C2 * Integer.rotateLeft(hashCode * C1, 15); } private boolean checkFilter(int c) { return 1 == (1 & (filter >> c)); } // This is all essentially copied from ImmutableSet, but we have to duplicate because // of dependencies. // Represents how tightly we can pack things, as a maximum. private static final double DESIRED_LOAD_FACTOR = 0.5; /** * Returns an array size suitable for the backing array of a hash table that * uses open addressing with linear probing in its implementation. The * returned size is the smallest power of two that can hold setSize elements * with the desired load factor. */ @VisibleForTesting static int chooseTableSize(int setSize) { if (setSize == 1) { return 2; } // Correct the size for open addressing to match desired load factor. // Round up to the next highest power of 2. int tableSize = Integer.highestOneBit(setSize - 1) << 1; while (tableSize * DESIRED_LOAD_FACTOR < setSize) { tableSize <<= 1; } return tableSize; } @GwtIncompatible("java.util.BitSet") static CharMatcher from(BitSet chars, String description) { // Compute the filter. long filter = 0; int size = chars.cardinality(); boolean containsZero = chars.get(0); // Compute the hash table. char[] table = new char[chooseTableSize(size)]; int mask = table.length - 1; for (int c = chars.nextSetBit(0); c != -1; c = chars.nextSetBit(c + 1)) { // Compute the filter at the same time. filter |= 1L << c; int index = smear(c) & mask; while (true) { // Check for empty. if (table[index] == 0) { table[index] = (char) c; break; } // Linear probing. index = (index + 1) & mask; } } return new SmallCharMatcher(table, filter, containsZero, description); } @Override public boolean matches(char c) { if (c == 0) { return containsZero; } if (!checkFilter(c)) { return false; } int mask = table.length - 1; int startingIndex = smear(c) & mask; int index = startingIndex; do { // Check for empty. if (table[index] == 0) { return false; // Check for match. } else if (table[index] == c) { return true; } else { // Linear probing. index = (index + 1) & mask; } // Check to see if we wrapped around the whole table. } while (index != startingIndex); return false; } @GwtIncompatible("java.util.BitSet") @Override void setBits(BitSet table) { if (containsZero) { table.set(0); } for (char c : this.table) { if (c != 0) { table.set(c); } } } }
Java
/* * Copyright (C) 2007 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.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; /** * Weak reference with a {@code finalizeReferent()} method which a background thread invokes after * the garbage collector reclaims the referent. This is a simpler alternative to using a {@link * ReferenceQueue}. * * @author Bob Lee * @since 2.0 (imported from Google Collections Library) */ public abstract class FinalizableWeakReference<T> extends WeakReference<T> implements FinalizableReference { /** * Constructs a new finalizable weak reference. * * @param referent to weakly reference * @param queue that should finalize the referent */ protected FinalizableWeakReference(T referent, FinalizableReferenceQueue queue) { super(referent, queue.queue); queue.cleanUp(); } }
Java
/* * 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; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import javax.annotation.Nullable; /** * A strategy for determining whether two instances are considered equivalent. Examples of * equivalences are the {@linkplain #identity() identity equivalence} and {@linkplain #equals equals * equivalence}. * * @author Bob Lee * @author Ben Yu * @author Gregory Kick * @since 10.0 (<a href="http://code.google.com/p/guava-libraries/wiki/Compatibility" * >mostly source-compatible</a> since 4.0) */ @GwtCompatible public abstract class Equivalence<T> { /** * Constructor for use by subclasses. */ protected Equivalence() {} /** * Returns {@code true} if the given objects are considered equivalent. * * <p>The {@code equivalent} method implements an equivalence relation on object references: * * <ul> * <li>It is <i>reflexive</i>: for any reference {@code x}, including null, {@code * equivalent(x, x)} returns {@code true}. * <li>It is <i>symmetric</i>: for any references {@code x} and {@code y}, {@code * equivalent(x, y) == equivalent(y, x)}. * <li>It is <i>transitive</i>: for any references {@code x}, {@code y}, and {@code z}, if * {@code equivalent(x, y)} returns {@code true} and {@code equivalent(y, z)} returns {@code * true}, then {@code equivalent(x, z)} returns {@code true}. * <li>It is <i>consistent</i>: for any references {@code x} and {@code y}, multiple invocations * of {@code equivalent(x, y)} consistently return {@code true} or consistently return {@code * false} (provided that neither {@code x} nor {@code y} is modified). * </ul> */ public final boolean equivalent(@Nullable T a, @Nullable T b) { if (a == b) { return true; } if (a == null || b == null) { return false; } return doEquivalent(a, b); } /** * Returns {@code true} if {@code a} and {@code b} are considered equivalent. * * <p>Called by {@link #equivalent}. {@code a} and {@code b} are not the same * object and are not nulls. * * @since 10.0 (previously, subclasses would override equivalent()) */ protected abstract boolean doEquivalent(T a, T b); /** * Returns a hash code for {@code t}. * * <p>The {@code hash} has the following properties: * <ul> * <li>It is <i>consistent</i>: for any reference {@code x}, multiple invocations of * {@code hash(x}} consistently return the same value provided {@code x} remains unchanged * according to the definition of the equivalence. The hash need not remain consistent from * one execution of an application to another execution of the same application. * <li>It is <i>distributable accross equivalence</i>: for any references {@code x} and {@code y}, * if {@code equivalent(x, y)}, then {@code hash(x) == hash(y)}. It is <i>not</i> necessary * that the hash be distributable accorss <i>inequivalence</i>. If {@code equivalence(x, y)} * is false, {@code hash(x) == hash(y)} may still be true. * <li>{@code hash(null)} is {@code 0}. * </ul> */ public final int hash(@Nullable T t) { if (t == null) { return 0; } return doHash(t); } /** * Returns a hash code for non-null object {@code t}. * * <p>Called by {@link #hash}. * * @since 10.0 (previously, subclasses would override hash()) */ protected abstract int doHash(T t); /** * Returns a new equivalence relation for {@code F} which evaluates equivalence by first applying * {@code function} to the argument, then evaluating using {@code this}. That is, for any pair of * non-null objects {@code x} and {@code y}, {@code * equivalence.onResultOf(function).equivalent(a, b)} is true if and only if {@code * equivalence.equivalent(function.apply(a), function.apply(b))} is true. * * <p>For example: * * <pre> {@code * Equivalence<Person> SAME_AGE = Equivalence.equals().onResultOf(GET_PERSON_AGE);}</pre> * * <p>{@code function} will never be invoked with a null value. * * <p>Note that {@code function} must be consistent according to {@code this} equivalence * relation. That is, invoking {@link Function#apply} multiple times for a given value must return * equivalent results. * For example, {@code Equivalence.identity().onResultOf(Functions.toStringFunction())} is broken * because it's not guaranteed that {@link Object#toString}) always returns the same string * instance. * * @since 10.0 */ public final <F> Equivalence<F> onResultOf(Function<F, ? extends T> function) { return new FunctionalEquivalence<F, T>(function, this); } /** * Returns a wrapper of {@code reference} that implements * {@link Wrapper#equals(Object) Object.equals()} such that * {@code wrap(this, a).equals(wrap(this, b))} if and only if {@code this.equivalent(a, b)}. * * @since 10.0 */ public final <S extends T> Wrapper<S> wrap(@Nullable S reference) { return new Wrapper<S>(this, reference); } /** * Wraps an object so that {@link #equals(Object)} and {@link #hashCode()} delegate to an * {@link Equivalence}. * * <p>For example, given an {@link Equivalence} for {@link String strings} named {@code equiv} * that tests equivalence using their lengths: * * <pre> {@code * equiv.wrap("a").equals(equiv.wrap("b")) // true * equiv.wrap("a").equals(equiv.wrap("hello")) // false}</pre> * * <p>Note in particular that an equivalence wrapper is never equal to the object it wraps. * * <pre> {@code * equiv.wrap(obj).equals(obj) // always false}</pre> * * @since 10.0 */ public static final class Wrapper<T> implements Serializable { private final Equivalence<? super T> equivalence; @Nullable private final T reference; private Wrapper(Equivalence<? super T> equivalence, @Nullable T reference) { this.equivalence = checkNotNull(equivalence); this.reference = reference; } /** Returns the (possibly null) reference wrapped by this instance. */ @Nullable public T get() { return reference; } /** * Returns {@code true} if {@link Equivalence#equivalent(Object, Object)} applied to the wrapped * references is {@code true} and both wrappers use the {@link Object#equals(Object) same} * equivalence. */ @Override public boolean equals(@Nullable Object obj) { if (obj == this) { return true; } else if (obj instanceof Wrapper) { Wrapper<?> that = (Wrapper<?>) obj; /* * We cast to Equivalence<Object> here because we can't check the type of the reference held * by the other wrapper. But, by checking that the Equivalences are equal, we know that * whatever type it is, it is assignable to the type handled by this wrapper's equivalence. */ @SuppressWarnings("unchecked") Equivalence<Object> equivalence = (Equivalence<Object>) this.equivalence; return equivalence.equals(that.equivalence) && equivalence.equivalent(this.reference, that.reference); } else { return false; } } /** * Returns the result of {@link Equivalence#hash(Object)} applied to the wrapped reference. */ @Override public int hashCode() { return equivalence.hash(reference); } /** * Returns a string representation for this equivalence wrapper. The form of this string * representation is not specified. */ @Override public String toString() { return equivalence + ".wrap(" + reference + ")"; } private static final long serialVersionUID = 0; } /** * Returns an equivalence over iterables based on the equivalence of their elements. More * specifically, two iterables are considered equivalent if they both contain the same number of * elements, and each pair of corresponding elements is equivalent according to * {@code this}. Null iterables are equivalent to one another. * * <p>Note that this method performs a similar function for equivalences as {@link * com.google.common.collect.Ordering#lexicographical} does for orderings. * * @since 10.0 */ @GwtCompatible(serializable = true) public final <S extends T> Equivalence<Iterable<S>> pairwise() { // Ideally, the returned equivalence would support Iterable<? extends T>. However, // the need for this is so rare that it's not worth making callers deal with the ugly wildcard. return new PairwiseEquivalence<S>(this); } /** * Returns a predicate that evaluates to true if and only if the input is * equivalent to {@code target} according to this equivalence relation. * * @since 10.0 */ @Beta public final Predicate<T> equivalentTo(@Nullable T target) { return new EquivalentToPredicate<T>(this, target); } private static final class EquivalentToPredicate<T> implements Predicate<T>, Serializable { private final Equivalence<T> equivalence; @Nullable private final T target; EquivalentToPredicate(Equivalence<T> equivalence, @Nullable T target) { this.equivalence = checkNotNull(equivalence); this.target = target; } @Override public boolean apply(@Nullable T input) { return equivalence.equivalent(input, target); } @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (obj instanceof EquivalentToPredicate) { EquivalentToPredicate<?> that = (EquivalentToPredicate<?>) obj; return equivalence.equals(that.equivalence) && Objects.equal(target, that.target); } return false; } @Override public int hashCode() { return Objects.hashCode(equivalence, target); } @Override public String toString() { return equivalence + ".equivalentTo(" + target + ")"; } private static final long serialVersionUID = 0; } /** * Returns an equivalence that delegates to {@link Object#equals} and {@link Object#hashCode}. * {@link Equivalence#equivalent} returns {@code true} if both values are null, or if neither * value is null and {@link Object#equals} returns {@code true}. {@link Equivalence#hash} returns * {@code 0} if passed a null value. * * @since 13.0 * @since 8.0 (in Equivalences with null-friendly behavior) * @since 4.0 (in Equivalences) */ public static Equivalence<Object> equals() { return Equals.INSTANCE; } /** * Returns an equivalence that uses {@code ==} to compare values and {@link * System#identityHashCode(Object)} to compute the hash code. {@link Equivalence#equivalent} * returns {@code true} if {@code a == b}, including in the case that a and b are both null. * * @since 13.0 * @since 4.0 (in Equivalences) */ public static Equivalence<Object> identity() { return Identity.INSTANCE; } static final class Equals extends Equivalence<Object> implements Serializable { static final Equals INSTANCE = new Equals(); @Override protected boolean doEquivalent(Object a, Object b) { return a.equals(b); } @Override public int doHash(Object o) { return o.hashCode(); } private Object readResolve() { return INSTANCE; } private static final long serialVersionUID = 1; } static final class Identity extends Equivalence<Object> implements Serializable { static final Identity INSTANCE = new Identity(); @Override protected boolean doEquivalent(Object a, Object b) { return false; } @Override protected int doHash(Object o) { return System.identityHashCode(o); } private Object readResolve() { return INSTANCE; } private static final long serialVersionUID = 1; } }
Java
/* * Copyright (C) 2007 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 static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import java.util.Map; import javax.annotation.Nullable; /** * Static utility methods pertaining to {@code Function} instances. * * <p>All methods return serializable functions as long as they're given serializable parameters. * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/FunctionalExplained">the use of {@code * Function}</a>. * * @author Mike Bostock * @author Jared Levy * @since 2.0 (imported from Google Collections Library) */ @GwtCompatible public final class Functions { private Functions() {} /** * Returns a function that calls {@code toString()} on its argument. The function does not accept * nulls; it will throw a {@link NullPointerException} when applied to {@code null}. * * <p><b>Warning:</b> The returned function may not be <i>consistent with equals</i> (as * documented at {@link Function#apply}). For example, this function yields different results for * the two equal instances {@code ImmutableSet.of(1, 2)} and {@code ImmutableSet.of(2, 1)}. */ public static Function<Object, String> toStringFunction() { return ToStringFunction.INSTANCE; } // enum singleton pattern private enum ToStringFunction implements Function<Object, String> { INSTANCE; @Override public String apply(Object o) { checkNotNull(o); // eager for GWT. return o.toString(); } @Override public String toString() { return "toString"; } } /** * Returns the identity function. */ @SuppressWarnings("unchecked") public static <E> Function<E, E> identity() { return (Function<E, E>) IdentityFunction.INSTANCE; } // enum singleton pattern private enum IdentityFunction implements Function<Object, Object> { INSTANCE; @Override @Nullable public Object apply(@Nullable Object o) { return o; } @Override public String toString() { return "identity"; } } /** * Returns a function which performs a map lookup. The returned function throws an {@link * IllegalArgumentException} if given a key that does not exist in the map. */ public static <K, V> Function<K, V> forMap(Map<K, V> map) { return new FunctionForMapNoDefault<K, V>(map); } private static class FunctionForMapNoDefault<K, V> implements Function<K, V>, Serializable { final Map<K, V> map; FunctionForMapNoDefault(Map<K, V> map) { this.map = checkNotNull(map); } @Override public V apply(@Nullable K key) { V result = map.get(key); checkArgument(result != null || map.containsKey(key), "Key '%s' not present in map", key); return result; } @Override public boolean equals(@Nullable Object o) { if (o instanceof FunctionForMapNoDefault) { FunctionForMapNoDefault<?, ?> that = (FunctionForMapNoDefault<?, ?>) o; return map.equals(that.map); } return false; } @Override public int hashCode() { return map.hashCode(); } @Override public String toString() { return "forMap(" + map + ")"; } private static final long serialVersionUID = 0; } /** * Returns a function which performs a map lookup with a default value. The function created by * this method returns {@code defaultValue} for all inputs that do not belong to the map's key * set. * * @param map source map that determines the function behavior * @param defaultValue the value to return for inputs that aren't map keys * @return function that returns {@code map.get(a)} when {@code a} is a key, or {@code * defaultValue} otherwise */ public static <K, V> Function<K, V> forMap(Map<K, ? extends V> map, @Nullable V defaultValue) { return new ForMapWithDefault<K, V>(map, defaultValue); } private static class ForMapWithDefault<K, V> implements Function<K, V>, Serializable { final Map<K, ? extends V> map; final V defaultValue; ForMapWithDefault(Map<K, ? extends V> map, @Nullable V defaultValue) { this.map = checkNotNull(map); this.defaultValue = defaultValue; } @Override public V apply(@Nullable K key) { V result = map.get(key); return (result != null || map.containsKey(key)) ? result : defaultValue; } @Override public boolean equals(@Nullable Object o) { if (o instanceof ForMapWithDefault) { ForMapWithDefault<?, ?> that = (ForMapWithDefault<?, ?>) o; return map.equals(that.map) && Objects.equal(defaultValue, that.defaultValue); } return false; } @Override public int hashCode() { return Objects.hashCode(map, defaultValue); } @Override public String toString() { return "forMap(" + map + ", defaultValue=" + defaultValue + ")"; } private static final long serialVersionUID = 0; } /** * Returns the composition of two functions. For {@code f: A->B} and {@code g: B->C}, composition * is defined as the function h such that {@code h(a) == g(f(a))} for each {@code a}. * * @param g the second function to apply * @param f the first function to apply * @return the composition of {@code f} and {@code g} * @see <a href="//en.wikipedia.org/wiki/Function_composition">function composition</a> */ public static <A, B, C> Function<A, C> compose(Function<B, C> g, Function<A, ? extends B> f) { return new FunctionComposition<A, B, C>(g, f); } private static class FunctionComposition<A, B, C> implements Function<A, C>, Serializable { private final Function<B, C> g; private final Function<A, ? extends B> f; public FunctionComposition(Function<B, C> g, Function<A, ? extends B> f) { this.g = checkNotNull(g); this.f = checkNotNull(f); } @Override public C apply(@Nullable A a) { return g.apply(f.apply(a)); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof FunctionComposition) { FunctionComposition<?, ?, ?> that = (FunctionComposition<?, ?, ?>) obj; return f.equals(that.f) && g.equals(that.g); } return false; } @Override public int hashCode() { return f.hashCode() ^ g.hashCode(); } @Override public String toString() { return g.toString() + "(" + f.toString() + ")"; } private static final long serialVersionUID = 0; } /** * Creates a function that returns the same boolean output as the given predicate for all inputs. * * <p>The returned function is <i>consistent with equals</i> (as documented at {@link * Function#apply}) if and only if {@code predicate} is itself consistent with equals. */ public static <T> Function<T, Boolean> forPredicate(Predicate<T> predicate) { return new PredicateFunction<T>(predicate); } /** @see Functions#forPredicate */ private static class PredicateFunction<T> implements Function<T, Boolean>, Serializable { private final Predicate<T> predicate; private PredicateFunction(Predicate<T> predicate) { this.predicate = checkNotNull(predicate); } @Override public Boolean apply(@Nullable T t) { return predicate.apply(t); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof PredicateFunction) { PredicateFunction<?> that = (PredicateFunction<?>) obj; return predicate.equals(that.predicate); } return false; } @Override public int hashCode() { return predicate.hashCode(); } @Override public String toString() { return "forPredicate(" + predicate + ")"; } private static final long serialVersionUID = 0; } /** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); } private static class ConstantFunction<E> implements Function<Object, E>, Serializable { private final E value; public ConstantFunction(@Nullable E value) { this.value = value; } @Override public E apply(@Nullable Object from) { return value; } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof ConstantFunction) { ConstantFunction<?> that = (ConstantFunction<?>) obj; return Objects.equal(value, that.value); } return false; } @Override public int hashCode() { return (value == null) ? 0 : value.hashCode(); } @Override public String toString() { return "constant(" + value + ")"; } private static final long serialVersionUID = 0; } /** * Returns a function that always returns the result of invoking {@link Supplier#get} on {@code * supplier}, regardless of its input. * * @since 10.0 */ @Beta public static <T> Function<Object, T> forSupplier(Supplier<T> supplier) { return new SupplierFunction<T>(supplier); } /** @see Functions#forSupplier*/ private static class SupplierFunction<T> implements Function<Object, T>, Serializable { private final Supplier<T> supplier; private SupplierFunction(Supplier<T> supplier) { this.supplier = checkNotNull(supplier); } @Override public T apply(@Nullable Object input) { return supplier.get(); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof SupplierFunction) { SupplierFunction<?> that = (SupplierFunction<?>) obj; return this.supplier.equals(that.supplier); } return false; } @Override public int hashCode() { return supplier.hashCode(); } @Override public String toString() { return "forSupplier(" + supplier + ")"; } private static final long serialVersionUID = 0; } }
Java
/* * 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 static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.annotation.CheckReturnValue; /** * Extracts non-overlapping substrings from an input string, typically by * recognizing appearances of a <i>separator</i> sequence. This separator can be * specified as a single {@linkplain #on(char) character}, fixed {@linkplain * #on(String) string}, {@linkplain #onPattern regular expression} or {@link * #on(CharMatcher) CharMatcher} instance. Or, instead of using a separator at * all, a splitter can extract adjacent substrings of a given {@linkplain * #fixedLength fixed length}. * * <p>For example, this expression: <pre> {@code * * Splitter.on(',').split("foo,bar,qux")}</pre> * * ... produces an {@code Iterable} containing {@code "foo"}, {@code "bar"} and * {@code "qux"}, in that order. * * <p>By default, {@code Splitter}'s behavior is simplistic and unassuming. The * following expression: <pre> {@code * * Splitter.on(',').split(" foo,,, bar ,")}</pre> * * ... yields the substrings {@code [" foo", "", "", " bar ", ""]}. If this * is not the desired behavior, use configuration methods to obtain a <i>new</i> * splitter instance with modified behavior: <pre> {@code * * private static final Splitter MY_SPLITTER = Splitter.on(',') * .trimResults() * .omitEmptyStrings();}</pre> * * <p>Now {@code MY_SPLITTER.split("foo,,, bar ,")} returns just {@code ["foo", * "bar"]}. Note that the order in which these configuration methods are called * is never significant. * * <p><b>Warning:</b> Splitter instances are immutable. Invoking a configuration * method has no effect on the receiving instance; you must store and use the * new splitter instance it returns instead. <pre> {@code * * // Do NOT do this * Splitter splitter = Splitter.on('/'); * splitter.trimResults(); // does nothing! * return splitter.split("wrong / wrong / wrong");}</pre> * * <p>For separator-based splitters that do not use {@code omitEmptyStrings}, an * input string containing {@code n} occurrences of the separator naturally * yields an iterable of size {@code n + 1}. So if the separator does not occur * anywhere in the input, a single substring is returned containing the entire * input. Consequently, all splitters split the empty string to {@code [""]} * (note: even fixed-length splitters). * * <p>Splitter instances are thread-safe immutable, and are therefore safe to * store as {@code static final} constants. * * <p>The {@link Joiner} class provides the inverse operation to splitting, but * note that a round-trip between the two should be assumed to be lossy. * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/StringsExplained#Splitter"> * {@code Splitter}</a>. * * @author Julien Silland * @author Jesse Wilson * @author Kevin Bourrillion * @author Louis Wasserman * @since 1.0 */ @GwtCompatible(emulated = true) public final class Splitter { private final CharMatcher trimmer; private final boolean omitEmptyStrings; private final Strategy strategy; private final int limit; private Splitter(Strategy strategy) { this(strategy, false, CharMatcher.NONE, Integer.MAX_VALUE); } private Splitter(Strategy strategy, boolean omitEmptyStrings, CharMatcher trimmer, int limit) { this.strategy = strategy; this.omitEmptyStrings = omitEmptyStrings; this.trimmer = trimmer; this.limit = limit; } /** * Returns a splitter that uses the given single-character separator. For * example, {@code Splitter.on(',').split("foo,,bar")} returns an iterable * containing {@code ["foo", "", "bar"]}. * * @param separator the character to recognize as a separator * @return a splitter, with default settings, that recognizes that separator */ public static Splitter on(char separator) { return on(CharMatcher.is(separator)); } /** * Returns a splitter that considers any single character matched by the * given {@code CharMatcher} to be a separator. For example, {@code * Splitter.on(CharMatcher.anyOf(";,")).split("foo,;bar,quux")} returns an * iterable containing {@code ["foo", "", "bar", "quux"]}. * * @param separatorMatcher a {@link CharMatcher} that determines whether a * character is a separator * @return a splitter, with default settings, that uses this matcher */ public static Splitter on(final CharMatcher separatorMatcher) { checkNotNull(separatorMatcher); return new Splitter(new Strategy() { @Override public SplittingIterator iterator( Splitter splitter, final CharSequence toSplit) { return new SplittingIterator(splitter, toSplit) { @Override int separatorStart(int start) { return separatorMatcher.indexIn(toSplit, start); } @Override int separatorEnd(int separatorPosition) { return separatorPosition + 1; } }; } }); } /** * Returns a splitter that uses the given fixed string as a separator. For * example, {@code Splitter.on(", ").split("foo, bar,baz")} returns an * iterable containing {@code ["foo", "bar,baz"]}. * * @param separator the literal, nonempty string to recognize as a separator * @return a splitter, with default settings, that recognizes that separator */ public static Splitter on(final String separator) { checkArgument(separator.length() != 0, "The separator may not be the empty string."); return new Splitter(new Strategy() { @Override public SplittingIterator iterator( Splitter splitter, CharSequence toSplit) { return new SplittingIterator(splitter, toSplit) { @Override public int separatorStart(int start) { int delimeterLength = separator.length(); positions: for (int p = start, last = toSplit.length() - delimeterLength; p <= last; p++) { for (int i = 0; i < delimeterLength; i++) { if (toSplit.charAt(i + p) != separator.charAt(i)) { continue positions; } } return p; } return -1; } @Override public int separatorEnd(int separatorPosition) { return separatorPosition + separator.length(); } }; } }); } /** * Returns a splitter that considers any subsequence matching {@code * pattern} to be a separator. For example, {@code * Splitter.on(Pattern.compile("\r?\n")).split(entireFile)} splits a string * into lines whether it uses DOS-style or UNIX-style line terminators. * * @param separatorPattern the pattern that determines whether a subsequence * is a separator. This pattern may not match the empty string. * @return a splitter, with default settings, that uses this pattern * @throws IllegalArgumentException if {@code separatorPattern} matches the * empty string */ @GwtIncompatible("java.util.regex") public static Splitter on(final Pattern separatorPattern) { checkNotNull(separatorPattern); checkArgument(!separatorPattern.matcher("").matches(), "The pattern may not match the empty string: %s", separatorPattern); return new Splitter(new Strategy() { @Override public SplittingIterator iterator( final Splitter splitter, CharSequence toSplit) { final Matcher matcher = separatorPattern.matcher(toSplit); return new SplittingIterator(splitter, toSplit) { @Override public int separatorStart(int start) { return matcher.find(start) ? matcher.start() : -1; } @Override public int separatorEnd(int separatorPosition) { return matcher.end(); } }; } }); } /** * Returns a splitter that considers any subsequence matching a given * pattern (regular expression) to be a separator. For example, {@code * Splitter.onPattern("\r?\n").split(entireFile)} splits a string into lines * whether it uses DOS-style or UNIX-style line terminators. This is * equivalent to {@code Splitter.on(Pattern.compile(pattern))}. * * @param separatorPattern the pattern that determines whether a subsequence * is a separator. This pattern may not match the empty string. * @return a splitter, with default settings, that uses this pattern * @throws java.util.regex.PatternSyntaxException if {@code separatorPattern} * is a malformed expression * @throws IllegalArgumentException if {@code separatorPattern} matches the * empty string */ @GwtIncompatible("java.util.regex") public static Splitter onPattern(String separatorPattern) { return on(Pattern.compile(separatorPattern)); } /** * Returns a splitter that divides strings into pieces of the given length. * For example, {@code Splitter.fixedLength(2).split("abcde")} returns an * iterable containing {@code ["ab", "cd", "e"]}. The last piece can be * smaller than {@code length} but will never be empty. * * <p><b>Exception:</b> for consistency with separator-based splitters, {@code * split("")} does not yield an empty iterable, but an iterable containing * {@code ""}. This is the only case in which {@code * Iterables.size(split(input))} does not equal {@code * IntMath.divide(input.length(), length, CEILING)}. To avoid this behavior, * use {@code omitEmptyStrings}. * * @param length the desired length of pieces after splitting, a positive * integer * @return a splitter, with default settings, that can split into fixed sized * pieces * @throws IllegalArgumentException if {@code length} is zero or negative */ public static Splitter fixedLength(final int length) { checkArgument(length > 0, "The length may not be less than 1"); return new Splitter(new Strategy() { @Override public SplittingIterator iterator( final Splitter splitter, CharSequence toSplit) { return new SplittingIterator(splitter, toSplit) { @Override public int separatorStart(int start) { int nextChunkStart = start + length; return (nextChunkStart < toSplit.length() ? nextChunkStart : -1); } @Override public int separatorEnd(int separatorPosition) { return separatorPosition; } }; } }); } /** * Returns a splitter that behaves equivalently to {@code this} splitter, but * automatically omits empty strings from the results. For example, {@code * Splitter.on(',').omitEmptyStrings().split(",a,,,b,c,,")} returns an * iterable containing only {@code ["a", "b", "c"]}. * * <p>If either {@code trimResults} option is also specified when creating a * splitter, that splitter always trims results first before checking for * emptiness. So, for example, {@code * Splitter.on(':').omitEmptyStrings().trimResults().split(": : : ")} returns * an empty iterable. * * <p>Note that it is ordinarily not possible for {@link #split(CharSequence)} * to return an empty iterable, but when using this option, it can (if the * input sequence consists of nothing but separators). * * @return a splitter with the desired configuration */ @CheckReturnValue public Splitter omitEmptyStrings() { return new Splitter(strategy, true, trimmer, limit); } /** * Returns a splitter that behaves equivalently to {@code this} splitter but * stops splitting after it reaches the limit. * The limit defines the maximum number of items returned by the iterator. * * <p>For example, * {@code Splitter.on(',').limit(3).split("a,b,c,d")} returns an iterable * containing {@code ["a", "b", "c,d"]}. When omitting empty strings, the * omitted strings do no count. Hence, * {@code Splitter.on(',').limit(3).omitEmptyStrings().split("a,,,b,,,c,d")} * returns an iterable containing {@code ["a", "b", "c,d"}. * When trim is requested, all entries, including the last are trimmed. Hence * {@code Splitter.on(',').limit(3).trimResults().split(" a , b , c , d ")} * results in @{code ["a", "b", "c , d"]}. * * @param limit the maximum number of items returns * @return a splitter with the desired configuration * @since 9.0 */ @CheckReturnValue public Splitter limit(int limit) { checkArgument(limit > 0, "must be greater than zero: %s", limit); return new Splitter(strategy, omitEmptyStrings, trimmer, limit); } /** * Returns a splitter that behaves equivalently to {@code this} splitter, but * automatically removes leading and trailing {@linkplain * CharMatcher#WHITESPACE whitespace} from each returned substring; equivalent * to {@code trimResults(CharMatcher.WHITESPACE)}. For example, {@code * Splitter.on(',').trimResults().split(" a, b ,c ")} returns an iterable * containing {@code ["a", "b", "c"]}. * * @return a splitter with the desired configuration */ @CheckReturnValue public Splitter trimResults() { return trimResults(CharMatcher.WHITESPACE); } /** * Returns a splitter that behaves equivalently to {@code this} splitter, but * removes all leading or trailing characters matching the given {@code * CharMatcher} from each returned substring. For example, {@code * Splitter.on(',').trimResults(CharMatcher.is('_')).split("_a ,_b_ ,c__")} * returns an iterable containing {@code ["a ", "b_ ", "c"]}. * * @param trimmer a {@link CharMatcher} that determines whether a character * should be removed from the beginning/end of a subsequence * @return a splitter with the desired configuration */ // TODO(kevinb): throw if a trimmer was already specified! @CheckReturnValue public Splitter trimResults(CharMatcher trimmer) { checkNotNull(trimmer); return new Splitter(strategy, omitEmptyStrings, trimmer, limit); } /** * Splits {@code sequence} into string components and makes them available * through an {@link Iterator}, which may be lazily evaluated. If you want * an eagerly computed {@link List}, use {@link #splitToList(CharSequence)}. * * @param sequence the sequence of characters to split * @return an iteration over the segments split from the parameter. */ public Iterable<String> split(final CharSequence sequence) { checkNotNull(sequence); return new Iterable<String>() { @Override public Iterator<String> iterator() { return spliterator(sequence); } @Override public String toString() { return Joiner.on(", ") .appendTo(new StringBuilder().append('['), this) .append(']') .toString(); } }; } private Iterator<String> spliterator(CharSequence sequence) { return strategy.iterator(this, sequence); } /** * Splits {@code sequence} into string components and returns them as * an immutable list. If you want an {@link Iterable} which may be lazily * evaluated, use {@link #split(CharSequence)}. * * @param sequence the sequence of characters to split * @return an immutable list of the segments split from the parameter * @since 15.0 */ @Beta public List<String> splitToList(CharSequence sequence) { checkNotNull(sequence); Iterator<String> iterator = spliterator(sequence); List<String> result = new ArrayList<String>(); while (iterator.hasNext()) { result.add(iterator.next()); } return Collections.unmodifiableList(result); } /** * Returns a {@code MapSplitter} which splits entries based on this splitter, * and splits entries into keys and values using the specified separator. * * @since 10.0 */ @CheckReturnValue @Beta public MapSplitter withKeyValueSeparator(String separator) { return withKeyValueSeparator(on(separator)); } /** * Returns a {@code MapSplitter} which splits entries based on this splitter, * and splits entries into keys and values using the specified separator. * * @since 14.0 */ @CheckReturnValue @Beta public MapSplitter withKeyValueSeparator(char separator) { return withKeyValueSeparator(on(separator)); } /** * Returns a {@code MapSplitter} which splits entries based on this splitter, * and splits entries into keys and values using the specified key-value * splitter. * * @since 10.0 */ @CheckReturnValue @Beta public MapSplitter withKeyValueSeparator(Splitter keyValueSplitter) { return new MapSplitter(this, keyValueSplitter); } /** * An object that splits strings into maps as {@code Splitter} splits * iterables and lists. Like {@code Splitter}, it is thread-safe and * immutable. * * @since 10.0 */ @Beta public static final class MapSplitter { private static final String INVALID_ENTRY_MESSAGE = "Chunk [%s] is not a valid entry"; private final Splitter outerSplitter; private final Splitter entrySplitter; private MapSplitter(Splitter outerSplitter, Splitter entrySplitter) { this.outerSplitter = outerSplitter; // only "this" is passed this.entrySplitter = checkNotNull(entrySplitter); } /** * Splits {@code sequence} into substrings, splits each substring into * an entry, and returns an unmodifiable map with each of the entries. For * example, <code> * Splitter.on(';').trimResults().withKeyValueSeparator("=>") * .split("a=>b ; c=>b") * </code> will return a mapping from {@code "a"} to {@code "b"} and * {@code "c"} to {@code b}. * * <p>The returned map preserves the order of the entries from * {@code sequence}. * * @throws IllegalArgumentException if the specified sequence does not split * into valid map entries, or if there are duplicate keys */ public Map<String, String> split(CharSequence sequence) { Map<String, String> map = new LinkedHashMap<String, String>(); for (String entry : outerSplitter.split(sequence)) { Iterator<String> entryFields = entrySplitter.spliterator(entry); checkArgument(entryFields.hasNext(), INVALID_ENTRY_MESSAGE, entry); String key = entryFields.next(); checkArgument(!map.containsKey(key), "Duplicate key [%s] found.", key); checkArgument(entryFields.hasNext(), INVALID_ENTRY_MESSAGE, entry); String value = entryFields.next(); map.put(key, value); checkArgument(!entryFields.hasNext(), INVALID_ENTRY_MESSAGE, entry); } return Collections.unmodifiableMap(map); } } private interface Strategy { Iterator<String> iterator(Splitter splitter, CharSequence toSplit); } private abstract static class SplittingIterator extends AbstractIterator<String> { final CharSequence toSplit; final CharMatcher trimmer; final boolean omitEmptyStrings; /** * Returns the first index in {@code toSplit} at or after {@code start} * that contains the separator. */ abstract int separatorStart(int start); /** * Returns the first index in {@code toSplit} after {@code * separatorPosition} that does not contain a separator. This method is only * invoked after a call to {@code separatorStart}. */ abstract int separatorEnd(int separatorPosition); int offset = 0; int limit; protected SplittingIterator(Splitter splitter, CharSequence toSplit) { this.trimmer = splitter.trimmer; this.omitEmptyStrings = splitter.omitEmptyStrings; this.limit = splitter.limit; this.toSplit = toSplit; } @Override protected String computeNext() { /* * The returned string will be from the end of the last match to the * beginning of the next one. nextStart is the start position of the * returned substring, while offset is the place to start looking for a * separator. */ int nextStart = offset; while (offset != -1) { int start = nextStart; int end; int separatorPosition = separatorStart(offset); if (separatorPosition == -1) { end = toSplit.length(); offset = -1; } else { end = separatorPosition; offset = separatorEnd(separatorPosition); } if (offset == nextStart) { /* * This occurs when some pattern has an empty match, even if it * doesn't match the empty string -- for example, if it requires * lookahead or the like. The offset must be increased to look for * separators beyond this point, without changing the start position * of the next returned substring -- so nextStart stays the same. */ offset++; if (offset >= toSplit.length()) { offset = -1; } continue; } while (start < end && trimmer.matches(toSplit.charAt(start))) { start++; } while (end > start && trimmer.matches(toSplit.charAt(end - 1))) { end--; } if (omitEmptyStrings && start == end) { // Don't include the (unused) separator in next split string. nextStart = offset; continue; } if (limit == 1) { // The limit has been reached, return the rest of the string as the // final item. This is tested after empty string removal so that // empty strings do not count towards the limit. end = toSplit.length(); offset = -1; // Since we may have changed the end, we need to trim it again. while (end > start && trimmer.matches(toSplit.charAt(end - 1))) { end--; } } else { limit--; } return toSplit.subSequence(start, end).toString(); } return endOfData(); } } }
Java
/* * Copyright (C) 2007 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 com.google.common.annotations.GwtCompatible; import javax.annotation.Nullable; /** * Determines a true or false value for a given input. * * <p>The {@link Predicates} class provides common predicates and related utilities. * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/FunctionalExplained">the use of {@code * Predicate}</a>. * * @author Kevin Bourrillion * @since 2.0 (imported from Google Collections Library) */ @GwtCompatible public interface Predicate<T> { /** * Returns the result of applying this predicate to {@code input}. This method is <i>generally * expected</i>, but not absolutely required, to have the following properties: * * <ul> * <li>Its execution does not cause any observable side effects. * <li>The computation is <i>consistent with equals</i>; that is, {@link Objects#equal * Objects.equal}{@code (a, b)} implies that {@code predicate.apply(a) == * predicate.apply(b))}. * </ul> * * @throws NullPointerException if {@code input} is null and this predicate does not accept null * arguments */ boolean apply(@Nullable T input); /** * Indicates whether another object is equal to this predicate. * * <p>Most implementations will have no reason to override the behavior of {@link Object#equals}. * However, an implementation may also choose to return {@code true} whenever {@code object} is a * {@link Predicate} that it considers <i>interchangeable</i> with this one. "Interchangeable" * <i>typically</i> means that {@code this.apply(t) == that.apply(t)} for all {@code t} of type * {@code T}). Note that a {@code false} result from this method does not imply that the * predicates are known <i>not</i> to be interchangeable. */ @Override boolean equals(@Nullable Object object); }
Java
/* * Copyright (C) 2007 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 com.google.common.annotations.GwtCompatible; import javax.annotation.Nullable; /** * Determines an output value based on an input value. * * <p>The {@link Functions} class provides common functions and related utilites. * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/FunctionalExplained">the use of {@code * Function}</a>. * * @author Kevin Bourrillion * @since 2.0 (imported from Google Collections Library) */ @GwtCompatible public interface Function<F, T> { /** * Returns the result of applying this function to {@code input}. This method is <i>generally * expected</i>, but not absolutely required, to have the following properties: * * <ul> * <li>Its execution does not cause any observable side effects. * <li>The computation is <i>consistent with equals</i>; that is, {@link Objects#equal * Objects.equal}{@code (a, b)} implies that {@code Objects.equal(function.apply(a), * function.apply(b))}. * </ul> * * @throws NullPointerException if {@code input} is null and this function does not accept null * arguments */ @Nullable T apply(@Nullable F input); /** * Indicates whether another object is equal to this function. * * <p>Most implementations will have no reason to override the behavior of {@link Object#equals}. * However, an implementation may also choose to return {@code true} whenever {@code object} is a * {@link Function} that it considers <i>interchangeable</i> with this one. "Interchangeable" * <i>typically</i> means that {@code Objects.equal(this.apply(f), that.apply(f))} is true for all * {@code f} of type {@code F}. Note that a {@code false} result from this method does not imply * that the functions are known <i>not</i> to be interchangeable. */ @Override boolean equals(@Nullable Object object); }
Java
/* * 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 static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import java.util.Arrays; import java.util.BitSet; import javax.annotation.CheckReturnValue; /** * Determines a true or false value for any Java {@code char} value, just as {@link Predicate} does * for any {@link Object}. Also offers basic text processing methods based on this function. * Implementations are strongly encouraged to be side-effect-free and immutable. * * <p>Throughout the documentation of this class, the phrase "matching character" is used to mean * "any character {@code c} for which {@code this.matches(c)} returns {@code true}". * * <p><b>Note:</b> This class deals only with {@code char} values; it does not understand * supplementary Unicode code points in the range {@code 0x10000} to {@code 0x10FFFF}. Such logical * characters are encoded into a {@code String} using surrogate pairs, and a {@code CharMatcher} * treats these just as two separate characters. * * <p>Example usages: <pre> * String trimmed = {@link #WHITESPACE WHITESPACE}.{@link #trimFrom trimFrom}(userInput); * if ({@link #ASCII ASCII}.{@link #matchesAllOf matchesAllOf}(s)) { ... }</pre> * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/StringsExplained#CharMatcher"> * {@code CharMatcher}</a>. * * @author Kevin Bourrillion * @since 1.0 */ @Beta // Possibly change from chars to code points; decide constants vs. methods @GwtCompatible(emulated = true) public abstract class CharMatcher implements Predicate<Character> { // Constants /** * Determines whether a character is a breaking whitespace (that is, a whitespace which can be * interpreted as a break between words for formatting purposes). See {@link #WHITESPACE} for a * discussion of that term. * * @since 2.0 */ public static final CharMatcher BREAKING_WHITESPACE = new CharMatcher() { @Override public boolean matches(char c) { switch (c) { case '\t': case '\n': case '\013': case '\f': case '\r': case ' ': case '\u0085': case '\u1680': case '\u2028': case '\u2029': case '\u205f': case '\u3000': return true; case '\u2007': return false; default: return c >= '\u2000' && c <= '\u200a'; } } @Override public String toString() { return "CharMatcher.BREAKING_WHITESPACE"; } }; /** * Determines whether a character is ASCII, meaning that its code point is less than 128. */ public static final CharMatcher ASCII = inRange('\0', '\u007f', "CharMatcher.ASCII"); private static class RangesMatcher extends CharMatcher { private final char[] rangeStarts; private final char[] rangeEnds; RangesMatcher(String description, char[] rangeStarts, char[] rangeEnds) { super(description); this.rangeStarts = rangeStarts; this.rangeEnds = rangeEnds; checkArgument(rangeStarts.length == rangeEnds.length); for (int i = 0; i < rangeStarts.length; i++) { checkArgument(rangeStarts[i] <= rangeEnds[i]); if (i + 1 < rangeStarts.length) { checkArgument(rangeEnds[i] < rangeStarts[i + 1]); } } } @Override public boolean matches(char c) { int index = Arrays.binarySearch(rangeStarts, c); if (index >= 0) { return true; } else { index = ~index - 1; return index >= 0 && c <= rangeEnds[index]; } } } // Must be in ascending order. private static final String ZEROES = "0\u0660\u06f0\u07c0\u0966\u09e6\u0a66\u0ae6\u0b66\u0be6" + "\u0c66\u0ce6\u0d66\u0e50\u0ed0\u0f20\u1040\u1090\u17e0\u1810\u1946\u19d0\u1b50\u1bb0" + "\u1c40\u1c50\ua620\ua8d0\ua900\uaa50\uff10"; private static final String NINES; static { StringBuilder builder = new StringBuilder(ZEROES.length()); for (int i = 0; i < ZEROES.length(); i++) { builder.append((char) (ZEROES.charAt(i) + 9)); } NINES = builder.toString(); } /** * Determines whether a character is a digit according to * <a href="http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5Cp%7Bdigit%7D">Unicode</a>. */ public static final CharMatcher DIGIT = new RangesMatcher( "CharMatcher.DIGIT", ZEROES.toCharArray(), NINES.toCharArray()); /** * Determines whether a character is a digit according to {@link Character#isDigit(char) Java's * definition}. If you only care to match ASCII digits, you can use {@code inRange('0', '9')}. */ public static final CharMatcher JAVA_DIGIT = new CharMatcher("CharMatcher.JAVA_DIGIT") { @Override public boolean matches(char c) { return Character.isDigit(c); } }; /** * Determines whether a character is a letter according to {@link Character#isLetter(char) Java's * definition}. If you only care to match letters of the Latin alphabet, you can use {@code * inRange('a', 'z').or(inRange('A', 'Z'))}. */ public static final CharMatcher JAVA_LETTER = new CharMatcher("CharMatcher.JAVA_LETTER") { @Override public boolean matches(char c) { return Character.isLetter(c); } }; /** * Determines whether a character is a letter or digit according to {@link * Character#isLetterOrDigit(char) Java's definition}. */ public static final CharMatcher JAVA_LETTER_OR_DIGIT = new CharMatcher("CharMatcher.JAVA_LETTER_OR_DIGIT") { @Override public boolean matches(char c) { return Character.isLetterOrDigit(c); } }; /** * Determines whether a character is upper case according to {@link Character#isUpperCase(char) * Java's definition}. */ public static final CharMatcher JAVA_UPPER_CASE = new CharMatcher("CharMatcher.JAVA_UPPER_CASE") { @Override public boolean matches(char c) { return Character.isUpperCase(c); } }; /** * Determines whether a character is lower case according to {@link Character#isLowerCase(char) * Java's definition}. */ public static final CharMatcher JAVA_LOWER_CASE = new CharMatcher("CharMatcher.JAVA_LOWER_CASE") { @Override public boolean matches(char c) { return Character.isLowerCase(c); } }; /** * Determines whether a character is an ISO control character as specified by {@link * Character#isISOControl(char)}. */ public static final CharMatcher JAVA_ISO_CONTROL = inRange('\u0000', '\u001f') .or(inRange('\u007f', '\u009f')) .withToString("CharMatcher.JAVA_ISO_CONTROL"); /** * Determines whether a character is invisible; that is, if its Unicode category is any of * SPACE_SEPARATOR, LINE_SEPARATOR, PARAGRAPH_SEPARATOR, CONTROL, FORMAT, SURROGATE, and * PRIVATE_USE according to ICU4J. */ public static final CharMatcher INVISIBLE = new RangesMatcher("CharMatcher.INVISIBLE", ( "\u0000\u007f\u00ad\u0600\u06dd\u070f\u1680\u180e\u2000\u2028\u205f\u206a\u3000\ud800\ufeff" + "\ufff9\ufffa").toCharArray(), ( "\u0020\u00a0\u00ad\u0604\u06dd\u070f\u1680\u180e\u200f\u202f\u2064\u206f\u3000\uf8ff\ufeff" + "\ufff9\ufffb").toCharArray()); private static String showCharacter(char c) { String hex = "0123456789ABCDEF"; char[] tmp = {'\\', 'u', '\0', '\0', '\0', '\0'}; for (int i = 0; i < 4; i++) { tmp[5 - i] = hex.charAt(c & 0xF); c >>= 4; } return String.copyValueOf(tmp); } /** * Determines whether a character is single-width (not double-width). When in doubt, this matcher * errs on the side of returning {@code false} (that is, it tends to assume a character is * double-width). * * <p><b>Note:</b> as the reference file evolves, we will modify this constant to keep it up to * date. */ public static final CharMatcher SINGLE_WIDTH = new RangesMatcher("CharMatcher.SINGLE_WIDTH", "\u0000\u05be\u05d0\u05f3\u0600\u0750\u0e00\u1e00\u2100\ufb50\ufe70\uff61".toCharArray(), "\u04f9\u05be\u05ea\u05f4\u06ff\u077f\u0e7f\u20af\u213a\ufdff\ufeff\uffdc".toCharArray()); /** Matches any character. */ public static final CharMatcher ANY = new FastMatcher("CharMatcher.ANY") { @Override public boolean matches(char c) { return true; } @Override public int indexIn(CharSequence sequence) { return (sequence.length() == 0) ? -1 : 0; } @Override public int indexIn(CharSequence sequence, int start) { int length = sequence.length(); Preconditions.checkPositionIndex(start, length); return (start == length) ? -1 : start; } @Override public int lastIndexIn(CharSequence sequence) { return sequence.length() - 1; } @Override public boolean matchesAllOf(CharSequence sequence) { checkNotNull(sequence); return true; } @Override public boolean matchesNoneOf(CharSequence sequence) { return sequence.length() == 0; } @Override public String removeFrom(CharSequence sequence) { checkNotNull(sequence); return ""; } @Override public String replaceFrom(CharSequence sequence, char replacement) { char[] array = new char[sequence.length()]; Arrays.fill(array, replacement); return new String(array); } @Override public String replaceFrom(CharSequence sequence, CharSequence replacement) { StringBuilder retval = new StringBuilder(sequence.length() * replacement.length()); for (int i = 0; i < sequence.length(); i++) { retval.append(replacement); } return retval.toString(); } @Override public String collapseFrom(CharSequence sequence, char replacement) { return (sequence.length() == 0) ? "" : String.valueOf(replacement); } @Override public String trimFrom(CharSequence sequence) { checkNotNull(sequence); return ""; } @Override public int countIn(CharSequence sequence) { return sequence.length(); } @Override public CharMatcher and(CharMatcher other) { return checkNotNull(other); } @Override public CharMatcher or(CharMatcher other) { checkNotNull(other); return this; } @Override public CharMatcher negate() { return NONE; } }; /** Matches no characters. */ public static final CharMatcher NONE = new FastMatcher("CharMatcher.NONE") { @Override public boolean matches(char c) { return false; } @Override public int indexIn(CharSequence sequence) { checkNotNull(sequence); return -1; } @Override public int indexIn(CharSequence sequence, int start) { int length = sequence.length(); Preconditions.checkPositionIndex(start, length); return -1; } @Override public int lastIndexIn(CharSequence sequence) { checkNotNull(sequence); return -1; } @Override public boolean matchesAllOf(CharSequence sequence) { return sequence.length() == 0; } @Override public boolean matchesNoneOf(CharSequence sequence) { checkNotNull(sequence); return true; } @Override public String removeFrom(CharSequence sequence) { return sequence.toString(); } @Override public String replaceFrom(CharSequence sequence, char replacement) { return sequence.toString(); } @Override public String replaceFrom(CharSequence sequence, CharSequence replacement) { checkNotNull(replacement); return sequence.toString(); } @Override public String collapseFrom(CharSequence sequence, char replacement) { return sequence.toString(); } @Override public String trimFrom(CharSequence sequence) { return sequence.toString(); } @Override public String trimLeadingFrom(CharSequence sequence) { return sequence.toString(); } @Override public String trimTrailingFrom(CharSequence sequence) { return sequence.toString(); } @Override public int countIn(CharSequence sequence) { checkNotNull(sequence); return 0; } @Override public CharMatcher and(CharMatcher other) { checkNotNull(other); return this; } @Override public CharMatcher or(CharMatcher other) { return checkNotNull(other); } @Override public CharMatcher negate() { return ANY; } }; // Static factories /** * Returns a {@code char} matcher that matches only one specified character. */ public static CharMatcher is(final char match) { String description = "CharMatcher.is('" + showCharacter(match) + "')"; return new FastMatcher(description) { @Override public boolean matches(char c) { return c == match; } @Override public String replaceFrom(CharSequence sequence, char replacement) { return sequence.toString().replace(match, replacement); } @Override public CharMatcher and(CharMatcher other) { return other.matches(match) ? this : NONE; } @Override public CharMatcher or(CharMatcher other) { return other.matches(match) ? other : super.or(other); } @Override public CharMatcher negate() { return isNot(match); } @GwtIncompatible("java.util.BitSet") @Override void setBits(BitSet table) { table.set(match); } }; } /** * Returns a {@code char} matcher that matches any character except the one specified. * * <p>To negate another {@code CharMatcher}, use {@link #negate()}. */ public static CharMatcher isNot(final char match) { String description = "CharMatcher.isNot(" + Integer.toHexString(match) + ")"; return new FastMatcher(description) { @Override public boolean matches(char c) { return c != match; } @Override public CharMatcher and(CharMatcher other) { return other.matches(match) ? super.and(other) : other; } @Override public CharMatcher or(CharMatcher other) { return other.matches(match) ? ANY : this; } @GwtIncompatible("java.util.BitSet") @Override void setBits(BitSet table) { table.set(0, match); table.set(match + 1, Character.MAX_VALUE + 1); } @Override public CharMatcher negate() { return is(match); } }; } /** * Returns a {@code char} matcher that matches any character present in the given character * sequence. */ public static CharMatcher anyOf(final CharSequence sequence) { switch (sequence.length()) { case 0: return NONE; case 1: return is(sequence.charAt(0)); case 2: return isEither(sequence.charAt(0), sequence.charAt(1)); default: // continue below to handle the general case } // TODO(user): is it potentially worth just going ahead and building a precomputed matcher? final char[] chars = sequence.toString().toCharArray(); Arrays.sort(chars); StringBuilder description = new StringBuilder("CharMatcher.anyOf(\""); for (char c : chars) { description.append(showCharacter(c)); } description.append("\")"); return new CharMatcher(description.toString()) { @Override public boolean matches(char c) { return Arrays.binarySearch(chars, c) >= 0; } @Override @GwtIncompatible("java.util.BitSet") void setBits(BitSet table) { for (char c : chars) { table.set(c); } } }; } private static CharMatcher isEither( final char match1, final char match2) { String description = "CharMatcher.anyOf(\"" + showCharacter(match1) + showCharacter(match2) + "\")"; return new FastMatcher(description) { @Override public boolean matches(char c) { return c == match1 || c == match2; } @GwtIncompatible("java.util.BitSet") @Override void setBits(BitSet table) { table.set(match1); table.set(match2); } }; } /** * Returns a {@code char} matcher that matches any character not present in the given character * sequence. */ public static CharMatcher noneOf(CharSequence sequence) { return anyOf(sequence).negate(); } /** * Returns a {@code char} matcher that matches any character in a given range (both endpoints are * inclusive). For example, to match any lowercase letter of the English alphabet, use {@code * CharMatcher.inRange('a', 'z')}. * * @throws IllegalArgumentException if {@code endInclusive < startInclusive} */ public static CharMatcher inRange(final char startInclusive, final char endInclusive) { checkArgument(endInclusive >= startInclusive); String description = "CharMatcher.inRange('" + showCharacter(startInclusive) + "', '" + showCharacter(endInclusive) + "')"; return inRange(startInclusive, endInclusive, description); } static CharMatcher inRange(final char startInclusive, final char endInclusive, String description) { return new FastMatcher(description) { @Override public boolean matches(char c) { return startInclusive <= c && c <= endInclusive; } @GwtIncompatible("java.util.BitSet") @Override void setBits(BitSet table) { table.set(startInclusive, endInclusive + 1); } }; } /** * Returns a matcher with identical behavior to the given {@link Character}-based predicate, but * which operates on primitive {@code char} instances instead. */ public static CharMatcher forPredicate(final Predicate<? super Character> predicate) { checkNotNull(predicate); if (predicate instanceof CharMatcher) { return (CharMatcher) predicate; } String description = "CharMatcher.forPredicate(" + predicate + ")"; return new CharMatcher(description) { @Override public boolean matches(char c) { return predicate.apply(c); } @Override public boolean apply(Character character) { return predicate.apply(checkNotNull(character)); } }; } // State final String description; // Constructors /** * Sets the {@code toString()} from the given description. */ CharMatcher(String description) { this.description = description; } /** * Constructor for use by subclasses. When subclassing, you may want to override * {@code toString()} to provide a useful description. */ protected CharMatcher() { description = super.toString(); } // Abstract methods /** Determines a true or false value for the given character. */ public abstract boolean matches(char c); // Non-static factories /** * Returns a matcher that matches any character not matched by this matcher. */ public CharMatcher negate() { return new NegatedMatcher(this); } private static class NegatedMatcher extends CharMatcher { final CharMatcher original; NegatedMatcher(String toString, CharMatcher original) { super(toString); this.original = original; } NegatedMatcher(CharMatcher original) { this(original + ".negate()", original); } @Override public boolean matches(char c) { return !original.matches(c); } @Override public boolean matchesAllOf(CharSequence sequence) { return original.matchesNoneOf(sequence); } @Override public boolean matchesNoneOf(CharSequence sequence) { return original.matchesAllOf(sequence); } @Override public int countIn(CharSequence sequence) { return sequence.length() - original.countIn(sequence); } @GwtIncompatible("java.util.BitSet") @Override void setBits(BitSet table) { BitSet tmp = new BitSet(); original.setBits(tmp); tmp.flip(Character.MIN_VALUE, Character.MAX_VALUE + 1); table.or(tmp); } @Override public CharMatcher negate() { return original; } @Override CharMatcher withToString(String description) { return new NegatedMatcher(description, original); } } /** * Returns a matcher that matches any character matched by both this matcher and {@code other}. */ public CharMatcher and(CharMatcher other) { return new And(this, checkNotNull(other)); } private static class And extends CharMatcher { final CharMatcher first; final CharMatcher second; And(CharMatcher a, CharMatcher b) { this(a, b, "CharMatcher.and(" + a + ", " + b + ")"); } And(CharMatcher a, CharMatcher b, String description) { super(description); first = checkNotNull(a); second = checkNotNull(b); } @Override public boolean matches(char c) { return first.matches(c) && second.matches(c); } @GwtIncompatible("java.util.BitSet") @Override void setBits(BitSet table) { BitSet tmp1 = new BitSet(); first.setBits(tmp1); BitSet tmp2 = new BitSet(); second.setBits(tmp2); tmp1.and(tmp2); table.or(tmp1); } @Override CharMatcher withToString(String description) { return new And(first, second, description); } } /** * Returns a matcher that matches any character matched by either this matcher or {@code other}. */ public CharMatcher or(CharMatcher other) { return new Or(this, checkNotNull(other)); } private static class Or extends CharMatcher { final CharMatcher first; final CharMatcher second; Or(CharMatcher a, CharMatcher b, String description) { super(description); first = checkNotNull(a); second = checkNotNull(b); } Or(CharMatcher a, CharMatcher b) { this(a, b, "CharMatcher.or(" + a + ", " + b + ")"); } @GwtIncompatible("java.util.BitSet") @Override void setBits(BitSet table) { first.setBits(table); second.setBits(table); } @Override public boolean matches(char c) { return first.matches(c) || second.matches(c); } @Override CharMatcher withToString(String description) { return new Or(first, second, description); } } /** * Returns a {@code char} matcher functionally equivalent to this one, but which may be faster to * query than the original; your mileage may vary. Precomputation takes time and is likely to be * worthwhile only if the precomputed matcher is queried many thousands of times. * * <p>This method has no effect (returns {@code this}) when called in GWT: it's unclear whether a * precomputed matcher is faster, but it certainly consumes more memory, which doesn't seem like a * worthwhile tradeoff in a browser. */ public CharMatcher precomputed() { return Platform.precomputeCharMatcher(this); } /** * Subclasses should provide a new CharMatcher with the same characteristics as {@code this}, * but with their {@code toString} method overridden with the new description. * * <p>This is unsupported by default. */ CharMatcher withToString(String description) { throw new UnsupportedOperationException(); } private static final int DISTINCT_CHARS = Character.MAX_VALUE - Character.MIN_VALUE + 1; /** * This is the actual implementation of {@link #precomputed}, but we bounce calls through a * method on {@link Platform} so that we can have different behavior in GWT. * * <p>This implementation tries to be smart in a number of ways. It recognizes cases where * the negation is cheaper to precompute than the matcher itself; it tries to build small * hash tables for matchers that only match a few characters, and so on. In the worst-case * scenario, it constructs an eight-kilobyte bit array and queries that. * In many situations this produces a matcher which is faster to query than the original. */ @GwtIncompatible("java.util.BitSet") CharMatcher precomputedInternal() { final BitSet table = new BitSet(); setBits(table); int totalCharacters = table.cardinality(); if (totalCharacters * 2 <= DISTINCT_CHARS) { return precomputedPositive(totalCharacters, table, description); } else { // TODO(user): is it worth it to worry about the last character of large matchers? table.flip(Character.MIN_VALUE, Character.MAX_VALUE + 1); int negatedCharacters = DISTINCT_CHARS - totalCharacters; return new NegatedFastMatcher(toString(), precomputedPositive(negatedCharacters, table, description + ".negate()")); } } /** * A matcher for which precomputation will not yield any significant benefit. */ abstract static class FastMatcher extends CharMatcher { FastMatcher() { super(); } FastMatcher(String description) { super(description); } @Override public final CharMatcher precomputed() { return this; } @Override public CharMatcher negate() { return new NegatedFastMatcher(this); } } static final class NegatedFastMatcher extends NegatedMatcher { NegatedFastMatcher(CharMatcher original) { super(original); } NegatedFastMatcher(String toString, CharMatcher original) { super(toString, original); } @Override public final CharMatcher precomputed() { return this; } @Override CharMatcher withToString(String description) { return new NegatedFastMatcher(description, original); } } /** * Helper method for {@link #precomputedInternal} that doesn't test if the negation is cheaper. */ @GwtIncompatible("java.util.BitSet") private static CharMatcher precomputedPositive( int totalCharacters, BitSet table, String description) { switch (totalCharacters) { case 0: return NONE; case 1: return is((char) table.nextSetBit(0)); case 2: char c1 = (char) table.nextSetBit(0); char c2 = (char) table.nextSetBit(c1 + 1); return isEither(c1, c2); default: return isSmall(totalCharacters, table.length()) ? SmallCharMatcher.from(table, description) : new BitSetMatcher(table, description); } } private static boolean isSmall(int totalCharacters, int tableLength) { return totalCharacters <= SmallCharMatcher.MAX_SIZE && tableLength > (totalCharacters * 4 * Character.SIZE); // err on the side of BitSetMatcher } @GwtIncompatible("java.util.BitSet") private static class BitSetMatcher extends FastMatcher { private final BitSet table; private BitSetMatcher(BitSet table, String description) { super(description); if (table.length() + Long.SIZE < table.size()) { table = (BitSet) table.clone(); // If only we could actually call BitSet.trimToSize() ourselves... } this.table = table; } @Override public boolean matches(char c) { return table.get(c); } @Override void setBits(BitSet bitSet) { bitSet.or(table); } } /** * Sets bits in {@code table} matched by this matcher. */ @GwtIncompatible("java.util.BitSet") void setBits(BitSet table) { for (int c = Character.MAX_VALUE; c >= Character.MIN_VALUE; c--) { if (matches((char) c)) { table.set(c); } } } // Text processing routines /** * Returns {@code true} if a character sequence contains at least one matching character. * Equivalent to {@code !matchesNoneOf(sequence)}. * * <p>The default implementation iterates over the sequence, invoking {@link #matches} for each * character, until this returns {@code true} or the end is reached. * * @param sequence the character sequence to examine, possibly empty * @return {@code true} if this matcher matches at least one character in the sequence * @since 8.0 */ public boolean matchesAnyOf(CharSequence sequence) { return !matchesNoneOf(sequence); } /** * Returns {@code true} if a character sequence contains only matching characters. * * <p>The default implementation iterates over the sequence, invoking {@link #matches} for each * character, until this returns {@code false} or the end is reached. * * @param sequence the character sequence to examine, possibly empty * @return {@code true} if this matcher matches every character in the sequence, including when * the sequence is empty */ public boolean matchesAllOf(CharSequence sequence) { for (int i = sequence.length() - 1; i >= 0; i--) { if (!matches(sequence.charAt(i))) { return false; } } return true; } /** * Returns {@code true} if a character sequence contains no matching characters. Equivalent to * {@code !matchesAnyOf(sequence)}. * * <p>The default implementation iterates over the sequence, invoking {@link #matches} for each * character, until this returns {@code false} or the end is reached. * * @param sequence the character sequence to examine, possibly empty * @return {@code true} if this matcher matches every character in the sequence, including when * the sequence is empty */ public boolean matchesNoneOf(CharSequence sequence) { return indexIn(sequence) == -1; } /** * Returns the index of the first matching character in a character sequence, or {@code -1} if no * matching character is present. * * <p>The default implementation iterates over the sequence in forward order calling {@link * #matches} for each character. * * @param sequence the character sequence to examine from the beginning * @return an index, or {@code -1} if no character matches */ public int indexIn(CharSequence sequence) { int length = sequence.length(); for (int i = 0; i < length; i++) { if (matches(sequence.charAt(i))) { return i; } } return -1; } /** * Returns the index of the first matching character in a character sequence, starting from a * given position, or {@code -1} if no character matches after that position. * * <p>The default implementation iterates over the sequence in forward order, beginning at {@code * start}, calling {@link #matches} for each character. * * @param sequence the character sequence to examine * @param start the first index to examine; must be nonnegative and no greater than {@code * sequence.length()} * @return the index of the first matching character, guaranteed to be no less than {@code start}, * or {@code -1} if no character matches * @throws IndexOutOfBoundsException if start is negative or greater than {@code * sequence.length()} */ public int indexIn(CharSequence sequence, int start) { int length = sequence.length(); Preconditions.checkPositionIndex(start, length); for (int i = start; i < length; i++) { if (matches(sequence.charAt(i))) { return i; } } return -1; } /** * Returns the index of the last matching character in a character sequence, or {@code -1} if no * matching character is present. * * <p>The default implementation iterates over the sequence in reverse order calling {@link * #matches} for each character. * * @param sequence the character sequence to examine from the end * @return an index, or {@code -1} if no character matches */ public int lastIndexIn(CharSequence sequence) { for (int i = sequence.length() - 1; i >= 0; i--) { if (matches(sequence.charAt(i))) { return i; } } return -1; } /** * Returns the number of matching characters found in a character sequence. */ public int countIn(CharSequence sequence) { int count = 0; for (int i = 0; i < sequence.length(); i++) { if (matches(sequence.charAt(i))) { count++; } } return count; } /** * Returns a string containing all non-matching characters of a character sequence, in order. For * example: <pre> {@code * * CharMatcher.is('a').removeFrom("bazaar")}</pre> * * ... returns {@code "bzr"}. */ @CheckReturnValue public String removeFrom(CharSequence sequence) { String string = sequence.toString(); int pos = indexIn(string); if (pos == -1) { return string; } char[] chars = string.toCharArray(); int spread = 1; // This unusual loop comes from extensive benchmarking OUT: while (true) { pos++; while (true) { if (pos == chars.length) { break OUT; } if (matches(chars[pos])) { break; } chars[pos - spread] = chars[pos]; pos++; } spread++; } return new String(chars, 0, pos - spread); } /** * Returns a string containing all matching characters of a character sequence, in order. For * example: <pre> {@code * * CharMatcher.is('a').retainFrom("bazaar")}</pre> * * ... returns {@code "aaa"}. */ @CheckReturnValue public String retainFrom(CharSequence sequence) { return negate().removeFrom(sequence); } /** * Returns a string copy of the input character sequence, with each character that matches this * matcher replaced by a given replacement character. For example: <pre> {@code * * CharMatcher.is('a').replaceFrom("radar", 'o')}</pre> * * ... returns {@code "rodor"}. * * <p>The default implementation uses {@link #indexIn(CharSequence)} to find the first matching * character, then iterates the remainder of the sequence calling {@link #matches(char)} for each * character. * * @param sequence the character sequence to replace matching characters in * @param replacement the character to append to the result string in place of each matching * character in {@code sequence} * @return the new string */ @CheckReturnValue public String replaceFrom(CharSequence sequence, char replacement) { String string = sequence.toString(); int pos = indexIn(string); if (pos == -1) { return string; } char[] chars = string.toCharArray(); chars[pos] = replacement; for (int i = pos + 1; i < chars.length; i++) { if (matches(chars[i])) { chars[i] = replacement; } } return new String(chars); } /** * Returns a string copy of the input character sequence, with each character that matches this * matcher replaced by a given replacement sequence. For example: <pre> {@code * * CharMatcher.is('a').replaceFrom("yaha", "oo")}</pre> * * ... returns {@code "yoohoo"}. * * <p><b>Note:</b> If the replacement is a fixed string with only one character, you are better * off calling {@link #replaceFrom(CharSequence, char)} directly. * * @param sequence the character sequence to replace matching characters in * @param replacement the characters to append to the result string in place of each matching * character in {@code sequence} * @return the new string */ @CheckReturnValue public String replaceFrom(CharSequence sequence, CharSequence replacement) { int replacementLen = replacement.length(); if (replacementLen == 0) { return removeFrom(sequence); } if (replacementLen == 1) { return replaceFrom(sequence, replacement.charAt(0)); } String string = sequence.toString(); int pos = indexIn(string); if (pos == -1) { return string; } int len = string.length(); StringBuilder buf = new StringBuilder((len * 3 / 2) + 16); int oldpos = 0; do { buf.append(string, oldpos, pos); buf.append(replacement); oldpos = pos + 1; pos = indexIn(string, oldpos); } while (pos != -1); buf.append(string, oldpos, len); return buf.toString(); } /** * Returns a substring of the input character sequence that omits all characters this matcher * matches from the beginning and from the end of the string. For example: <pre> {@code * * CharMatcher.anyOf("ab").trimFrom("abacatbab")}</pre> * * ... returns {@code "cat"}. * * <p>Note that: <pre> {@code * * CharMatcher.inRange('\0', ' ').trimFrom(str)}</pre> * * ... is equivalent to {@link String#trim()}. */ @CheckReturnValue public String trimFrom(CharSequence sequence) { int len = sequence.length(); int first; int last; for (first = 0; first < len; first++) { if (!matches(sequence.charAt(first))) { break; } } for (last = len - 1; last > first; last--) { if (!matches(sequence.charAt(last))) { break; } } return sequence.subSequence(first, last + 1).toString(); } /** * Returns a substring of the input character sequence that omits all characters this matcher * matches from the beginning of the string. For example: <pre> {@code * * CharMatcher.anyOf("ab").trimLeadingFrom("abacatbab")}</pre> * * ... returns {@code "catbab"}. */ @CheckReturnValue public String trimLeadingFrom(CharSequence sequence) { int len = sequence.length(); for (int first = 0; first < len; first++) { if (!matches(sequence.charAt(first))) { return sequence.subSequence(first, len).toString(); } } return ""; } /** * Returns a substring of the input character sequence that omits all characters this matcher * matches from the end of the string. For example: <pre> {@code * * CharMatcher.anyOf("ab").trimTrailingFrom("abacatbab")}</pre> * * ... returns {@code "abacat"}. */ @CheckReturnValue public String trimTrailingFrom(CharSequence sequence) { int len = sequence.length(); for (int last = len - 1; last >= 0; last--) { if (!matches(sequence.charAt(last))) { return sequence.subSequence(0, last + 1).toString(); } } return ""; } /** * Returns a string copy of the input character sequence, with each group of consecutive * characters that match this matcher replaced by a single replacement character. For example: * <pre> {@code * * CharMatcher.anyOf("eko").collapseFrom("bookkeeper", '-')}</pre> * * ... returns {@code "b-p-r"}. * * <p>The default implementation uses {@link #indexIn(CharSequence)} to find the first matching * character, then iterates the remainder of the sequence calling {@link #matches(char)} for each * character. * * @param sequence the character sequence to replace matching groups of characters in * @param replacement the character to append to the result string in place of each group of * matching characters in {@code sequence} * @return the new string */ @CheckReturnValue public String collapseFrom(CharSequence sequence, char replacement) { // This implementation avoids unnecessary allocation. int len = sequence.length(); for (int i = 0; i < len; i++) { char c = sequence.charAt(i); if (matches(c)) { if (c == replacement && (i == len - 1 || !matches(sequence.charAt(i + 1)))) { // a no-op replacement i++; } else { StringBuilder builder = new StringBuilder(len) .append(sequence.subSequence(0, i)) .append(replacement); return finishCollapseFrom(sequence, i + 1, len, replacement, builder, true); } } } // no replacement needed return sequence.toString(); } /** * Collapses groups of matching characters exactly as {@link #collapseFrom} does, except that * groups of matching characters at the start or end of the sequence are removed without * replacement. */ @CheckReturnValue public String trimAndCollapseFrom(CharSequence sequence, char replacement) { // This implementation avoids unnecessary allocation. int len = sequence.length(); int first; int last; for (first = 0; first < len && matches(sequence.charAt(first)); first++) {} for (last = len - 1; last > first && matches(sequence.charAt(last)); last--) {} return (first == 0 && last == len - 1) ? collapseFrom(sequence, replacement) : finishCollapseFrom( sequence, first, last + 1, replacement, new StringBuilder(last + 1 - first), false); } private String finishCollapseFrom( CharSequence sequence, int start, int end, char replacement, StringBuilder builder, boolean inMatchingGroup) { for (int i = start; i < end; i++) { char c = sequence.charAt(i); if (matches(c)) { if (!inMatchingGroup) { builder.append(replacement); inMatchingGroup = true; } } else { builder.append(c); inMatchingGroup = false; } } return builder.toString(); } // Predicate interface /** * Equivalent to {@link #matches}; provided only to satisfy the {@link Predicate} interface. When * using a reference of type {@code CharMatcher}, invoke {@link #matches} directly instead. */ @Override public boolean apply(Character character) { return matches(character); } /** * Returns a string representation of this {@code CharMatcher}, such as * {@code CharMatcher.or(WHITESPACE, JAVA_DIGIT)}. */ @Override public String toString() { return description; } /** * A special-case CharMatcher for Unicode whitespace characters that is extremely * efficient both in space required and in time to check for matches. * * Implementation details. * It turns out that all current (early 2012) Unicode characters are unique modulo 79: * so we can construct a lookup table of exactly 79 entries, and just check the character code * mod 79, and see if that character is in the table. * * There is a 1 at the beginning of the table so that the null character is not listed * as whitespace. * * Other things we tried that did not prove to be beneficial, mostly due to speed concerns: * * * Binary search into the sorted list of characters, i.e., what * CharMatcher.anyOf() does</li> * * Perfect hash function into a table of size 26 (using an offset table and a special * Jenkins hash function)</li> * * Perfect-ish hash function that required two lookups into a single table of size 26.</li> * * Using a power-of-2 sized hash table (size 64) with linear probing.</li> * * --Christopher Swenson, February 2012. */ private static final String WHITESPACE_TABLE = "\u0001\u0000\u00a0\u0000\u0000\u0000\u0000\u0000" + "\u0000\u0009\n\u000b\u000c\r\u0000\u0000\u2028\u2029\u0000\u0000\u0000\u0000\u0000\u202f" + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0020\u0000\u0000\u0000\u0000\u0000" + "\u0000\u0000\u0000\u0000\u0000\u3000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + "\u0000\u0000\u0085\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a" + "\u0000\u0000\u0000\u0000\u0000\u205f\u1680\u0000\u0000\u180e\u0000\u0000\u0000"; /** * Determines whether a character is whitespace according to the latest Unicode standard, as * illustrated * <a href="http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%5Cp%7Bwhitespace%7D">here</a>. * This is not the same definition used by other Java APIs. (See a * <a href="http://spreadsheets.google.com/pub?key=pd8dAQyHbdewRsnE5x5GzKQ">comparison of several * definitions of "whitespace"</a>.) * * <p><b>Note:</b> as the Unicode definition evolves, we will modify this constant to keep it up * to date. */ public static final CharMatcher WHITESPACE = new FastMatcher("CharMatcher.WHITESPACE") { @Override public boolean matches(char c) { return WHITESPACE_TABLE.charAt(c % 79) == c; } }; }
Java
/* * Copyright (C) 2007 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 com.google.common.annotations.GwtCompatible; import com.google.common.annotations.VisibleForTesting; import java.util.NoSuchElementException; import javax.annotation.Nullable; /** * Simple static methods to be called at the start of your own methods to verify * correct arguments and state. This allows constructs such as * * <pre> {@code * if (count <= 0) { * throw new IllegalArgumentException("must be positive: " + count); * }}</pre> * * <p>to be replaced with the more compact * <pre> {@code * checkArgument(count > 0, "must be positive: %s", count);}</pre> * * <p>Note that the sense of the expression is inverted; with {@code Preconditions} * you declare what you expect to be <i>true</i>, just as you do with an * <a href="http://java.sun.com/j2se/1.5.0/docs/guide/language/assert.html"> * {@code assert}</a> or a JUnit {@code assertTrue} call. * * <p><b>Warning:</b> only the {@code "%s"} specifier is recognized as a * placeholder in these messages, not the full range of {@link * String#format(String, Object[])} specifiers. * * <p>Take care not to confuse precondition checking with other similar types * of checks! Precondition exceptions -- including those provided here, but also * {@link IndexOutOfBoundsException}, {@link NoSuchElementException}, {@link * UnsupportedOperationException} and others -- are used to signal that the * <i>calling method</i> has made an error. This tells the caller that it should * not have invoked the method when it did, with the arguments it did, or * perhaps ever. Postcondition or other invariant failures should not throw * these types of exceptions. * * <p>See the Guava User Guide on <a href= * "http://code.google.com/p/guava-libraries/wiki/PreconditionsExplained"> * using {@code Preconditions}</a>. * * @author Kevin Bourrillion * @since 2.0 (imported from Google Collections Library) */ @GwtCompatible public final class Preconditions { private Preconditions() {} /** * Ensures the truth of an expression involving one or more parameters to the * calling method. * * @param expression a boolean expression * @throws IllegalArgumentException if {@code expression} is false */ public static void checkArgument(boolean expression) { if (!expression) { throw new IllegalArgumentException(); } } /** * Ensures the truth of an expression involving one or more parameters to the * calling method. * * @param expression a boolean expression * @param errorMessage the exception message to use if the check fails; will * be converted to a string using {@link String#valueOf(Object)} * @throws IllegalArgumentException if {@code expression} is false */ public static void checkArgument( boolean expression, @Nullable Object errorMessage) { if (!expression) { throw new IllegalArgumentException(String.valueOf(errorMessage)); } } /** * Ensures the truth of an expression involving one or more parameters to the * calling method. * * @param expression a boolean expression * @param errorMessageTemplate a template for the exception message should the * check fail. The message is formed by replacing each {@code %s} * placeholder in the template with an argument. These are matched by * position - the first {@code %s} gets {@code errorMessageArgs[0]}, etc. * Unmatched arguments will be appended to the formatted message in square * braces. Unmatched placeholders will be left as-is. * @param errorMessageArgs the arguments to be substituted into the message * template. Arguments are converted to strings using * {@link String#valueOf(Object)}. * @throws IllegalArgumentException if {@code expression} is false * @throws NullPointerException if the check fails and either {@code * errorMessageTemplate} or {@code errorMessageArgs} is null (don't let * this happen) */ public static void checkArgument(boolean expression, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { if (!expression) { throw new IllegalArgumentException( format(errorMessageTemplate, errorMessageArgs)); } } /** * Ensures the truth of an expression involving the state of the calling * instance, but not involving any parameters to the calling method. * * @param expression a boolean expression * @throws IllegalStateException if {@code expression} is false */ public static void checkState(boolean expression) { if (!expression) { throw new IllegalStateException(); } } /** * Ensures the truth of an expression involving the state of the calling * instance, but not involving any parameters to the calling method. * * @param expression a boolean expression * @param errorMessage the exception message to use if the check fails; will * be converted to a string using {@link String#valueOf(Object)} * @throws IllegalStateException if {@code expression} is false */ public static void checkState( boolean expression, @Nullable Object errorMessage) { if (!expression) { throw new IllegalStateException(String.valueOf(errorMessage)); } } /** * Ensures the truth of an expression involving the state of the calling * instance, but not involving any parameters to the calling method. * * @param expression a boolean expression * @param errorMessageTemplate a template for the exception message should the * check fail. The message is formed by replacing each {@code %s} * placeholder in the template with an argument. These are matched by * position - the first {@code %s} gets {@code errorMessageArgs[0]}, etc. * Unmatched arguments will be appended to the formatted message in square * braces. Unmatched placeholders will be left as-is. * @param errorMessageArgs the arguments to be substituted into the message * template. Arguments are converted to strings using * {@link String#valueOf(Object)}. * @throws IllegalStateException if {@code expression} is false * @throws NullPointerException if the check fails and either {@code * errorMessageTemplate} or {@code errorMessageArgs} is null (don't let * this happen) */ public static void checkState(boolean expression, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { if (!expression) { throw new IllegalStateException( format(errorMessageTemplate, errorMessageArgs)); } } /** * Ensures that an object reference passed as a parameter to the calling * method is not null. * * @param reference an object reference * @return the non-null reference that was validated * @throws NullPointerException if {@code reference} is null */ public static <T> T checkNotNull(T reference) { if (reference == null) { throw new NullPointerException(); } return reference; } /** * Ensures that an object reference passed as a parameter to the calling * method is not null. * * @param reference an object reference * @param errorMessage the exception message to use if the check fails; will * be converted to a string using {@link String#valueOf(Object)} * @return the non-null reference that was validated * @throws NullPointerException if {@code reference} is null */ public static <T> T checkNotNull(T reference, @Nullable Object errorMessage) { if (reference == null) { throw new NullPointerException(String.valueOf(errorMessage)); } return reference; } /** * Ensures that an object reference passed as a parameter to the calling * method is not null. * * @param reference an object reference * @param errorMessageTemplate a template for the exception message should the * check fail. The message is formed by replacing each {@code %s} * placeholder in the template with an argument. These are matched by * position - the first {@code %s} gets {@code errorMessageArgs[0]}, etc. * Unmatched arguments will be appended to the formatted message in square * braces. Unmatched placeholders will be left as-is. * @param errorMessageArgs the arguments to be substituted into the message * template. Arguments are converted to strings using * {@link String#valueOf(Object)}. * @return the non-null reference that was validated * @throws NullPointerException if {@code reference} is null */ public static <T> T checkNotNull(T reference, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { if (reference == null) { // If either of these parameters is null, the right thing happens anyway throw new NullPointerException( format(errorMessageTemplate, errorMessageArgs)); } return reference; } /* * All recent hotspots (as of 2009) *really* like to have the natural code * * if (guardExpression) { * throw new BadException(messageExpression); * } * * refactored so that messageExpression is moved to a separate * String-returning method. * * if (guardExpression) { * throw new BadException(badMsg(...)); * } * * The alternative natural refactorings into void or Exception-returning * methods are much slower. This is a big deal - we're talking factors of * 2-8 in microbenchmarks, not just 10-20%. (This is a hotspot optimizer * bug, which should be fixed, but that's a separate, big project). * * The coding pattern above is heavily used in java.util, e.g. in ArrayList. * There is a RangeCheckMicroBenchmark in the JDK that was used to test this. * * But the methods in this class want to throw different exceptions, * depending on the args, so it appears that this pattern is not directly * applicable. But we can use the ridiculous, devious trick of throwing an * exception in the middle of the construction of another exception. * Hotspot is fine with that. */ /** * Ensures that {@code index} specifies a valid <i>element</i> in an array, * list or string of size {@code size}. An element index may range from zero, * inclusive, to {@code size}, exclusive. * * @param index a user-supplied index identifying an element of an array, list * or string * @param size the size of that array, list or string * @return the value of {@code index} * @throws IndexOutOfBoundsException if {@code index} is negative or is not * less than {@code size} * @throws IllegalArgumentException if {@code size} is negative */ public static int checkElementIndex(int index, int size) { return checkElementIndex(index, size, "index"); } /** * Ensures that {@code index} specifies a valid <i>element</i> in an array, * list or string of size {@code size}. An element index may range from zero, * inclusive, to {@code size}, exclusive. * * @param index a user-supplied index identifying an element of an array, list * or string * @param size the size of that array, list or string * @param desc the text to use to describe this index in an error message * @return the value of {@code index} * @throws IndexOutOfBoundsException if {@code index} is negative or is not * less than {@code size} * @throws IllegalArgumentException if {@code size} is negative */ public static int checkElementIndex( int index, int size, @Nullable String desc) { // Carefully optimized for execution by hotspot (explanatory comment above) if (index < 0 || index >= size) { throw new IndexOutOfBoundsException(badElementIndex(index, size, desc)); } return index; } private static String badElementIndex(int index, int size, String desc) { if (index < 0) { return format("%s (%s) must not be negative", desc, index); } else if (size < 0) { throw new IllegalArgumentException("negative size: " + size); } else { // index >= size return format("%s (%s) must be less than size (%s)", desc, index, size); } } /** * Ensures that {@code index} specifies a valid <i>position</i> in an array, * list or string of size {@code size}. A position index may range from zero * to {@code size}, inclusive. * * @param index a user-supplied index identifying a position in an array, list * or string * @param size the size of that array, list or string * @return the value of {@code index} * @throws IndexOutOfBoundsException if {@code index} is negative or is * greater than {@code size} * @throws IllegalArgumentException if {@code size} is negative */ public static int checkPositionIndex(int index, int size) { return checkPositionIndex(index, size, "index"); } /** * Ensures that {@code index} specifies a valid <i>position</i> in an array, * list or string of size {@code size}. A position index may range from zero * to {@code size}, inclusive. * * @param index a user-supplied index identifying a position in an array, list * or string * @param size the size of that array, list or string * @param desc the text to use to describe this index in an error message * @return the value of {@code index} * @throws IndexOutOfBoundsException if {@code index} is negative or is * greater than {@code size} * @throws IllegalArgumentException if {@code size} is negative */ public static int checkPositionIndex( int index, int size, @Nullable String desc) { // Carefully optimized for execution by hotspot (explanatory comment above) if (index < 0 || index > size) { throw new IndexOutOfBoundsException(badPositionIndex(index, size, desc)); } return index; } private static String badPositionIndex(int index, int size, String desc) { if (index < 0) { return format("%s (%s) must not be negative", desc, index); } else if (size < 0) { throw new IllegalArgumentException("negative size: " + size); } else { // index > size return format("%s (%s) must not be greater than size (%s)", desc, index, size); } } /** * Ensures that {@code start} and {@code end} specify a valid <i>positions</i> * in an array, list or string of size {@code size}, and are in order. A * position index may range from zero to {@code size}, inclusive. * * @param start a user-supplied index identifying a starting position in an * array, list or string * @param end a user-supplied index identifying a ending position in an array, * list or string * @param size the size of that array, list or string * @throws IndexOutOfBoundsException if either index is negative or is * greater than {@code size}, or if {@code end} is less than {@code start} * @throws IllegalArgumentException if {@code size} is negative */ public static void checkPositionIndexes(int start, int end, int size) { // Carefully optimized for execution by hotspot (explanatory comment above) if (start < 0 || end < start || end > size) { throw new IndexOutOfBoundsException(badPositionIndexes(start, end, size)); } } private static String badPositionIndexes(int start, int end, int size) { if (start < 0 || start > size) { return badPositionIndex(start, size, "start index"); } if (end < 0 || end > size) { return badPositionIndex(end, size, "end index"); } // end < start return format("end index (%s) must not be less than start index (%s)", end, start); } /** * Substitutes each {@code %s} in {@code template} with an argument. These * are matched by position - the first {@code %s} gets {@code args[0]}, etc. * If there are more arguments than placeholders, the unmatched arguments will * be appended to the end of the formatted message in square braces. * * @param template a non-null string containing 0 or more {@code %s} * placeholders. * @param args the arguments to be substituted into the message * template. Arguments are converted to strings using * {@link String#valueOf(Object)}. Arguments can be null. */ @VisibleForTesting static String format(String template, @Nullable Object... args) { template = String.valueOf(template); // null -> "null" // start substituting the arguments into the '%s' placeholders StringBuilder builder = new StringBuilder( template.length() + 16 * args.length); int templateStart = 0; int i = 0; while (i < args.length) { int placeholderStart = template.indexOf("%s", templateStart); if (placeholderStart == -1) { break; } builder.append(template.substring(templateStart, placeholderStart)); builder.append(args[i++]); templateStart = placeholderStart + 2; } builder.append(template.substring(templateStart)); // if we run out of placeholders, append the extra args in square braces if (i < args.length) { builder.append(" ["); builder.append(args[i++]); while (i < args.length) { builder.append(", "); builder.append(args[i++]); } builder.append(']'); } return builder.toString(); } }
Java
/* * Copyright (C) 2007 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 static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtCompatible; import java.util.Arrays; import javax.annotation.Nullable; /** * Helper functions that can operate on any {@code Object}. * * <p>See the Guava User Guide on <a * href="http://code.google.com/p/guava-libraries/wiki/CommonObjectUtilitiesExplained">writing * {@code Object} methods with {@code Objects}</a>. * * @author Laurence Gonsalves * @since 2.0 (imported from Google Collections Library) */ @GwtCompatible public final class Objects { private Objects() {} /** * Determines whether two possibly-null objects are equal. Returns: * * <ul> * <li>{@code true} if {@code a} and {@code b} are both null. * <li>{@code true} if {@code a} and {@code b} are both non-null and they are * equal according to {@link Object#equals(Object)}. * <li>{@code false} in all other situations. * </ul> * * <p>This assumes that any non-null objects passed to this function conform * to the {@code equals()} contract. */ public static boolean equal(@Nullable Object a, @Nullable Object b) { return a == b || (a != null && a.equals(b)); } /** * Generates a hash code for multiple values. The hash code is generated by * calling {@link Arrays#hashCode(Object[])}. Note that array arguments to * this method, with the exception of a single Object array, do not get any * special handling; their hash codes are based on identity and not contents. * * <p>This is useful for implementing {@link Object#hashCode()}. For example, * in an object that has three properties, {@code x}, {@code y}, and * {@code z}, one could write: * <pre> {@code * public int hashCode() { * return Objects.hashCode(getX(), getY(), getZ()); * }}</pre> * * <p><b>Warning</b>: When a single object is supplied, the returned hash code * does not equal the hash code of that object. */ public static int hashCode(@Nullable Object... objects) { return Arrays.hashCode(objects); } /** * Creates an instance of {@link ToStringHelper}. * * <p>This is helpful for implementing {@link Object#toString()}. * Specification by example: <pre> {@code * // Returns "ClassName{}" * Objects.toStringHelper(this) * .toString(); * * // Returns "ClassName{x=1}" * Objects.toStringHelper(this) * .add("x", 1) * .toString(); * * // Returns "MyObject{x=1}" * Objects.toStringHelper("MyObject") * .add("x", 1) * .toString(); * * // Returns "ClassName{x=1, y=foo}" * Objects.toStringHelper(this) * .add("x", 1) * .add("y", "foo") * .toString(); * * // Returns "ClassName{x=1}" * Objects.toStringHelper(this) * .omitNullValues() * .add("x", 1) * .add("y", null) * .toString(); * }}</pre> * * <p>Note that in GWT, class names are often obfuscated. * * @param self the object to generate the string for (typically {@code this}), * used only for its class name * @since 2.0 */ public static ToStringHelper toStringHelper(Object self) { return new ToStringHelper(simpleName(self.getClass())); } /** * Creates an instance of {@link ToStringHelper} in the same manner as * {@link Objects#toStringHelper(Object)}, but using the name of {@code clazz} * instead of using an instance's {@link Object#getClass()}. * * <p>Note that in GWT, class names are often obfuscated. * * @param clazz the {@link Class} of the instance * @since 7.0 (source-compatible since 2.0) */ public static ToStringHelper toStringHelper(Class<?> clazz) { return new ToStringHelper(simpleName(clazz)); } /** * Creates an instance of {@link ToStringHelper} in the same manner as * {@link Objects#toStringHelper(Object)}, but using {@code className} instead * of using an instance's {@link Object#getClass()}. * * @param className the name of the instance type * @since 7.0 (source-compatible since 2.0) */ public static ToStringHelper toStringHelper(String className) { return new ToStringHelper(className); } /** * {@link Class#getSimpleName()} is not GWT compatible yet, so we * provide our own implementation. */ private static String simpleName(Class<?> clazz) { String name = clazz.getName(); // the nth anonymous class has a class name ending in "Outer$n" // and local inner classes have names ending in "Outer.$1Inner" name = name.replaceAll("\\$[0-9]+", "\\$"); // we want the name of the inner class all by its lonesome int start = name.lastIndexOf('$'); // if this isn't an inner class, just find the start of the // top level class name. if (start == -1) { start = name.lastIndexOf('.'); } return name.substring(start + 1); } /** * Returns the first of two given parameters that is not {@code null}, if * either is, or otherwise throws a {@link NullPointerException}. * * <p><b>Note:</b> if {@code first} is represented as an {@code Optional<T>}, * this can be accomplished with {@code first.or(second)}. That approach also * allows for lazy evaluation of the fallback instance, using * {@code first.or(Supplier)}. * * @return {@code first} if {@code first} is not {@code null}, or * {@code second} if {@code first} is {@code null} and {@code second} is * not {@code null} * @throws NullPointerException if both {@code first} and {@code second} were * {@code null} * @since 3.0 */ public static <T> T firstNonNull(@Nullable T first, @Nullable T second) { return first != null ? first : checkNotNull(second); } /** * Support class for {@link Objects#toStringHelper}. * * @author Jason Lee * @since 2.0 */ public static final class ToStringHelper { private final String className; private ValueHolder holderHead = new ValueHolder(); private ValueHolder holderTail = holderHead; private boolean omitNullValues = false; /** * Use {@link Objects#toStringHelper(Object)} to create an instance. */ private ToStringHelper(String className) { this.className = checkNotNull(className); } /** * Configures the {@link ToStringHelper} so {@link #toString()} will ignore * properties with null value. The order of calling this method, relative * to the {@code add()}/{@code addValue()} methods, is not significant. * * @since 12.0 */ public ToStringHelper omitNullValues() { omitNullValues = true; return this; } /** * Adds a name/value pair to the formatted output in {@code name=value} * format. If {@code value} is {@code null}, the string {@code "null"} * is used, unless {@link #omitNullValues()} is called, in which case this * name/value pair will not be added. */ public ToStringHelper add(String name, @Nullable Object value) { return addHolder(name, value); } /** * Adds a name/value pair to the formatted output in {@code name=value} * format. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper add(String name, boolean value) { return addHolder(name, String.valueOf(value)); } /** * Adds a name/value pair to the formatted output in {@code name=value} * format. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper add(String name, char value) { return addHolder(name, String.valueOf(value)); } /** * Adds a name/value pair to the formatted output in {@code name=value} * format. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper add(String name, double value) { return addHolder(name, String.valueOf(value)); } /** * Adds a name/value pair to the formatted output in {@code name=value} * format. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper add(String name, float value) { return addHolder(name, String.valueOf(value)); } /** * Adds a name/value pair to the formatted output in {@code name=value} * format. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper add(String name, int value) { return addHolder(name, String.valueOf(value)); } /** * Adds a name/value pair to the formatted output in {@code name=value} * format. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper add(String name, long value) { return addHolder(name, String.valueOf(value)); } /** * Adds an unnamed value to the formatted output. * * <p>It is strongly encouraged to use {@link #add(String, Object)} instead * and give value a readable name. */ public ToStringHelper addValue(@Nullable Object value) { return addHolder(value); } /** * Adds an unnamed value to the formatted output. * * <p>It is strongly encouraged to use {@link #add(String, boolean)} instead * and give value a readable name. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper addValue(boolean value) { return addHolder(String.valueOf(value)); } /** * Adds an unnamed value to the formatted output. * * <p>It is strongly encouraged to use {@link #add(String, char)} instead * and give value a readable name. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper addValue(char value) { return addHolder(String.valueOf(value)); } /** * Adds an unnamed value to the formatted output. * * <p>It is strongly encouraged to use {@link #add(String, double)} instead * and give value a readable name. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper addValue(double value) { return addHolder(String.valueOf(value)); } /** * Adds an unnamed value to the formatted output. * * <p>It is strongly encouraged to use {@link #add(String, float)} instead * and give value a readable name. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper addValue(float value) { return addHolder(String.valueOf(value)); } /** * Adds an unnamed value to the formatted output. * * <p>It is strongly encouraged to use {@link #add(String, int)} instead * and give value a readable name. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper addValue(int value) { return addHolder(String.valueOf(value)); } /** * Adds an unnamed value to the formatted output. * * <p>It is strongly encouraged to use {@link #add(String, long)} instead * and give value a readable name. * * @since 11.0 (source-compatible since 2.0) */ public ToStringHelper addValue(long value) { return addHolder(String.valueOf(value)); } /** * Returns a string in the format specified by {@link * Objects#toStringHelper(Object)}. * * <p>After calling this method, you can keep adding more properties to later * call toString() again and get a more complete representation of the * same object; but properties cannot be removed, so this only allows * limited reuse of the helper instance. The helper allows duplication of * properties (multiple name/value pairs with the same name can be added). */ @Override public String toString() { // create a copy to keep it consistent in case value changes boolean omitNullValuesSnapshot = omitNullValues; String nextSeparator = ""; StringBuilder builder = new StringBuilder(32).append(className) .append('{'); for (ValueHolder valueHolder = holderHead.next; valueHolder != null; valueHolder = valueHolder.next) { if (!omitNullValuesSnapshot || valueHolder.value != null) { builder.append(nextSeparator); nextSeparator = ", "; if (valueHolder.name != null) { builder.append(valueHolder.name).append('='); } builder.append(valueHolder.value); } } return builder.append('}').toString(); } private ValueHolder addHolder() { ValueHolder valueHolder = new ValueHolder(); holderTail = holderTail.next = valueHolder; return valueHolder; } private ToStringHelper addHolder(@Nullable Object value) { ValueHolder valueHolder = addHolder(); valueHolder.value = value; return this; } private ToStringHelper addHolder(String name, @Nullable Object value) { ValueHolder valueHolder = addHolder(); valueHolder.value = value; valueHolder.name = checkNotNull(name); return this; } private static final class ValueHolder { String name; Object value; ValueHolder next; } } }
Java
/* * Copyright (C) 2007 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 com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import java.nio.charset.Charset; /** * Contains constant definitions for the six standard {@link Charset} instances, which are * guaranteed to be supported by all Java platform implementations. * * <p>Assuming you're free to choose, note that <b>{@link #UTF_8} is widely preferred</b>. * * <p>See the Guava User Guide article on <a * href="http://code.google.com/p/guava-libraries/wiki/StringsExplained#Charsets"> * {@code Charsets}</a>. * * @author Mike Bostock * @since 1.0 */ @GwtCompatible(emulated = true) public final class Charsets { private Charsets() {} /** * US-ASCII: seven-bit ASCII, the Basic Latin block of the Unicode character set (ISO646-US). */ @GwtIncompatible("Non-UTF-8 Charset") public static final Charset US_ASCII = Charset.forName("US-ASCII"); /** * ISO-8859-1: ISO Latin Alphabet Number 1 (ISO-LATIN-1). */ @GwtIncompatible("Non-UTF-8 Charset") public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1"); /** * UTF-8: eight-bit UCS Transformation Format. */ public static final Charset UTF_8 = Charset.forName("UTF-8"); /** * UTF-16BE: sixteen-bit UCS Transformation Format, big-endian byte order. */ @GwtIncompatible("Non-UTF-8 Charset") public static final Charset UTF_16BE = Charset.forName("UTF-16BE"); /** * UTF-16LE: sixteen-bit UCS Transformation Format, little-endian byte order. */ @GwtIncompatible("Non-UTF-8 Charset") public static final Charset UTF_16LE = Charset.forName("UTF-16LE"); /** * UTF-16: sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order * mark. */ @GwtIncompatible("Non-UTF-8 Charset") public static final Charset UTF_16 = Charset.forName("UTF-16"); /* * Please do not add new Charset references to this class, unless those character encodings are * part of the set required to be supported by all Java platform implementations! Any Charsets * initialized here may cause unexpected delays when this class is loaded. See the Charset * Javadocs for the list of built-in character encodings. */ }
Java
/* * Copyright (C) 2011 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 static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import javax.annotation.Nullable; /** * Equivalence applied on functional result. * * @author Bob Lee * @since 10.0 */ @Beta @GwtCompatible final class FunctionalEquivalence<F, T> extends Equivalence<F> implements Serializable { private static final long serialVersionUID = 0; private final Function<F, ? extends T> function; private final Equivalence<T> resultEquivalence; FunctionalEquivalence( Function<F, ? extends T> function, Equivalence<T> resultEquivalence) { this.function = checkNotNull(function); this.resultEquivalence = checkNotNull(resultEquivalence); } @Override protected boolean doEquivalent(F a, F b) { return resultEquivalence.equivalent(function.apply(a), function.apply(b)); } @Override protected int doHash(F a) { return resultEquivalence.hash(function.apply(a)); } @Override public boolean equals(@Nullable Object obj) { if (obj == this) { return true; } if (obj instanceof FunctionalEquivalence) { FunctionalEquivalence<?, ?> that = (FunctionalEquivalence<?, ?>) obj; return function.equals(that.function) && resultEquivalence.equals(that.resultEquivalence); } return false; } @Override public int hashCode() { return Objects.hashCode(function, resultEquivalence); } @Override public String toString() { return resultEquivalence + ".onResultOf(" + function + ")"; } }
Java
/* * 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 static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import java.io.IOException; import java.util.AbstractList; import java.util.Arrays; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import javax.annotation.CheckReturnValue; import javax.annotation.Nullable; /** * An object which joins pieces of text (specified as an array, {@link Iterable}, varargs or even a * {@link Map}) with a separator. It either appends the results to an {@link Appendable} or returns * them as a {@link String}. Example: <pre> {@code * * Joiner joiner = Joiner.on("; ").skipNulls(); * . . . * return joiner.join("Harry", null, "Ron", "Hermione");}</pre> * * <p>This returns the string {@code "Harry; Ron; Hermione"}. Note that all input elements are * converted to strings using {@link Object#toString()} before being appended. * * <p>If neither {@link #skipNulls()} nor {@link #useForNull(String)} is specified, the joining * methods will throw {@link NullPointerException} if any given element is null. * * <p><b>Warning: joiner instances are always immutable</b>; a configuration method such as {@code * useForNull} has no effect on the instance it is invoked on! You must store and use the new joiner * instance returned by the method. This makes joiners thread-safe, and safe to store as {@code * static final} constants. <pre> {@code * * // Bad! Do not do this! * Joiner joiner = Joiner.on(','); * joiner.skipNulls(); // does nothing! * return joiner.join("wrong", null, "wrong");}</pre> * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/StringsExplained#Joiner">{@code Joiner}</a>. * * @author Kevin Bourrillion * @since 2.0 (imported from Google Collections Library) */ @GwtCompatible public class Joiner { /** * Returns a joiner which automatically places {@code separator} between consecutive elements. */ public static Joiner on(String separator) { return new Joiner(separator); } /** * Returns a joiner which automatically places {@code separator} between consecutive elements. */ public static Joiner on(char separator) { return new Joiner(String.valueOf(separator)); } private final String separator; private Joiner(String separator) { this.separator = checkNotNull(separator); } private Joiner(Joiner prototype) { this.separator = prototype.separator; } /** * Appends the string representation of each of {@code parts}, using the previously configured * separator between each, to {@code appendable}. */ public <A extends Appendable> A appendTo(A appendable, Iterable<?> parts) throws IOException { return appendTo(appendable, parts.iterator()); } /** * Appends the string representation of each of {@code parts}, using the previously configured * separator between each, to {@code appendable}. * * @since 11.0 */ public <A extends Appendable> A appendTo(A appendable, Iterator<?> parts) throws IOException { checkNotNull(appendable); if (parts.hasNext()) { appendable.append(toString(parts.next())); while (parts.hasNext()) { appendable.append(separator); appendable.append(toString(parts.next())); } } return appendable; } /** * Appends the string representation of each of {@code parts}, using the previously configured * separator between each, to {@code appendable}. */ public final <A extends Appendable> A appendTo(A appendable, Object[] parts) throws IOException { return appendTo(appendable, Arrays.asList(parts)); } /** * Appends to {@code appendable} the string representation of each of the remaining arguments. */ public final <A extends Appendable> A appendTo( A appendable, @Nullable Object first, @Nullable Object second, Object... rest) throws IOException { return appendTo(appendable, iterable(first, second, rest)); } /** * Appends the string representation of each of {@code parts}, using the previously configured * separator between each, to {@code builder}. Identical to {@link #appendTo(Appendable, * Iterable)}, except that it does not throw {@link IOException}. */ public final StringBuilder appendTo(StringBuilder builder, Iterable<?> parts) { return appendTo(builder, parts.iterator()); } /** * Appends the string representation of each of {@code parts}, using the previously configured * separator between each, to {@code builder}. Identical to {@link #appendTo(Appendable, * Iterable)}, except that it does not throw {@link IOException}. * * @since 11.0 */ public final StringBuilder appendTo(StringBuilder builder, Iterator<?> parts) { try { appendTo((Appendable) builder, parts); } catch (IOException impossible) { throw new AssertionError(impossible); } return builder; } /** * Appends the string representation of each of {@code parts}, using the previously configured * separator between each, to {@code builder}. Identical to {@link #appendTo(Appendable, * Iterable)}, except that it does not throw {@link IOException}. */ public final StringBuilder appendTo(StringBuilder builder, Object[] parts) { return appendTo(builder, Arrays.asList(parts)); } /** * Appends to {@code builder} the string representation of each of the remaining arguments. * Identical to {@link #appendTo(Appendable, Object, Object, Object...)}, except that it does not * throw {@link IOException}. */ public final StringBuilder appendTo( StringBuilder builder, @Nullable Object first, @Nullable Object second, Object... rest) { return appendTo(builder, iterable(first, second, rest)); } /** * Returns a string containing the string representation of each of {@code parts}, using the * previously configured separator between each. */ public final String join(Iterable<?> parts) { return join(parts.iterator()); } /** * Returns a string containing the string representation of each of {@code parts}, using the * previously configured separator between each. * * @since 11.0 */ public final String join(Iterator<?> parts) { return appendTo(new StringBuilder(), parts).toString(); } /** * Returns a string containing the string representation of each of {@code parts}, using the * previously configured separator between each. */ public final String join(Object[] parts) { return join(Arrays.asList(parts)); } /** * Returns a string containing the string representation of each argument, using the previously * configured separator between each. */ public final String join(@Nullable Object first, @Nullable Object second, Object... rest) { return join(iterable(first, second, rest)); } /** * Returns a joiner with the same behavior as this one, except automatically substituting {@code * nullText} for any provided null elements. */ @CheckReturnValue public Joiner useForNull(final String nullText) { checkNotNull(nullText); return new Joiner(this) { @Override CharSequence toString(@Nullable Object part) { return (part == null) ? nullText : Joiner.this.toString(part); } @Override public Joiner useForNull(String nullText) { checkNotNull(nullText); // weird: just to satisfy NullPointerTester. throw new UnsupportedOperationException("already specified useForNull"); } @Override public Joiner skipNulls() { throw new UnsupportedOperationException("already specified useForNull"); } }; } /** * Returns a joiner with the same behavior as this joiner, except automatically skipping over any * provided null elements. */ @CheckReturnValue public Joiner skipNulls() { return new Joiner(this) { @Override public <A extends Appendable> A appendTo(A appendable, Iterator<?> parts) throws IOException { checkNotNull(appendable, "appendable"); checkNotNull(parts, "parts"); while (parts.hasNext()) { Object part = parts.next(); if (part != null) { appendable.append(Joiner.this.toString(part)); break; } } while (parts.hasNext()) { Object part = parts.next(); if (part != null) { appendable.append(separator); appendable.append(Joiner.this.toString(part)); } } return appendable; } @Override public Joiner useForNull(String nullText) { checkNotNull(nullText); // weird: just to satisfy NullPointerTester. throw new UnsupportedOperationException("already specified skipNulls"); } @Override public MapJoiner withKeyValueSeparator(String kvs) { checkNotNull(kvs); // weird: just to satisfy NullPointerTester. throw new UnsupportedOperationException("can't use .skipNulls() with maps"); } }; } /** * Returns a {@code MapJoiner} using the given key-value separator, and the same configuration as * this {@code Joiner} otherwise. */ @CheckReturnValue public MapJoiner withKeyValueSeparator(String keyValueSeparator) { return new MapJoiner(this, keyValueSeparator); } /** * An object that joins map entries in the same manner as {@code Joiner} joins iterables and * arrays. Like {@code Joiner}, it is thread-safe and immutable. * * <p>In addition to operating on {@code Map} instances, {@code MapJoiner} can operate on {@code * Multimap} entries in two distinct modes: * * <ul> * <li>To output a separate entry for each key-value pair, pass {@code multimap.entries()} to a * {@code MapJoiner} method that accepts entries as input, and receive output of the form * {@code key1=A&key1=B&key2=C}. * <li>To output a single entry for each key, pass {@code multimap.asMap()} to a {@code MapJoiner} * method that accepts a map as input, and receive output of the form {@code * key1=[A, B]&key2=C}. * </ul> * * @since 2.0 (imported from Google Collections Library) */ public final static class MapJoiner { private final Joiner joiner; private final String keyValueSeparator; private MapJoiner(Joiner joiner, String keyValueSeparator) { this.joiner = joiner; // only "this" is ever passed, so don't checkNotNull this.keyValueSeparator = checkNotNull(keyValueSeparator); } /** * Appends the string representation of each entry of {@code map}, using the previously * configured separator and key-value separator, to {@code appendable}. */ public <A extends Appendable> A appendTo(A appendable, Map<?, ?> map) throws IOException { return appendTo(appendable, map.entrySet()); } /** * Appends the string representation of each entry of {@code map}, using the previously * configured separator and key-value separator, to {@code builder}. Identical to {@link * #appendTo(Appendable, Map)}, except that it does not throw {@link IOException}. */ public StringBuilder appendTo(StringBuilder builder, Map<?, ?> map) { return appendTo(builder, map.entrySet()); } /** * Returns a string containing the string representation of each entry of {@code map}, using the * previously configured separator and key-value separator. */ public String join(Map<?, ?> map) { return join(map.entrySet()); } /** * Appends the string representation of each entry in {@code entries}, using the previously * configured separator and key-value separator, to {@code appendable}. * * @since 10.0 */ @Beta public <A extends Appendable> A appendTo(A appendable, Iterable<? extends Entry<?, ?>> entries) throws IOException { return appendTo(appendable, entries.iterator()); } /** * Appends the string representation of each entry in {@code entries}, using the previously * configured separator and key-value separator, to {@code appendable}. * * @since 11.0 */ @Beta public <A extends Appendable> A appendTo(A appendable, Iterator<? extends Entry<?, ?>> parts) throws IOException { checkNotNull(appendable); if (parts.hasNext()) { Entry<?, ?> entry = parts.next(); appendable.append(joiner.toString(entry.getKey())); appendable.append(keyValueSeparator); appendable.append(joiner.toString(entry.getValue())); while (parts.hasNext()) { appendable.append(joiner.separator); Entry<?, ?> e = parts.next(); appendable.append(joiner.toString(e.getKey())); appendable.append(keyValueSeparator); appendable.append(joiner.toString(e.getValue())); } } return appendable; } /** * Appends the string representation of each entry in {@code entries}, using the previously * configured separator and key-value separator, to {@code builder}. Identical to {@link * #appendTo(Appendable, Iterable)}, except that it does not throw {@link IOException}. * * @since 10.0 */ @Beta public StringBuilder appendTo(StringBuilder builder, Iterable<? extends Entry<?, ?>> entries) { return appendTo(builder, entries.iterator()); } /** * Appends the string representation of each entry in {@code entries}, using the previously * configured separator and key-value separator, to {@code builder}. Identical to {@link * #appendTo(Appendable, Iterable)}, except that it does not throw {@link IOException}. * * @since 11.0 */ @Beta public StringBuilder appendTo(StringBuilder builder, Iterator<? extends Entry<?, ?>> entries) { try { appendTo((Appendable) builder, entries); } catch (IOException impossible) { throw new AssertionError(impossible); } return builder; } /** * Returns a string containing the string representation of each entry in {@code entries}, using * the previously configured separator and key-value separator. * * @since 10.0 */ @Beta public String join(Iterable<? extends Entry<?, ?>> entries) { return join(entries.iterator()); } /** * Returns a string containing the string representation of each entry in {@code entries}, using * the previously configured separator and key-value separator. * * @since 11.0 */ @Beta public String join(Iterator<? extends Entry<?, ?>> entries) { return appendTo(new StringBuilder(), entries).toString(); } /** * Returns a map joiner with the same behavior as this one, except automatically substituting * {@code nullText} for any provided null keys or values. */ @CheckReturnValue public MapJoiner useForNull(String nullText) { return new MapJoiner(joiner.useForNull(nullText), keyValueSeparator); } } CharSequence toString(Object part) { checkNotNull(part); // checkNotNull for GWT (do not optimize). return (part instanceof CharSequence) ? (CharSequence) part : part.toString(); } private static Iterable<Object> iterable( final Object first, final Object second, final Object[] rest) { checkNotNull(rest); return new AbstractList<Object>() { @Override public int size() { return rest.length + 2; } @Override public Object get(int index) { switch (index) { case 0: return first; case 1: return second; default: return rest[index - 2]; } } }; } }
Java
/* * Copyright (C) 2011 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 com.google.common.annotations.GwtCompatible; import java.io.Serializable; import java.util.Iterator; import javax.annotation.Nullable; @GwtCompatible(serializable = true) final class PairwiseEquivalence<T> extends Equivalence<Iterable<T>> implements Serializable { final Equivalence<? super T> elementEquivalence; PairwiseEquivalence(Equivalence<? super T> elementEquivalence) { this.elementEquivalence = Preconditions.checkNotNull(elementEquivalence); } @Override protected boolean doEquivalent(Iterable<T> iterableA, Iterable<T> iterableB) { Iterator<T> iteratorA = iterableA.iterator(); Iterator<T> iteratorB = iterableB.iterator(); while (iteratorA.hasNext() && iteratorB.hasNext()) { if (!elementEquivalence.equivalent(iteratorA.next(), iteratorB.next())) { return false; } } return !iteratorA.hasNext() && !iteratorB.hasNext(); } @Override protected int doHash(Iterable<T> iterable) { int hash = 78721; for (T element : iterable) { hash = hash * 24943 + elementEquivalence.hash(element); } return hash; } @Override public boolean equals(@Nullable Object object) { if (object instanceof PairwiseEquivalence) { PairwiseEquivalence<?> that = (PairwiseEquivalence<?>) object; return this.elementEquivalence.equals(that.elementEquivalence); } return false; } @Override public int hashCode() { return elementEquivalence.hashCode() ^ 0x46a3eb07; } @Override public String toString() { return elementEquivalence + ".pairwise()"; } private static final long serialVersionUID = 1; }
Java
/* * Copyright (C) 2007 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 static com.google.common.base.Preconditions.checkState; import com.google.common.annotations.GwtCompatible; import java.util.Iterator; import java.util.NoSuchElementException; /** * Note this class is a copy of * {@link com.google.common.collect.AbstractIterator} (for dependency reasons). */ @GwtCompatible abstract class AbstractIterator<T> implements Iterator<T> { private State state = State.NOT_READY; protected AbstractIterator() {} private enum State { READY, NOT_READY, DONE, FAILED, } private T next; protected abstract T computeNext(); protected final T endOfData() { state = State.DONE; return null; } @Override public final boolean hasNext() { checkState(state != State.FAILED); switch (state) { case DONE: return false; case READY: return true; default: } return tryToComputeNext(); } private boolean tryToComputeNext() { state = State.FAILED; // temporary pessimism next = computeNext(); if (state != State.DONE) { state = State.READY; return true; } return false; } @Override public final T next() { if (!hasNext()) { throw new NoSuchElementException(); } state = State.NOT_READY; return next; } @Override public final void remove() { throw new UnsupportedOperationException(); } }
Java
/* * Copyright (C) 2007 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 com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.VisibleForTesting; import java.io.Serializable; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; /** * Useful suppliers. * * <p>All methods return serializable suppliers as long as they're given * serializable parameters. * * @author Laurence Gonsalves * @author Harry Heymann * @since 2.0 (imported from Google Collections Library) */ @GwtCompatible public final class Suppliers { private Suppliers() {} /** * Returns a new supplier which is the composition of the provided function * and supplier. In other words, the new supplier's value will be computed by * retrieving the value from {@code supplier}, and then applying * {@code function} to that value. Note that the resulting supplier will not * call {@code supplier} or invoke {@code function} until it is called. */ public static <F, T> Supplier<T> compose( Function<? super F, T> function, Supplier<F> supplier) { Preconditions.checkNotNull(function); Preconditions.checkNotNull(supplier); return new SupplierComposition<F, T>(function, supplier); } private static class SupplierComposition<F, T> implements Supplier<T>, Serializable { final Function<? super F, T> function; final Supplier<F> supplier; SupplierComposition(Function<? super F, T> function, Supplier<F> supplier) { this.function = function; this.supplier = supplier; } @Override public T get() { return function.apply(supplier.get()); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof SupplierComposition) { SupplierComposition<?, ?> that = (SupplierComposition<?, ?>) obj; return function.equals(that.function) && supplier.equals(that.supplier); } return false; } @Override public int hashCode() { return Objects.hashCode(function, supplier); } @Override public String toString() { return "Suppliers.compose(" + function + ", " + supplier + ")"; } private static final long serialVersionUID = 0; } /** * Returns a supplier which caches the instance retrieved during the first * call to {@code get()} and returns that value on subsequent calls to * {@code get()}. See: * <a href="http://en.wikipedia.org/wiki/Memoization">memoization</a> * * <p>The returned supplier is thread-safe. The supplier's serialized form * does not contain the cached value, which will be recalculated when {@code * get()} is called on the reserialized instance. * * <p>If {@code delegate} is an instance created by an earlier call to {@code * memoize}, it is returned directly. */ public static <T> Supplier<T> memoize(Supplier<T> delegate) { return (delegate instanceof MemoizingSupplier) ? delegate : new MemoizingSupplier<T>(Preconditions.checkNotNull(delegate)); } @VisibleForTesting static class MemoizingSupplier<T> implements Supplier<T>, Serializable { final Supplier<T> delegate; transient volatile boolean initialized; // "value" does not need to be volatile; visibility piggy-backs // on volatile read of "initialized". transient T value; MemoizingSupplier(Supplier<T> delegate) { this.delegate = delegate; } @Override public T get() { // A 2-field variant of Double Checked Locking. if (!initialized) { synchronized (this) { if (!initialized) { T t = delegate.get(); value = t; initialized = true; return t; } } } return value; } @Override public String toString() { return "Suppliers.memoize(" + delegate + ")"; } private static final long serialVersionUID = 0; } /** * Returns a supplier that caches the instance supplied by the delegate and * removes the cached value after the specified time has passed. Subsequent * calls to {@code get()} return the cached value if the expiration time has * not passed. After the expiration time, a new value is retrieved, cached, * and returned. See: * <a href="http://en.wikipedia.org/wiki/Memoization">memoization</a> * * <p>The returned supplier is thread-safe. The supplier's serialized form * does not contain the cached value, which will be recalculated when {@code * get()} is called on the reserialized instance. * * @param duration the length of time after a value is created that it * should stop being returned by subsequent {@code get()} calls * @param unit the unit that {@code duration} is expressed in * @throws IllegalArgumentException if {@code duration} is not positive * @since 2.0 */ public static <T> Supplier<T> memoizeWithExpiration( Supplier<T> delegate, long duration, TimeUnit unit) { return new ExpiringMemoizingSupplier<T>(delegate, duration, unit); } @VisibleForTesting static class ExpiringMemoizingSupplier<T> implements Supplier<T>, Serializable { final Supplier<T> delegate; final long durationNanos; transient volatile T value; // The special value 0 means "not yet initialized". transient volatile long expirationNanos; ExpiringMemoizingSupplier( Supplier<T> delegate, long duration, TimeUnit unit) { this.delegate = Preconditions.checkNotNull(delegate); this.durationNanos = unit.toNanos(duration); Preconditions.checkArgument(duration > 0); } @Override public T get() { // Another variant of Double Checked Locking. // // We use two volatile reads. We could reduce this to one by // putting our fields into a holder class, but (at least on x86) // the extra memory consumption and indirection are more // expensive than the extra volatile reads. long nanos = expirationNanos; long now = Platform.systemNanoTime(); if (nanos == 0 || now - nanos >= 0) { synchronized (this) { if (nanos == expirationNanos) { // recheck for lost race T t = delegate.get(); value = t; nanos = now + durationNanos; // In the very unlikely event that nanos is 0, set it to 1; // no one will notice 1 ns of tardiness. expirationNanos = (nanos == 0) ? 1 : nanos; return t; } } } return value; } @Override public String toString() { // This is a little strange if the unit the user provided was not NANOS, // but we don't want to store the unit just for toString return "Suppliers.memoizeWithExpiration(" + delegate + ", " + durationNanos + ", NANOS)"; } private static final long serialVersionUID = 0; } /** * Returns a supplier that always supplies {@code instance}. */ public static <T> Supplier<T> ofInstance(@Nullable T instance) { return new SupplierOfInstance<T>(instance); } private static class SupplierOfInstance<T> implements Supplier<T>, Serializable { final T instance; SupplierOfInstance(@Nullable T instance) { this.instance = instance; } @Override public T get() { return instance; } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof SupplierOfInstance) { SupplierOfInstance<?> that = (SupplierOfInstance<?>) obj; return Objects.equal(instance, that.instance); } return false; } @Override public int hashCode() { return Objects.hashCode(instance); } @Override public String toString() { return "Suppliers.ofInstance(" + instance + ")"; } private static final long serialVersionUID = 0; } /** * Returns a supplier whose {@code get()} method synchronizes on * {@code delegate} before calling it, making it thread-safe. */ public static <T> Supplier<T> synchronizedSupplier(Supplier<T> delegate) { return new ThreadSafeSupplier<T>(Preconditions.checkNotNull(delegate)); } private static class ThreadSafeSupplier<T> implements Supplier<T>, Serializable { final Supplier<T> delegate; ThreadSafeSupplier(Supplier<T> delegate) { this.delegate = delegate; } @Override public T get() { synchronized (delegate) { return delegate.get(); } } @Override public String toString() { return "Suppliers.synchronizedSupplier(" + delegate + ")"; } private static final long serialVersionUID = 0; } /** * Returns a function that accepts a supplier and returns the result of * invoking {@link Supplier#get} on that supplier. * * @since 8.0 */ @Beta //SupplierFunction works for any T. @SuppressWarnings({"unchecked", "rawtypes"}) public static <T> Function<Supplier<T>, T> supplierFunction() { return (Function) SupplierFunction.INSTANCE; } private enum SupplierFunction implements Function<Supplier<?>, Object> { INSTANCE; @Override public Object apply(Supplier<?> input) { return input.get(); } @Override public String toString() { return "Suppliers.supplierFunction()"; } } }
Java
/* * Copyright (C) 2011 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 static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtCompatible; import java.util.Collections; import java.util.Set; import javax.annotation.Nullable; /** * Implementation of an {@link Optional} containing a reference. */ @GwtCompatible final class Present<T> extends Optional<T> { private final T reference; Present(T reference) { this.reference = reference; } @Override public boolean isPresent() { return true; } @Override public T get() { return reference; } @Override public T or(T defaultValue) { checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)"); return reference; } @Override public Optional<T> or(Optional<? extends T> secondChoice) { checkNotNull(secondChoice); return this; } @Override public T or(Supplier<? extends T> supplier) { checkNotNull(supplier); return reference; } @Override public T orNull() { return reference; } @Override public Set<T> asSet() { return Collections.singleton(reference); } @Override public <V> Optional<V> transform(Function<? super T, V> function) { return new Present<V>(checkNotNull(function.apply(reference), "the Function passed to Optional.transform() must not return null.")); } @Override public boolean equals(@Nullable Object object) { if (object instanceof Present) { Present<?> other = (Present<?>) object; return reference.equals(other.reference); } return false; } @Override public int hashCode() { return 0x598df91c + reference.hashCode(); } @Override public String toString() { return "Optional.of(" + reference + ")"; } private static final long serialVersionUID = 0; }
Java
/* * Copyright (C) 2011 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 static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtCompatible; import java.util.Collections; import java.util.Set; import javax.annotation.Nullable; /** * Implementation of an {@link Optional} not containing a reference. */ @GwtCompatible final class Absent extends Optional<Object> { static final Absent INSTANCE = new Absent(); private Absent() {} @Override public boolean isPresent() { return false; } @Override public Object get() { throw new IllegalStateException("Optional.get() cannot be called on an absent value"); } @Override public Object or(Object defaultValue) { return checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)"); } @SuppressWarnings("unchecked") // safe covariant cast @Override public Optional<Object> or(Optional<?> secondChoice) { return (Optional) checkNotNull(secondChoice); } @Override public Object or(Supplier<?> supplier) { return checkNotNull(supplier.get(), "use Optional.orNull() instead of a Supplier that returns null"); } @Override @Nullable public Object orNull() { return null; } @Override public Set<Object> asSet() { return Collections.emptySet(); } @Override public <V> Optional<V> transform(Function<Object, V> function) { checkNotNull(function); return Optional.absent(); } @Override public boolean equals(@Nullable Object object) { return object == this; } @Override public int hashCode() { return 0x598df91c; } @Override public String toString() { return "Optional.absent()"; } private Object readResolve() { return INSTANCE; } private static final long serialVersionUID = 0; }
Java
/* * 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.internal; import java.lang.ref.PhantomReference; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.logging.Level; import java.util.logging.Logger; /** * Thread that finalizes referents. All references should implement * {@code com.google.common.base.FinalizableReference}. * * <p>While this class is public, we consider it to be *internal* and not part * of our published API. It is public so we can access it reflectively across * class loaders in secure environments. * * <p>This class can't depend on other Google Collections code. If we were * to load this class in the same class loader as the rest of * Google Collections, this thread would keep an indirect strong reference * to the class loader and prevent it from being garbage collected. This * poses a problem for environments where you want to throw away the class * loader. For example, dynamically reloading a web application or unloading * an OSGi bundle. * * <p>{@code com.google.common.base.FinalizableReferenceQueue} loads this class * in its own class loader. That way, this class doesn't prevent the main * class loader from getting garbage collected, and this class can detect when * the main class loader has been garbage collected and stop itself. */ public class Finalizer implements Runnable { private static final Logger logger = Logger.getLogger(Finalizer.class.getName()); /** Name of FinalizableReference.class. */ private static final String FINALIZABLE_REFERENCE = "com.google.common.base.FinalizableReference"; /** * Starts the Finalizer thread. FinalizableReferenceQueue calls this method * reflectively. * * @param finalizableReferenceClass FinalizableReference.class. * @param queue a reference queue that the thread will poll. * @param frqReference a phantom reference to the FinalizableReferenceQueue, which will be * queued either when the FinalizableReferenceQueue is no longer referenced anywhere, or when * its close() method is called. */ public static void startFinalizer( Class<?> finalizableReferenceClass, ReferenceQueue<Object> queue, PhantomReference<Object> frqReference) { /* * We use FinalizableReference.class for two things: * * 1) To invoke FinalizableReference.finalizeReferent() * * 2) To detect when FinalizableReference's class loader has to be garbage * collected, at which point, Finalizer can stop running */ if (!finalizableReferenceClass.getName().equals(FINALIZABLE_REFERENCE)) { throw new IllegalArgumentException( "Expected " + FINALIZABLE_REFERENCE + "."); } Finalizer finalizer = new Finalizer(finalizableReferenceClass, queue, frqReference); Thread thread = new Thread(finalizer); thread.setName(Finalizer.class.getName()); thread.setDaemon(true); try { if (inheritableThreadLocals != null) { inheritableThreadLocals.set(thread, null); } } catch (Throwable t) { logger.log(Level.INFO, "Failed to clear thread local values inherited" + " by reference finalizer thread.", t); } thread.start(); } private final WeakReference<Class<?>> finalizableReferenceClassReference; private final PhantomReference<Object> frqReference; private final ReferenceQueue<Object> queue; private static final Field inheritableThreadLocals = getInheritableThreadLocalsField(); /** Constructs a new finalizer thread. */ private Finalizer( Class<?> finalizableReferenceClass, ReferenceQueue<Object> queue, PhantomReference<Object> frqReference) { this.queue = queue; this.finalizableReferenceClassReference = new WeakReference<Class<?>>(finalizableReferenceClass); // Keep track of the FRQ that started us so we know when to stop. this.frqReference = frqReference; } /** * Loops continuously, pulling references off the queue and cleaning them up. */ @SuppressWarnings("InfiniteLoopStatement") @Override public void run() { try { while (true) { try { cleanUp(queue.remove()); } catch (InterruptedException e) { /* ignore */ } } } catch (ShutDown shutDown) { /* ignore */ } } /** * Cleans up a single reference. Catches and logs all throwables. */ private void cleanUp(Reference<?> reference) throws ShutDown { Method finalizeReferentMethod = getFinalizeReferentMethod(); do { /* * This is for the benefit of phantom references. Weak and soft * references will have already been cleared by this point. */ reference.clear(); if (reference == frqReference) { /* * The client no longer has a reference to the * FinalizableReferenceQueue. We can stop. */ throw new ShutDown(); } try { finalizeReferentMethod.invoke(reference); } catch (Throwable t) { logger.log(Level.SEVERE, "Error cleaning up after reference.", t); } /* * Loop as long as we have references available so as not to waste * CPU looking up the Method over and over again. */ } while ((reference = queue.poll()) != null); } /** * Looks up FinalizableReference.finalizeReferent() method. */ private Method getFinalizeReferentMethod() throws ShutDown { Class<?> finalizableReferenceClass = finalizableReferenceClassReference.get(); if (finalizableReferenceClass == null) { /* * FinalizableReference's class loader was reclaimed. While there's a * chance that other finalizable references could be enqueued * subsequently (at which point the class loader would be resurrected * by virtue of us having a strong reference to it), we should pretty * much just shut down and make sure we don't keep it alive any longer * than necessary. */ throw new ShutDown(); } try { return finalizableReferenceClass.getMethod("finalizeReferent"); } catch (NoSuchMethodException e) { throw new AssertionError(e); } } public static Field getInheritableThreadLocalsField() { try { Field inheritableThreadLocals = Thread.class.getDeclaredField("inheritableThreadLocals"); inheritableThreadLocals.setAccessible(true); return inheritableThreadLocals; } catch (Throwable t) { logger.log(Level.INFO, "Couldn't access Thread.inheritableThreadLocals." + " Reference finalizer threads will inherit thread local" + " values."); return null; } } /** Indicates that it's time to shut down the Finalizer. */ @SuppressWarnings("serial") // Never serialized or thrown out of this class. private static class ShutDown extends Exception {} }
Java
/* * Copyright (C) 2007 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 com.google.common.annotations.VisibleForTesting; import java.io.Closeable; import java.io.FileNotFoundException; import java.io.IOException; import java.lang.ref.PhantomReference; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; import java.lang.reflect.Method; import java.net.URL; import java.net.URLClassLoader; import java.util.logging.Level; import java.util.logging.Logger; /** * A reference queue with an associated background thread that dequeues references and invokes * {@link FinalizableReference#finalizeReferent()} on them. * * <p>Keep a strong reference to this object until all of the associated referents have been * finalized. If this object is garbage collected earlier, the backing thread will not invoke {@code * finalizeReferent()} on the remaining references. * * @author Bob Lee * @since 2.0 (imported from Google Collections Library) */ public class FinalizableReferenceQueue implements Closeable { /* * The Finalizer thread keeps a phantom reference to this object. When the client (for example, a * map built by MapMaker) no longer has a strong reference to this object, the garbage collector * will reclaim it and enqueue the phantom reference. The enqueued reference will trigger the * Finalizer to stop. * * If this library is loaded in the system class loader, FinalizableReferenceQueue can load * Finalizer directly with no problems. * * If this library is loaded in an application class loader, it's important that Finalizer not * have a strong reference back to the class loader. Otherwise, you could have a graph like this: * * Finalizer Thread runs instance of -> Finalizer.class loaded by -> Application class loader * which loaded -> ReferenceMap.class which has a static -> FinalizableReferenceQueue instance * * Even if no other references to classes from the application class loader remain, the Finalizer * thread keeps an indirect strong reference to the queue in ReferenceMap, which keeps the * Finalizer running, and as a result, the application class loader can never be reclaimed. * * This means that dynamically loaded web applications and OSGi bundles can't be unloaded. * * If the library is loaded in an application class loader, we try to break the cycle by loading * Finalizer in its own independent class loader: * * System class loader -> Application class loader -> ReferenceMap -> FinalizableReferenceQueue * -> etc. -> Decoupled class loader -> Finalizer * * Now, Finalizer no longer keeps an indirect strong reference to the static * FinalizableReferenceQueue field in ReferenceMap. The application class loader can be reclaimed * at which point the Finalizer thread will stop and its decoupled class loader can also be * reclaimed. * * If any of this fails along the way, we fall back to loading Finalizer directly in the * application class loader. */ private static final Logger logger = Logger.getLogger(FinalizableReferenceQueue.class.getName()); private static final String FINALIZER_CLASS_NAME = "com.google.common.base.internal.Finalizer"; /** Reference to Finalizer.startFinalizer(). */ private static final Method startFinalizer; static { Class<?> finalizer = loadFinalizer( new SystemLoader(), new DecoupledLoader(), new DirectLoader()); startFinalizer = getStartFinalizer(finalizer); } /** * The actual reference queue that our background thread will poll. */ final ReferenceQueue<Object> queue; final PhantomReference<Object> frqRef; /** * Whether or not the background thread started successfully. */ final boolean threadStarted; /** * Constructs a new queue. */ @SuppressWarnings("unchecked") public FinalizableReferenceQueue() { // We could start the finalizer lazily, but I'd rather it blow up early. queue = new ReferenceQueue<Object>(); frqRef = new PhantomReference<Object>(this, queue); boolean threadStarted = false; try { startFinalizer.invoke(null, FinalizableReference.class, queue, frqRef); threadStarted = true; } catch (IllegalAccessException impossible) { throw new AssertionError(impossible); // startFinalizer() is public } catch (Throwable t) { logger.log(Level.INFO, "Failed to start reference finalizer thread." + " Reference cleanup will only occur when new references are created.", t); } this.threadStarted = threadStarted; } @Override public void close() { frqRef.enqueue(); cleanUp(); } /** * Repeatedly dequeues references from the queue and invokes {@link * FinalizableReference#finalizeReferent()} on them until the queue is empty. This method is a * no-op if the background thread was created successfully. */ void cleanUp() { if (threadStarted) { return; } Reference<?> reference; while ((reference = queue.poll()) != null) { /* * This is for the benefit of phantom references. Weak and soft references will have already * been cleared by this point. */ reference.clear(); try { ((FinalizableReference) reference).finalizeReferent(); } catch (Throwable t) { logger.log(Level.SEVERE, "Error cleaning up after reference.", t); } } } /** * Iterates through the given loaders until it finds one that can load Finalizer. * * @return Finalizer.class */ private static Class<?> loadFinalizer(FinalizerLoader... loaders) { for (FinalizerLoader loader : loaders) { Class<?> finalizer = loader.loadFinalizer(); if (finalizer != null) { return finalizer; } } throw new AssertionError(); } /** * Loads Finalizer.class. */ interface FinalizerLoader { /** * Returns Finalizer.class or null if this loader shouldn't or can't load it. * * @throws SecurityException if we don't have the appropriate privileges */ Class<?> loadFinalizer(); } /** * Tries to load Finalizer from the system class loader. If Finalizer is in the system class path, * we needn't create a separate loader. */ static class SystemLoader implements FinalizerLoader { // This is used by the ClassLoader-leak test in FinalizableReferenceQueueTest to disable // finding Finalizer on the system class path even if it is there. @VisibleForTesting static boolean disabled; @Override public Class<?> loadFinalizer() { if (disabled) { return null; } ClassLoader systemLoader; try { systemLoader = ClassLoader.getSystemClassLoader(); } catch (SecurityException e) { logger.info("Not allowed to access system class loader."); return null; } if (systemLoader != null) { try { return systemLoader.loadClass(FINALIZER_CLASS_NAME); } catch (ClassNotFoundException e) { // Ignore. Finalizer is simply in a child class loader. return null; } } else { return null; } } } /** * Try to load Finalizer in its own class loader. If Finalizer's thread had a direct reference to * our class loader (which could be that of a dynamically loaded web application or OSGi bundle), * it would prevent our class loader from getting garbage collected. */ static class DecoupledLoader implements FinalizerLoader { private static final String LOADING_ERROR = "Could not load Finalizer in its own class loader." + "Loading Finalizer in the current class loader instead. As a result, you will not be able" + "to garbage collect this class loader. To support reclaiming this class loader, either" + "resolve the underlying issue, or move Google Collections to your system class path."; @Override public Class<?> loadFinalizer() { try { /* * We use URLClassLoader because it's the only concrete class loader implementation in the * JDK. If we used our own ClassLoader subclass, Finalizer would indirectly reference this * class loader: * * Finalizer.class -> CustomClassLoader -> CustomClassLoader.class -> This class loader * * System class loader will (and must) be the parent. */ ClassLoader finalizerLoader = newLoader(getBaseUrl()); return finalizerLoader.loadClass(FINALIZER_CLASS_NAME); } catch (Exception e) { logger.log(Level.WARNING, LOADING_ERROR, e); return null; } } /** * Gets URL for base of path containing Finalizer.class. */ URL getBaseUrl() throws IOException { // Find URL pointing to Finalizer.class file. String finalizerPath = FINALIZER_CLASS_NAME.replace('.', '/') + ".class"; URL finalizerUrl = getClass().getClassLoader().getResource(finalizerPath); if (finalizerUrl == null) { throw new FileNotFoundException(finalizerPath); } // Find URL pointing to base of class path. String urlString = finalizerUrl.toString(); if (!urlString.endsWith(finalizerPath)) { throw new IOException("Unsupported path style: " + urlString); } urlString = urlString.substring(0, urlString.length() - finalizerPath.length()); return new URL(finalizerUrl, urlString); } /** Creates a class loader with the given base URL as its classpath. */ URLClassLoader newLoader(URL base) { // We use the bootstrap class loader as the parent because Finalizer by design uses // only standard Java classes. That also means that FinalizableReferenceQueueTest // doesn't pick up the wrong version of the Finalizer class. return new URLClassLoader(new URL[] {base}, null); } } /** * Loads Finalizer directly using the current class loader. We won't be able to garbage collect * this class loader, but at least the world doesn't end. */ static class DirectLoader implements FinalizerLoader { @Override public Class<?> loadFinalizer() { try { return Class.forName(FINALIZER_CLASS_NAME); } catch (ClassNotFoundException e) { throw new AssertionError(e); } } } /** * Looks up Finalizer.startFinalizer(). */ static Method getStartFinalizer(Class<?> finalizer) { try { return finalizer.getMethod( "startFinalizer", Class.class, ReferenceQueue.class, PhantomReference.class); } catch (NoSuchMethodException e) { throw new AssertionError(e); } } }
Java
/* * Copyright (C) 2011 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 com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; /** * A time source; returns a time value representing the number of nanoseconds elapsed since some * fixed but arbitrary point in time. Note that most users should use {@link Stopwatch} instead of * interacting with this class directly. * * <p><b>Warning:</b> this interface can only be used to measure elapsed time, not wall time. * * @author Kevin Bourrillion * @since 10.0 * (<a href="http://code.google.com/p/guava-libraries/wiki/Compatibility" * >mostly source-compatible</a> since 9.0) */ @Beta @GwtCompatible public abstract class Ticker { /** * Constructor for use by subclasses. */ protected Ticker() {} /** * Returns the number of nanoseconds elapsed since this ticker's fixed * point of reference. */ public abstract long read(); /** * A ticker that reads the current time using {@link System#nanoTime}. * * @since 10.0 */ public static Ticker systemTicker() { return SYSTEM_TICKER; } private static final Ticker SYSTEM_TICKER = new Ticker() { @Override public long read() { return Platform.systemNanoTime(); } }; }
Java
/* * Copyright (C) 2012 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 com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; /** * Represents a {@linkplain System#getProperties() standard system property}. * * @author Kurt Alfred Kluever * @since 15.0 */ @Beta @GwtIncompatible("java.lang.System#getProperty") public enum StandardSystemProperty { /** Java Runtime Environment version. */ JAVA_VERSION("java.version"), /** Java Runtime Environment vendor. */ JAVA_VENDOR("java.vendor"), /** Java vendor URL. */ JAVA_VENDOR_URL("java.vendor.url"), /** Java installation directory. */ JAVA_HOME("java.home"), /** Java Virtual Machine specification version. */ JAVA_VM_SPECIFICATION_VERSION("java.vm.specification.version"), /** Java Virtual Machine specification vendor. */ JAVA_VM_SPECIFICATION_VENDOR("java.vm.specification.vendor"), /** Java Virtual Machine specification name. */ JAVA_VM_SPECIFICATION_NAME("java.vm.specification.name"), /** Java Virtual Machine implementation version. */ JAVA_VM_VERSION("java.vm.version"), /** Java Virtual Machine implementation vendor. */ JAVA_VM_VENDOR("java.vm.vendor"), /** Java Virtual Machine implementation name. */ JAVA_VM_NAME("java.vm.name"), /** Java Runtime Environment specification version. */ JAVA_SPECIFICATION_VERSION("java.specification.version"), /** Java Runtime Environment specification vendor. */ JAVA_SPECIFICATION_VENDOR("java.specification.vendor"), /** Java Runtime Environment specification name. */ JAVA_SPECIFICATION_NAME("java.specification.name"), /** Java class format version number. */ JAVA_CLASS_VERSION("java.class.version"), /** Java class path. */ JAVA_CLASS_PATH("java.class.path"), /** List of paths to search when loading libraries. */ JAVA_LIBRARY_PATH("java.library.path"), /** Default temp file path. */ JAVA_IO_TMPDIR("java.io.tmpdir"), /** Name of JIT compiler to use. */ JAVA_COMPILER("java.compiler"), /** Path of extension directory or directories. */ JAVA_EXT_DIRS("java.ext.dirs"), /** Operating system name. */ OS_NAME("os.name"), /** Operating system architecture. */ OS_ARCH("os.arch"), /** Operating system version. */ OS_VERSION("os.version"), /** File separator ("/" on UNIX). */ FILE_SEPARATOR("file.separator"), /** Path separator (":" on UNIX). */ PATH_SEPARATOR("path.separator"), /** Line separator ("\n" on UNIX). */ LINE_SEPARATOR("line.separator"), /** User's account name. */ USER_NAME("user.name"), /** User's home directory. */ USER_HOME("user.home"), /** User's current working directory. */ USER_DIR("user.dir"); private final String key; private StandardSystemProperty(String key) { this.key = key; } /** * Returns the key used to lookup this system property. */ public String key() { return key; } /** * Returns the current value for this system property by delegating to * {@link System#getProperty(String)}. */ public String value() { return System.getProperty(key); } /** * Returns a string representation of this system property. */ @Override public String toString() { return key() + "=" + value(); } }
Java
/* * Copyright (C) 2007 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 static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import java.io.PrintWriter; import java.io.StringWriter; import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.annotation.Nullable; /** * Static utility methods pertaining to instances of {@link Throwable}. * * <p>See the Guava User Guide entry on <a href= * "http://code.google.com/p/guava-libraries/wiki/ThrowablesExplained"> * Throwables</a>. * * @author Kevin Bourrillion * @author Ben Yu * @since 1.0 */ public final class Throwables { private Throwables() {} /** * Propagates {@code throwable} exactly as-is, if and only if it is an * instance of {@code declaredType}. Example usage: * <pre> * try { * someMethodThatCouldThrowAnything(); * } catch (IKnowWhatToDoWithThisException e) { * handle(e); * } catch (Throwable t) { * Throwables.propagateIfInstanceOf(t, IOException.class); * Throwables.propagateIfInstanceOf(t, SQLException.class); * throw Throwables.propagate(t); * } * </pre> */ public static <X extends Throwable> void propagateIfInstanceOf( @Nullable Throwable throwable, Class<X> declaredType) throws X { // Check for null is needed to avoid frequent JNI calls to isInstance(). if (throwable != null && declaredType.isInstance(throwable)) { throw declaredType.cast(throwable); } } /** * Propagates {@code throwable} exactly as-is, if and only if it is an * instance of {@link RuntimeException} or {@link Error}. Example usage: * <pre> * try { * someMethodThatCouldThrowAnything(); * } catch (IKnowWhatToDoWithThisException e) { * handle(e); * } catch (Throwable t) { * Throwables.propagateIfPossible(t); * throw new RuntimeException("unexpected", t); * } * </pre> */ public static void propagateIfPossible(@Nullable Throwable throwable) { propagateIfInstanceOf(throwable, Error.class); propagateIfInstanceOf(throwable, RuntimeException.class); } /** * Propagates {@code throwable} exactly as-is, if and only if it is an * instance of {@link RuntimeException}, {@link Error}, or * {@code declaredType}. Example usage: * <pre> * try { * someMethodThatCouldThrowAnything(); * } catch (IKnowWhatToDoWithThisException e) { * handle(e); * } catch (Throwable t) { * Throwables.propagateIfPossible(t, OtherException.class); * throw new RuntimeException("unexpected", t); * } * </pre> * * @param throwable the Throwable to possibly propagate * @param declaredType the single checked exception type declared by the * calling method */ public static <X extends Throwable> void propagateIfPossible( @Nullable Throwable throwable, Class<X> declaredType) throws X { propagateIfInstanceOf(throwable, declaredType); propagateIfPossible(throwable); } /** * Propagates {@code throwable} exactly as-is, if and only if it is an * instance of {@link RuntimeException}, {@link Error}, {@code declaredType1}, * or {@code declaredType2}. In the unlikely case that you have three or more * declared checked exception types, you can handle them all by invoking these * methods repeatedly. See usage example in {@link * #propagateIfPossible(Throwable, Class)}. * * @param throwable the Throwable to possibly propagate * @param declaredType1 any checked exception type declared by the calling * method * @param declaredType2 any other checked exception type declared by the * calling method */ public static <X1 extends Throwable, X2 extends Throwable> void propagateIfPossible(@Nullable Throwable throwable, Class<X1> declaredType1, Class<X2> declaredType2) throws X1, X2 { checkNotNull(declaredType2); propagateIfInstanceOf(throwable, declaredType1); propagateIfPossible(throwable, declaredType2); } /** * Propagates {@code throwable} as-is if it is an instance of * {@link RuntimeException} or {@link Error}, or else as a last resort, wraps * it in a {@code RuntimeException} then propagates. * <p> * This method always throws an exception. The {@code RuntimeException} return * type is only for client code to make Java type system happy in case a * return value is required by the enclosing method. Example usage: * <pre> * T doSomething() { * try { * return someMethodThatCouldThrowAnything(); * } catch (IKnowWhatToDoWithThisException e) { * return handle(e); * } catch (Throwable t) { * throw Throwables.propagate(t); * } * } * </pre> * * @param throwable the Throwable to propagate * @return nothing will ever be returned; this return type is only for your * convenience, as illustrated in the example above */ public static RuntimeException propagate(Throwable throwable) { propagateIfPossible(checkNotNull(throwable)); throw new RuntimeException(throwable); } /** * Returns the innermost cause of {@code throwable}. The first throwable in a * chain provides context from when the error or exception was initially * detected. Example usage: * <pre> * assertEquals("Unable to assign a customer id", * Throwables.getRootCause(e).getMessage()); * </pre> */ public static Throwable getRootCause(Throwable throwable) { Throwable cause; while ((cause = throwable.getCause()) != null) { throwable = cause; } return throwable; } /** * Gets a {@code Throwable} cause chain as a list. The first entry in the * list will be {@code throwable} followed by its cause hierarchy. Note * that this is a snapshot of the cause chain and will not reflect * any subsequent changes to the cause chain. * * <p>Here's an example of how it can be used to find specific types * of exceptions in the cause chain: * * <pre> * Iterables.filter(Throwables.getCausalChain(e), IOException.class)); * </pre> * * @param throwable the non-null {@code Throwable} to extract causes from * @return an unmodifiable list containing the cause chain starting with * {@code throwable} */ @Beta // TODO(kevinb): decide best return type public static List<Throwable> getCausalChain(Throwable throwable) { checkNotNull(throwable); List<Throwable> causes = new ArrayList<Throwable>(4); while (throwable != null) { causes.add(throwable); throwable = throwable.getCause(); } return Collections.unmodifiableList(causes); } /** * Returns a string containing the result of * {@link Throwable#toString() toString()}, followed by the full, recursive * stack trace of {@code throwable}. Note that you probably should not be * parsing the resulting string; if you need programmatic access to the stack * frames, you can call {@link Throwable#getStackTrace()}. */ public static String getStackTraceAsString(Throwable throwable) { StringWriter stringWriter = new StringWriter(); throwable.printStackTrace(new PrintWriter(stringWriter)); return stringWriter.toString(); } }
Java
/* * Copyright (C) 2007 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.lang.ref.PhantomReference; import java.lang.ref.ReferenceQueue; /** * Phantom reference with a {@code finalizeReferent()} method which a background thread invokes * after the garbage collector reclaims the referent. This is a simpler alternative to using a * {@link ReferenceQueue}. * * <p>Unlike a normal phantom reference, this reference will be cleared automatically. * * @author Bob Lee * @since 2.0 (imported from Google Collections Library) */ public abstract class FinalizablePhantomReference<T> extends PhantomReference<T> implements FinalizableReference { /** * Constructs a new finalizable phantom reference. * * @param referent to phantom reference * @param queue that should finalize the referent */ protected FinalizablePhantomReference(T referent, FinalizableReferenceQueue queue) { super(referent, queue.queue); queue.cleanUp(); } }
Java
/* * Copyright (C) 2012 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.reflect; import com.google.common.annotations.Beta; import com.google.common.collect.ForwardingMap; import com.google.common.collect.ImmutableMap; import java.util.Map; /** * A type-to-instance map backed by an {@link ImmutableMap}. See also {@link * MutableTypeToInstanceMap}. * * @author Ben Yu * @since 13.0 */ @Beta public final class ImmutableTypeToInstanceMap<B> extends ForwardingMap<TypeToken<? extends B>, B> implements TypeToInstanceMap<B> { /** Returns an empty type to instance map. */ public static <B> ImmutableTypeToInstanceMap<B> of() { return new ImmutableTypeToInstanceMap<B>(ImmutableMap.<TypeToken<? extends B>, B>of()); } /** Returns a new builder. */ public static <B> Builder<B> builder() { return new Builder<B>(); } /** * A builder for creating immutable type-to-instance maps. Example: * <pre> {@code * * static final ImmutableTypeToInstanceMap<Handler<?>> HANDLERS = * ImmutableTypeToInstanceMap.<Handler<?>>builder() * .put(new TypeToken<Handler<Foo>>() {}, new FooHandler()) * .put(new TypeToken<Handler<Bar>>() {}, new SubBarHandler()) * .build();}</pre> * * <p>After invoking {@link #build()} it is still possible to add more entries * and build again. Thus each map generated by this builder will be a superset * of any map generated before it. * * @since 13.0 */ @Beta public static final class Builder<B> { private final ImmutableMap.Builder<TypeToken<? extends B>, B> mapBuilder = ImmutableMap.builder(); private Builder() {} /** * Associates {@code key} with {@code value} in the built map. Duplicate * keys are not allowed, and will cause {@link #build} to fail. */ public <T extends B> Builder<B> put(Class<T> key, T value) { mapBuilder.put(TypeToken.of(key), value); return this; } /** * Associates {@code key} with {@code value} in the built map. Duplicate * keys are not allowed, and will cause {@link #build} to fail. */ public <T extends B> Builder<B> put(TypeToken<T> key, T value) { mapBuilder.put(key.rejectTypeVariables(), value); return this; } /** * Returns a new immutable type-to-instance map containing the entries * provided to this builder. * * @throws IllegalArgumentException if duplicate keys were added */ public ImmutableTypeToInstanceMap<B> build() { return new ImmutableTypeToInstanceMap<B>(mapBuilder.build()); } } private final ImmutableMap<TypeToken<? extends B>, B> delegate; private ImmutableTypeToInstanceMap(ImmutableMap<TypeToken<? extends B>, B> delegate) { this.delegate = delegate; } @Override public <T extends B> T getInstance(TypeToken<T> type) { return trustedGet(type.rejectTypeVariables()); } /** * Guaranteed to throw an exception and leave the map unmodified. * * @throws UnsupportedOperationException always */ @Override public <T extends B> T putInstance(TypeToken<T> type, T value) { throw new UnsupportedOperationException(); } @Override public <T extends B> T getInstance(Class<T> type) { return trustedGet(TypeToken.of(type)); } /** * Guaranteed to throw an exception and leave the map unmodified. * * @throws UnsupportedOperationException always */ @Override public <T extends B> T putInstance(Class<T> type, T value) { throw new UnsupportedOperationException(); } @Override protected Map<TypeToken<? extends B>, B> delegate() { return delegate; } @SuppressWarnings("unchecked") // value could not get in if not a T private <T extends B> T trustedGet(TypeToken<T> type) { return (T) delegate.get(type); } }
Java
/* * Copyright (C) 2012 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.reflect; import static com.google.common.base.Preconditions.checkNotNull; import java.lang.annotation.Annotation; import java.lang.reflect.AccessibleObject; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Member; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import javax.annotation.Nullable; /** * Represents either a {@link Field}, a {@link Method} or a {@link Constructor}. * Provides convenience methods such as {@link #isPublic} and {@link #isPackagePrivate}. * * @author Ben Yu */ class Element extends AccessibleObject implements Member { private final AccessibleObject accessibleObject; private final Member member; <M extends AccessibleObject & Member> Element(M member) { checkNotNull(member); this.accessibleObject = member; this.member = member; } @Override public final boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { return accessibleObject.isAnnotationPresent(annotationClass); } @Override public final <A extends Annotation> A getAnnotation(Class<A> annotationClass) { return accessibleObject.getAnnotation(annotationClass); } @Override public final Annotation[] getAnnotations() { return accessibleObject.getAnnotations(); } @Override public final Annotation[] getDeclaredAnnotations() { return accessibleObject.getDeclaredAnnotations(); } @Override public final void setAccessible(boolean flag) throws SecurityException { accessibleObject.setAccessible(flag); } @Override public final boolean isAccessible() { return accessibleObject.isAccessible(); } @Override public Class<?> getDeclaringClass() { return member.getDeclaringClass(); } @Override public final String getName() { return member.getName(); } @Override public final int getModifiers() { return member.getModifiers(); } @Override public final boolean isSynthetic() { return member.isSynthetic(); } /** Returns true if the element is public. */ public final boolean isPublic() { return Modifier.isPublic(getModifiers()); } /** Returns true if the element is protected. */ public final boolean isProtected() { return Modifier.isProtected(getModifiers()); } /** Returns true if the element is package-private. */ public final boolean isPackagePrivate() { return !isPrivate() && !isPublic() && !isProtected(); } /** Returns true if the element is private. */ public final boolean isPrivate() { return Modifier.isPrivate(getModifiers()); } /** Returns true if the element is static. */ public final boolean isStatic() { return Modifier.isStatic(getModifiers()); } /** * Returns {@code true} if this method is final, per {@code Modifier.isFinal(getModifiers())}. * * <p>Note that a method may still be effectively "final", or non-overridable when it has no * {@code final} keyword. For example, it could be private, or it could be declared by a final * class. To tell whether a method is overridable, use {@link Invokable#isOverridable}. */ public final boolean isFinal() { return Modifier.isFinal(getModifiers()); } /** Returns true if the method is abstract. */ public final boolean isAbstract() { return Modifier.isAbstract(getModifiers()); } /** Returns true if the element is native. */ public final boolean isNative() { return Modifier.isNative(getModifiers()); } /** Returns true if the method is synchronized. */ public final boolean isSynchronized() { return Modifier.isSynchronized(getModifiers()); } /** Returns true if the field is volatile. */ final boolean isVolatile() { return Modifier.isVolatile(getModifiers()); } /** Returns true if the field is transient. */ final boolean isTransient() { return Modifier.isTransient(getModifiers()); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof Element) { Element that = (Element) obj; return member.equals(that.member); } return false; } @Override public int hashCode() { return member.hashCode(); } @Override public String toString() { return member.toString(); } }
Java
/* * Copyright (C) 2012 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.reflect; import static com.google.common.base.Preconditions.checkArgument; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; /** * Captures the actual type of {@code T}. * * @author Ben Yu */ abstract class TypeCapture<T> { /** Returns the captured type. */ final Type capture() { Type superclass = getClass().getGenericSuperclass(); checkArgument(superclass instanceof ParameterizedType, "%s isn't parameterized", superclass); return ((ParameterizedType) superclass).getActualTypeArguments()[0]; } }
Java
/* * Copyright (C) 2012 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. */ /** * This package contains utilities to work with Java reflection. * It is a part of the open-source * <a href="http://guava-libraries.googlecode.com">Guava libraries</a>. */ @javax.annotation.ParametersAreNonnullByDefault package com.google.common.reflect;
Java
/* * Copyright (C) 2011 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.reflect; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Iterables.transform; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; import com.google.common.base.Joiner; import com.google.common.base.Objects; import com.google.common.base.Predicates; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import java.io.Serializable; import java.lang.reflect.Array; import java.lang.reflect.GenericArrayType; import java.lang.reflect.GenericDeclaration; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.lang.reflect.WildcardType; import java.util.Arrays; import java.util.Collection; import java.util.concurrent.atomic.AtomicReference; import javax.annotation.Nullable; /** * Utilities for working with {@link Type}. * * @author Ben Yu */ final class Types { /** Class#toString without the "class " and "interface " prefixes */ private static final Function<Type, String> TYPE_TO_STRING = new Function<Type, String>() { @Override public String apply(Type from) { return Types.toString(from); } }; private static final Joiner COMMA_JOINER = Joiner.on(", ").useForNull("null"); /** Returns the array type of {@code componentType}. */ static Type newArrayType(Type componentType) { if (componentType instanceof WildcardType) { WildcardType wildcard = (WildcardType) componentType; Type[] lowerBounds = wildcard.getLowerBounds(); checkArgument(lowerBounds.length <= 1, "Wildcard cannot have more than one lower bounds."); if (lowerBounds.length == 1) { return supertypeOf(newArrayType(lowerBounds[0])); } else { Type[] upperBounds = wildcard.getUpperBounds(); checkArgument(upperBounds.length == 1, "Wildcard should have only one upper bound."); return subtypeOf(newArrayType(upperBounds[0])); } } return JavaVersion.CURRENT.newArrayType(componentType); } /** * Returns a type where {@code rawType} is parameterized by * {@code arguments} and is owned by {@code ownerType}. */ static ParameterizedType newParameterizedTypeWithOwner( @Nullable Type ownerType, Class<?> rawType, Type... arguments) { if (ownerType == null) { return newParameterizedType(rawType, arguments); } // ParameterizedTypeImpl constructor already checks, but we want to throw NPE before IAE checkNotNull(arguments); checkArgument(rawType.getEnclosingClass() != null, "Owner type for unenclosed %s", rawType); return new ParameterizedTypeImpl(ownerType, rawType, arguments); } /** * Returns a type where {@code rawType} is parameterized by * {@code arguments}. */ static ParameterizedType newParameterizedType(Class<?> rawType, Type... arguments) { return new ParameterizedTypeImpl( ClassOwnership.JVM_BEHAVIOR.getOwnerType(rawType), rawType, arguments); } /** Decides what owner type to use for constructing {@link ParameterizedType} from a raw class. */ private enum ClassOwnership { OWNED_BY_ENCLOSING_CLASS { @Nullable @Override Class<?> getOwnerType(Class<?> rawType) { return rawType.getEnclosingClass(); } }, LOCAL_CLASS_HAS_NO_OWNER { @Nullable @Override Class<?> getOwnerType(Class<?> rawType) { if (rawType.isLocalClass()) { return null; } else { return rawType.getEnclosingClass(); } } }; @Nullable abstract Class<?> getOwnerType(Class<?> rawType); static final ClassOwnership JVM_BEHAVIOR = detectJvmBehavior(); private static ClassOwnership detectJvmBehavior() { class LocalClass<T> {} Class<?> subclass = new LocalClass<String>() {}.getClass(); ParameterizedType parameterizedType = (ParameterizedType) subclass.getGenericSuperclass(); for (ClassOwnership behavior : ClassOwnership.values()) { if (behavior.getOwnerType(LocalClass.class) == parameterizedType.getOwnerType()) { return behavior; } } throw new AssertionError(); } } /** * Returns a new {@link TypeVariable} that belongs to {@code declaration} with * {@code name} and {@code bounds}. */ static <D extends GenericDeclaration> TypeVariable<D> newTypeVariable( D declaration, String name, Type... bounds) { return new TypeVariableImpl<D>( declaration, name, (bounds.length == 0) ? new Type[] { Object.class } : bounds); } /** Returns a new {@link WildcardType} with {@code upperBound}. */ @VisibleForTesting static WildcardType subtypeOf(Type upperBound) { return new WildcardTypeImpl(new Type[0], new Type[] { upperBound }); } /** Returns a new {@link WildcardType} with {@code lowerBound}. */ @VisibleForTesting static WildcardType supertypeOf(Type lowerBound) { return new WildcardTypeImpl(new Type[] { lowerBound }, new Type[] { Object.class }); } /** * Returns human readable string representation of {@code type}. * <ul> * <li> For array type {@code Foo[]}, {@code "com.mypackage.Foo[]"} are * returned. * <li> For any class, {@code theClass.getName()} are returned. * <li> For all other types, {@code type.toString()} are returned. * </ul> */ static String toString(Type type) { return (type instanceof Class) ? ((Class<?>) type).getName() : type.toString(); } @Nullable static Type getComponentType(Type type) { checkNotNull(type); final AtomicReference<Type> result = new AtomicReference<Type>(); new TypeVisitor() { @Override void visitTypeVariable(TypeVariable<?> t) { result.set(subtypeOfComponentType(t.getBounds())); } @Override void visitWildcardType(WildcardType t) { result.set(subtypeOfComponentType(t.getUpperBounds())); } @Override void visitGenericArrayType(GenericArrayType t) { result.set(t.getGenericComponentType()); } @Override void visitClass(Class<?> t) { result.set(t.getComponentType()); } }.visit(type); return result.get(); } /** * Returns {@code ? extends X} if any of {@code bounds} is a subtype of {@code X[]}; or null * otherwise. */ @Nullable private static Type subtypeOfComponentType(Type[] bounds) { for (Type bound : bounds) { Type componentType = getComponentType(bound); if (componentType != null) { // Only the first bound can be a class or array. // Bounds after the first can only be interfaces. if (componentType instanceof Class) { Class<?> componentClass = (Class<?>) componentType; if (componentClass.isPrimitive()) { return componentClass; } } return subtypeOf(componentType); } } return null; } private static final class GenericArrayTypeImpl implements GenericArrayType, Serializable { private final Type componentType; GenericArrayTypeImpl(Type componentType) { this.componentType = JavaVersion.CURRENT.usedInGenericType(componentType); } @Override public Type getGenericComponentType() { return componentType; } @Override public String toString() { return Types.toString(componentType) + "[]"; } @Override public int hashCode() { return componentType.hashCode(); } @Override public boolean equals(Object obj) { if (obj instanceof GenericArrayType) { GenericArrayType that = (GenericArrayType) obj; return Objects.equal( getGenericComponentType(), that.getGenericComponentType()); } return false; } private static final long serialVersionUID = 0; } private static final class ParameterizedTypeImpl implements ParameterizedType, Serializable { private final Type ownerType; private final ImmutableList<Type> argumentsList; private final Class<?> rawType; ParameterizedTypeImpl( @Nullable Type ownerType, Class<?> rawType, Type[] typeArguments) { checkNotNull(rawType); checkArgument(typeArguments.length == rawType.getTypeParameters().length); disallowPrimitiveType(typeArguments, "type parameter"); this.ownerType = ownerType; this.rawType = rawType; this.argumentsList = JavaVersion.CURRENT.usedInGenericType(typeArguments); } @Override public Type[] getActualTypeArguments() { return toArray(argumentsList); } @Override public Type getRawType() { return rawType; } @Override public Type getOwnerType() { return ownerType; } @Override public String toString() { StringBuilder builder = new StringBuilder(); if (ownerType != null) { builder.append(Types.toString(ownerType)).append('.'); } builder.append(rawType.getName()) .append('<') .append(COMMA_JOINER.join(transform(argumentsList, TYPE_TO_STRING))) .append('>'); return builder.toString(); } @Override public int hashCode() { return (ownerType == null ? 0 : ownerType.hashCode()) ^ argumentsList.hashCode() ^ rawType.hashCode(); } @Override public boolean equals(Object other) { if (!(other instanceof ParameterizedType)) { return false; } ParameterizedType that = (ParameterizedType) other; return getRawType().equals(that.getRawType()) && Objects.equal(getOwnerType(), that.getOwnerType()) && Arrays.equals( getActualTypeArguments(), that.getActualTypeArguments()); } private static final long serialVersionUID = 0; } private static final class TypeVariableImpl<D extends GenericDeclaration> implements TypeVariable<D> { private final D genericDeclaration; private final String name; private final ImmutableList<Type> bounds; TypeVariableImpl(D genericDeclaration, String name, Type[] bounds) { disallowPrimitiveType(bounds, "bound for type variable"); this.genericDeclaration = checkNotNull(genericDeclaration); this.name = checkNotNull(name); this.bounds = ImmutableList.copyOf(bounds); } @Override public Type[] getBounds() { return toArray(bounds); } @Override public D getGenericDeclaration() { return genericDeclaration; } @Override public String getName() { return name; } @Override public String toString() { return name; } @Override public int hashCode() { return genericDeclaration.hashCode() ^ name.hashCode(); } @Override public boolean equals(Object obj) { if (obj instanceof TypeVariable) { TypeVariable<?> that = (TypeVariable<?>) obj; return name.equals(that.getName()) && genericDeclaration.equals(that.getGenericDeclaration()); } return false; } } static final class WildcardTypeImpl implements WildcardType, Serializable { private final ImmutableList<Type> lowerBounds; private final ImmutableList<Type> upperBounds; WildcardTypeImpl(Type[] lowerBounds, Type[] upperBounds) { disallowPrimitiveType(lowerBounds, "lower bound for wildcard"); disallowPrimitiveType(upperBounds, "upper bound for wildcard"); this.lowerBounds = JavaVersion.CURRENT.usedInGenericType(lowerBounds); this.upperBounds = JavaVersion.CURRENT.usedInGenericType(upperBounds); } @Override public Type[] getLowerBounds() { return toArray(lowerBounds); } @Override public Type[] getUpperBounds() { return toArray(upperBounds); } @Override public boolean equals(Object obj) { if (obj instanceof WildcardType) { WildcardType that = (WildcardType) obj; return lowerBounds.equals(Arrays.asList(that.getLowerBounds())) && upperBounds.equals(Arrays.asList(that.getUpperBounds())); } return false; } @Override public int hashCode() { return lowerBounds.hashCode() ^ upperBounds.hashCode(); } @Override public String toString() { StringBuilder builder = new StringBuilder("?"); for (Type lowerBound : lowerBounds) { builder.append(" super ").append(Types.toString(lowerBound)); } for (Type upperBound : filterUpperBounds(upperBounds)) { builder.append(" extends ").append(Types.toString(upperBound)); } return builder.toString(); } private static final long serialVersionUID = 0; } private static Type[] toArray(Collection<Type> types) { return types.toArray(new Type[types.size()]); } private static Iterable<Type> filterUpperBounds(Iterable<Type> bounds) { return Iterables.filter( bounds, Predicates.not(Predicates.<Type>equalTo(Object.class))); } private static void disallowPrimitiveType(Type[] types, String usedAs) { for (Type type : types) { if (type instanceof Class) { Class<?> cls = (Class<?>) type; checkArgument(!cls.isPrimitive(), "Primitive type '%s' used as %s", cls, usedAs); } } } /** Returns the {@code Class} object of arrays with {@code componentType}. */ static Class<?> getArrayClass(Class<?> componentType) { // TODO(user): This is not the most efficient way to handle generic // arrays, but is there another way to extract the array class in a // non-hacky way (i.e. using String value class names- "[L...")? return Array.newInstance(componentType, 0).getClass(); } // TODO(benyu): Once we are on Java 7, delete this abstraction enum JavaVersion { JAVA6 { @Override GenericArrayType newArrayType(Type componentType) { return new GenericArrayTypeImpl(componentType); } @Override Type usedInGenericType(Type type) { checkNotNull(type); if (type instanceof Class) { Class<?> cls = (Class<?>) type; if (cls.isArray()) { return new GenericArrayTypeImpl(cls.getComponentType()); } } return type; } }, JAVA7 { @Override Type newArrayType(Type componentType) { if (componentType instanceof Class) { return getArrayClass((Class<?>) componentType); } else { return new GenericArrayTypeImpl(componentType); } } @Override Type usedInGenericType(Type type) { return checkNotNull(type); } } ; static final JavaVersion CURRENT = (new TypeCapture<int[]>() {}.capture() instanceof Class) ? JAVA7 : JAVA6; abstract Type newArrayType(Type componentType); abstract Type usedInGenericType(Type type); final ImmutableList<Type> usedInGenericType(Type[] types) { ImmutableList.Builder<Type> builder = ImmutableList.builder(); for (Type type : types) { builder.add(usedInGenericType(type)); } return builder.build(); } } private Types() {} }
Java
/* * Copyright (C) 2012 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.reflect; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.collect.ImmutableList; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; import javax.annotation.Nullable; /** * Represents a method or constructor parameter. * * @author Ben Yu * @since 14.0 */ @Beta public final class Parameter implements AnnotatedElement { private final Invokable<?, ?> declaration; private final int position; private final TypeToken<?> type; private final ImmutableList<Annotation> annotations; Parameter( Invokable<?, ?> declaration, int position, TypeToken<?> type, Annotation[] annotations) { this.declaration = declaration; this.position = position; this.type = type; this.annotations = ImmutableList.copyOf(annotations); } /** Returns the type of the parameter. */ public TypeToken<?> getType() { return type; } /** Returns the {@link Invokable} that declares this parameter. */ public Invokable<?, ?> getDeclaringInvokable() { return declaration; } @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { return getAnnotation(annotationType) != null; } @Override @Nullable public <A extends Annotation> A getAnnotation(Class<A> annotationType) { checkNotNull(annotationType); for (Annotation annotation : annotations) { if (annotationType.isInstance(annotation)) { return annotationType.cast(annotation); } } return null; } @Override public Annotation[] getAnnotations() { return getDeclaredAnnotations(); } @Override public Annotation[] getDeclaredAnnotations() { return annotations.toArray(new Annotation[annotations.size()]); } @Override public boolean equals(@Nullable Object obj) { if (obj instanceof Parameter) { Parameter that = (Parameter) obj; return position == that.position && declaration.equals(that.declaration); } return false; } @Override public int hashCode() { return position; } @Override public String toString() { return type + " arg" + position; } }
Java
/* * Copyright (C) 2012 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.reflect; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.collect.ImmutableList; import java.lang.annotation.Annotation; import java.lang.reflect.AccessibleObject; import java.lang.reflect.Constructor; import java.lang.reflect.GenericDeclaration; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Member; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.util.Arrays; import javax.annotation.Nullable; /** * Wrapper around either a {@link Method} or a {@link Constructor}. * Convenience API is provided to make common reflective operation easier to deal with, * such as {@link #isPublic}, {@link #getParameters} etc. * * <p>In addition to convenience methods, {@link TypeToken#method} and {@link * TypeToken#constructor} will resolve the type parameters of the method or constructor in the * context of the owner type, which may be a subtype of the declaring class. For example: * * <pre> {@code * Method getMethod = List.class.getMethod("get", int.class); * Invokable<List<String>, ?> invokable = new TypeToken<List<String>>() {}.method(getMethod); * assertEquals(TypeToken.of(String.class), invokable.getReturnType()); // Not Object.class! * assertEquals(new TypeToken<List<String>>() {}, invokable.getOwnerType());}</pre> * * @param <T> the type that owns this method or constructor. * @param <R> the return type of (or supertype thereof) the method or the declaring type of the * constructor. * @author Ben Yu * @since 14.0 */ @Beta public abstract class Invokable<T, R> extends Element implements GenericDeclaration { <M extends AccessibleObject & Member> Invokable(M member) { super(member); } /** Returns {@link Invokable} of {@code method}. */ public static Invokable<?, Object> from(Method method) { return new MethodInvokable<Object>(method); } /** Returns {@link Invokable} of {@code constructor}. */ public static <T> Invokable<T, T> from(Constructor<T> constructor) { return new ConstructorInvokable<T>(constructor); } /** * Returns {@code true} if this is an overridable method. Constructors, private, static or final * methods, or methods declared by final classes are not overridable. */ public abstract boolean isOverridable(); /** Returns {@code true} if this was declared to take a variable number of arguments. */ public abstract boolean isVarArgs(); /** * Invokes with {@code receiver} as 'this' and {@code args} passed to the underlying method * and returns the return value; or calls the underlying constructor with {@code args} and returns * the constructed instance. * * @throws IllegalAccessException if this {@code Constructor} object enforces Java language * access control and the underlying method or constructor is inaccessible. * @throws IllegalArgumentException if the number of actual and formal parameters differ; * if an unwrapping conversion for primitive arguments fails; or if, after possible * unwrapping, a parameter value cannot be converted to the corresponding formal * parameter type by a method invocation conversion. * @throws InvocationTargetException if the underlying method or constructor throws an exception. */ // All subclasses are owned by us and we'll make sure to get the R type right. @SuppressWarnings("unchecked") public final R invoke(@Nullable T receiver, Object... args) throws InvocationTargetException, IllegalAccessException { return (R) invokeInternal(receiver, checkNotNull(args)); } /** Returns the return type of this {@code Invokable}. */ // All subclasses are owned by us and we'll make sure to get the R type right. @SuppressWarnings("unchecked") public final TypeToken<? extends R> getReturnType() { return (TypeToken<? extends R>) TypeToken.of(getGenericReturnType()); } /** * Returns all declared parameters of this {@code Invokable}. Note that if this is a constructor * of a non-static inner class, unlike {@link Constructor#getParameterTypes}, the hidden * {@code this} parameter of the enclosing class is excluded from the returned parameters. */ public final ImmutableList<Parameter> getParameters() { Type[] parameterTypes = getGenericParameterTypes(); Annotation[][] annotations = getParameterAnnotations(); ImmutableList.Builder<Parameter> builder = ImmutableList.builder(); for (int i = 0; i < parameterTypes.length; i++) { builder.add(new Parameter( this, i, TypeToken.of(parameterTypes[i]), annotations[i])); } return builder.build(); } /** Returns all declared exception types of this {@code Invokable}. */ public final ImmutableList<TypeToken<? extends Throwable>> getExceptionTypes() { ImmutableList.Builder<TypeToken<? extends Throwable>> builder = ImmutableList.builder(); for (Type type : getGenericExceptionTypes()) { // getGenericExceptionTypes() will never return a type that's not exception @SuppressWarnings("unchecked") TypeToken<? extends Throwable> exceptionType = (TypeToken<? extends Throwable>) TypeToken.of(type); builder.add(exceptionType); } return builder.build(); } /** * Explicitly specifies the return type of this {@code Invokable}. For example: * <pre> {@code * Method factoryMethod = Person.class.getMethod("create"); * Invokable<?, Person> factory = Invokable.of(getNameMethod).returning(Person.class);}</pre> */ public final <R1 extends R> Invokable<T, R1> returning(Class<R1> returnType) { return returning(TypeToken.of(returnType)); } /** Explicitly specifies the return type of this {@code Invokable}. */ public final <R1 extends R> Invokable<T, R1> returning(TypeToken<R1> returnType) { if (!returnType.isAssignableFrom(getReturnType())) { throw new IllegalArgumentException( "Invokable is known to return " + getReturnType() + ", not " + returnType); } @SuppressWarnings("unchecked") // guarded by previous check Invokable<T, R1> specialized = (Invokable<T, R1>) this; return specialized; } @SuppressWarnings("unchecked") // The declaring class is T's raw class, or one of its supertypes. @Override public final Class<? super T> getDeclaringClass() { return (Class<? super T>) super.getDeclaringClass(); } /** Returns the type of {@code T}. */ // Overridden in TypeToken#method() and TypeToken#constructor() @SuppressWarnings("unchecked") // The declaring class is T. public TypeToken<T> getOwnerType() { return (TypeToken<T>) TypeToken.of(getDeclaringClass()); } abstract Object invokeInternal(@Nullable Object receiver, Object[] args) throws InvocationTargetException, IllegalAccessException; abstract Type[] getGenericParameterTypes(); /** This should never return a type that's not a subtype of Throwable. */ abstract Type[] getGenericExceptionTypes(); abstract Annotation[][] getParameterAnnotations(); abstract Type getGenericReturnType(); static class MethodInvokable<T> extends Invokable<T, Object> { private final Method method; MethodInvokable(Method method) { super(method); this.method = method; } @Override final Object invokeInternal(@Nullable Object receiver, Object[] args) throws InvocationTargetException, IllegalAccessException { return method.invoke(receiver, args); } @Override Type getGenericReturnType() { return method.getGenericReturnType(); } @Override Type[] getGenericParameterTypes() { return method.getGenericParameterTypes(); } @Override Type[] getGenericExceptionTypes() { return method.getGenericExceptionTypes(); } @Override final Annotation[][] getParameterAnnotations() { return method.getParameterAnnotations(); } @Override public final TypeVariable<?>[] getTypeParameters() { return method.getTypeParameters(); } @Override public final boolean isOverridable() { return !(isFinal() || isPrivate() || isStatic() || Modifier.isFinal(getDeclaringClass().getModifiers())); } @Override public final boolean isVarArgs() { return method.isVarArgs(); } } static class ConstructorInvokable<T> extends Invokable<T, T> { private final Constructor<?> constructor; ConstructorInvokable(Constructor<?> constructor) { super(constructor); this.constructor = constructor; } @Override final Object invokeInternal(@Nullable Object receiver, Object[] args) throws InvocationTargetException, IllegalAccessException { try { return constructor.newInstance(args); } catch (InstantiationException e) { throw new RuntimeException(constructor + " failed.", e); } } /** If the class is parameterized, such as ArrayList, this returns ArrayList<E>. */ @Override Type getGenericReturnType() { Class<?> declaringClass = getDeclaringClass(); TypeVariable<?>[] typeParams = declaringClass.getTypeParameters(); if (typeParams.length > 0) { return Types.newParameterizedType(declaringClass, typeParams); } else { return declaringClass; } } @Override Type[] getGenericParameterTypes() { Type[] types = constructor.getGenericParameterTypes(); if (types.length > 0 && mayNeedHiddenThis()) { Class<?>[] rawParamTypes = constructor.getParameterTypes(); if (types.length == rawParamTypes.length && rawParamTypes[0] == getDeclaringClass().getEnclosingClass()) { // first parameter is the hidden 'this' return Arrays.copyOfRange(types, 1, types.length); } } return types; } @Override Type[] getGenericExceptionTypes() { return constructor.getGenericExceptionTypes(); } @Override final Annotation[][] getParameterAnnotations() { return constructor.getParameterAnnotations(); } /** * {@inheritDoc} * * {@code [<E>]} will be returned for ArrayList's constructor. When both the class and the * constructor have type parameters, the class parameters are prepended before those of the * constructor's. This is an arbitrary rule since no existing language spec mandates one way or * the other. From the declaration syntax, the class type parameter appears first, but the * call syntax may show up in opposite order such as {@code new <A>Foo<B>()}. */ @Override public final TypeVariable<?>[] getTypeParameters() { TypeVariable<?>[] declaredByClass = getDeclaringClass().getTypeParameters(); TypeVariable<?>[] declaredByConstructor = constructor.getTypeParameters(); TypeVariable<?>[] result = new TypeVariable<?>[declaredByClass.length + declaredByConstructor.length]; System.arraycopy(declaredByClass, 0, result, 0, declaredByClass.length); System.arraycopy( declaredByConstructor, 0, result, declaredByClass.length, declaredByConstructor.length); return result; } @Override public final boolean isOverridable() { return false; } @Override public final boolean isVarArgs() { return constructor.isVarArgs(); } private boolean mayNeedHiddenThis() { Class<?> declaringClass = constructor.getDeclaringClass(); if (declaringClass.getEnclosingConstructor() != null) { // Enclosed in a constructor, needs hidden this return true; } Method enclosingMethod = declaringClass.getEnclosingMethod(); if (enclosingMethod != null) { // Enclosed in a method, if it's not static, must need hidden this. return !Modifier.isStatic(enclosingMethod.getModifiers()); } else { // Strictly, this doesn't necessarily indicate a hidden 'this' in the case of // static initializer. But there seems no way to tell in that case. :( // This may cause issues when an anonymous class is created inside a static initializer, // and the class's constructor's first parameter happens to be the enclosing class. // In such case, we may mistakenly think that the class is within a non-static context // and the first parameter is the hidden 'this'. return declaringClass.getEnclosingClass() != null && !Modifier.isStatic(declaringClass.getModifiers()); } } } }
Java
/* * Copyright (C) 2012 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.reflect; import com.google.common.annotations.Beta; import java.util.Map; import javax.annotation.Nullable; /** * A map, each entry of which maps a {@link TypeToken} to an instance of that type. * In addition to implementing {@code Map}, the additional type-safe operations * {@link #putInstance} and {@link #getInstance} are available. * * <p>Generally, implementations don't support {@link #put} and {@link #putAll} * because there is no way to check an object at runtime to be an instance of a * {@link TypeToken}. Instead, caller should use the type safe {@link #putInstance}. * * <p>Also, if caller suppresses unchecked warnings and passes in an {@code Iterable<String>} * for type {@code Iterable<Integer>}, the map won't be able to detect and throw type error. * * <p>Like any other {@code Map<Class, Object>}, this map may contain entries * for primitive types, and a primitive type and its corresponding wrapper type * may map to different values. * * @param <B> the common supertype that all entries must share; often this is * simply {@link Object} * * @author Ben Yu * @since 13.0 */ @Beta public interface TypeToInstanceMap<B> extends Map<TypeToken<? extends B>, B> { /** * Returns the value the specified class is mapped to, or {@code null} if no * entry for this class is present. This will only return a value that was * bound to this specific class, not a value that may have been bound to a * subtype. * * <p>{@code getInstance(Foo.class)} is equivalent to * {@code getInstance(TypeToken.of(Foo.class))}. */ @Nullable <T extends B> T getInstance(Class<T> type); /** * Maps the specified class to the specified value. Does <i>not</i> associate * this value with any of the class's supertypes. * * <p>{@code putInstance(Foo.class, foo)} is equivalent to * {@code putInstance(TypeToken.of(Foo.class), foo)}. * * @return the value previously associated with this class (possibly {@code null}), * or {@code null} if there was no previous entry. */ @Nullable <T extends B> T putInstance(Class<T> type, @Nullable T value); /** * Returns the value the specified type is mapped to, or {@code null} if no * entry for this type is present. This will only return a value that was * bound to this specific type, not a value that may have been bound to a subtype. */ @Nullable <T extends B> T getInstance(TypeToken<T> type); /** * Maps the specified type to the specified value. Does <i>not</i> associate * this value with any of the type's supertypes. * * @return the value previously associated with this type (possibly {@code null}), * or {@code null} if there was no previous entry. */ @Nullable <T extends B> T putInstance(TypeToken<T> type, @Nullable T value); }
Java
/* * 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.reflect; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import com.google.common.annotations.Beta; import com.google.common.base.Joiner; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import java.lang.reflect.GenericArrayType; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.lang.reflect.WildcardType; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import javax.annotation.Nullable; /** * An object of this class encapsulates type mappings from type variables. Mappings are established * with {@link #where} and types are resolved using {@link #resolveType}. * * <p>Note that usually type mappings are already implied by the static type hierarchy (for example, * the {@code E} type variable declared by class {@code List} naturally maps to {@code String} in * the context of {@code class MyStringList implements List<String>}. In such case, prefer to use * {@link TypeToken#resolveType} since it's simpler and more type safe. This class should only be * used when the type mapping isn't implied by the static type hierarchy, but provided through other * means such as an annotation or external configuration file. * * @author Ben Yu * @since 15.0 */ @Beta public final class TypeResolver { private final TypeTable typeTable; public TypeResolver() { this.typeTable = new TypeTable(); } private TypeResolver(TypeTable typeTable) { this.typeTable = typeTable; } static TypeResolver accordingTo(Type type) { return new TypeResolver().where(TypeMappingIntrospector.getTypeMappings(type)); } /** * Returns a new {@code TypeResolver} with type variables in {@code formal} mapping to types in * {@code actual}. * * <p>For example, if {@code formal} is a {@code TypeVariable T}, and {@code actual} is {@code * String.class}, then {@code new TypeResolver().where(formal, actual)} will {@linkplain * #resolveType resolve} {@code ParameterizedType List<T>} to {@code List<String>}, and resolve * {@code Map<T, Something>} to {@code Map<String, Something>} etc. Similarly, {@code formal} and * {@code actual} can be {@code Map<K, V>} and {@code Map<String, Integer>} respectively, or they * can be {@code E[]} and {@code String[]} respectively, or even any arbitrary combination * thereof. * * @param formal The type whose type variables or itself is mapped to other type(s). It's almost * always a bug if {@code formal} isn't a type variable and contains no type variable. Make * sure you are passing the two parameters in the right order. * @param actual The type that the formal type variable(s) are mapped to. It can be or contain yet * other type variables, in which case these type variables will be further resolved if * corresponding mappings exist in the current {@code TypeResolver} instance. */ public TypeResolver where(Type formal, Type actual) { Map<TypeVariable<?>, Type> mappings = Maps.newHashMap(); populateTypeMappings(mappings, checkNotNull(formal), checkNotNull(actual)); return where(mappings); } /** Returns a new {@code TypeResolver} with {@code variable} mapping to {@code type}. */ TypeResolver where(Map<? extends TypeVariable<?>, ? extends Type> mappings) { return new TypeResolver(typeTable.where(mappings)); } private static void populateTypeMappings( final Map<TypeVariable<?>, Type> mappings, Type from, final Type to) { if (from.equals(to)) { return; } new TypeVisitor() { @Override void visitTypeVariable(TypeVariable<?> typeVariable) { mappings.put(typeVariable, to); } @Override void visitWildcardType(WildcardType fromWildcardType) { WildcardType toWildcardType = expectArgument(WildcardType.class, to); Type[] fromUpperBounds = fromWildcardType.getUpperBounds(); Type[] toUpperBounds = toWildcardType.getUpperBounds(); Type[] fromLowerBounds = fromWildcardType.getLowerBounds(); Type[] toLowerBounds = toWildcardType.getLowerBounds(); checkArgument( fromUpperBounds.length == toUpperBounds.length && fromLowerBounds.length == toLowerBounds.length, "Incompatible type: %s vs. %s", fromWildcardType, to); for (int i = 0; i < fromUpperBounds.length; i++) { populateTypeMappings(mappings, fromUpperBounds[i], toUpperBounds[i]); } for (int i = 0; i < fromLowerBounds.length; i++) { populateTypeMappings(mappings, fromLowerBounds[i], toLowerBounds[i]); } } @Override void visitParameterizedType(ParameterizedType fromParameterizedType) { ParameterizedType toParameterizedType = expectArgument(ParameterizedType.class, to); checkArgument(fromParameterizedType.getRawType().equals(toParameterizedType.getRawType()), "Inconsistent raw type: %s vs. %s", fromParameterizedType, to); Type[] fromArgs = fromParameterizedType.getActualTypeArguments(); Type[] toArgs = toParameterizedType.getActualTypeArguments(); checkArgument(fromArgs.length == toArgs.length, "%s not compatible with %s", fromParameterizedType, toParameterizedType); for (int i = 0; i < fromArgs.length; i++) { populateTypeMappings(mappings, fromArgs[i], toArgs[i]); } } @Override void visitGenericArrayType(GenericArrayType fromArrayType) { Type componentType = Types.getComponentType(to); checkArgument(componentType != null, "%s is not an array type.", to); populateTypeMappings(mappings, fromArrayType.getGenericComponentType(), componentType); } @Override void visitClass(Class<?> fromClass) { // Can't map from a raw class to anything other than itself. // You can't say "assuming String is Integer". // And we don't support "assuming String is T"; user has to say "assuming T is String". throw new IllegalArgumentException("No type mapping from " + fromClass); } }.visit(from); } /** * Resolves all type variables in {@code type} and all downstream types and * returns a corresponding type with type variables resolved. */ public Type resolveType(Type type) { checkNotNull(type); if (type instanceof TypeVariable) { return typeTable.resolve((TypeVariable<?>) type); } else if (type instanceof ParameterizedType) { return resolveParameterizedType((ParameterizedType) type); } else if (type instanceof GenericArrayType) { return resolveGenericArrayType((GenericArrayType) type); } else if (type instanceof WildcardType) { WildcardType wildcardType = (WildcardType) type; return new Types.WildcardTypeImpl( resolveTypes(wildcardType.getLowerBounds()), resolveTypes(wildcardType.getUpperBounds())); } else { // if Class<?>, no resolution needed, we are done. return type; } } private Type[] resolveTypes(Type[] types) { Type[] result = new Type[types.length]; for (int i = 0; i < types.length; i++) { result[i] = resolveType(types[i]); } return result; } private Type resolveGenericArrayType(GenericArrayType type) { Type componentType = resolveType(type.getGenericComponentType()); return Types.newArrayType(componentType); } private ParameterizedType resolveParameterizedType(ParameterizedType type) { Type owner = type.getOwnerType(); Type resolvedOwner = (owner == null) ? null : resolveType(owner); Type resolvedRawType = resolveType(type.getRawType()); Type[] vars = type.getActualTypeArguments(); Type[] resolvedArgs = new Type[vars.length]; for (int i = 0; i < vars.length; i++) { resolvedArgs[i] = resolveType(vars[i]); } return Types.newParameterizedTypeWithOwner( resolvedOwner, (Class<?>) resolvedRawType, resolvedArgs); } private static <T> T expectArgument(Class<T> type, Object arg) { try { return type.cast(arg); } catch (ClassCastException e) { throw new IllegalArgumentException(arg + " is not a " + type.getSimpleName()); } } /** A TypeTable maintains mapping from {@link TypeVariable} to types. */ private static class TypeTable { private final ImmutableMap<TypeVariable<?>, Type> map; TypeTable() { this.map = ImmutableMap.of(); } private TypeTable(ImmutableMap<TypeVariable<?>, Type> map) { this.map = map; } /** Returns a new {@code TypeResolver} with {@code variable} mapping to {@code type}. */ final TypeTable where(Map<? extends TypeVariable<?>, ? extends Type> mappings) { ImmutableMap.Builder<TypeVariable<?>, Type> builder = ImmutableMap.builder(); builder.putAll(map); for (Map.Entry<? extends TypeVariable<?>, ? extends Type> mapping : mappings.entrySet()) { TypeVariable<?> variable = mapping.getKey(); Type type = mapping.getValue(); checkArgument(!variable.equals(type), "Type variable %s bound to itself", variable); builder.put(variable, type); } return new TypeTable(builder.build()); } final Type resolve(final TypeVariable<?> var) { final TypeTable unguarded = this; TypeTable guarded = new TypeTable() { @Override public Type resolveInternal( TypeVariable<?> intermediateVar, TypeTable forDependent) { if (intermediateVar.getGenericDeclaration().equals(var.getGenericDeclaration())) { return intermediateVar; } return unguarded.resolveInternal(intermediateVar, forDependent); } }; return resolveInternal(var, guarded); } /** * Resolves {@code var} using the encapsulated type mapping. If it maps to yet another * non-reified type or has bounds, {@code forDependants} is used to do further resolution, which * doesn't try to resolve any type variable on generic declarations that are already being * resolved. * * <p>Should only be called and overridden by {@link #resolve(TypeVariable)}. */ Type resolveInternal(TypeVariable<?> var, TypeTable forDependants) { Type type = map.get(var); if (type == null) { Type[] bounds = var.getBounds(); if (bounds.length == 0) { return var; } return Types.newTypeVariable( var.getGenericDeclaration(), var.getName(), new TypeResolver(forDependants).resolveTypes(bounds)); } // in case the type is yet another type variable. return new TypeResolver(forDependants).resolveType(type); } } private static final class TypeMappingIntrospector extends TypeVisitor { private static final WildcardCapturer wildcardCapturer = new WildcardCapturer(); private final Map<TypeVariable<?>, Type> mappings = Maps.newHashMap(); /** * Returns type mappings using type parameters and type arguments found in * the generic superclass and the super interfaces of {@code contextClass}. */ static ImmutableMap<TypeVariable<?>, Type> getTypeMappings( Type contextType) { TypeMappingIntrospector introspector = new TypeMappingIntrospector(); introspector.visit(wildcardCapturer.capture(contextType)); return ImmutableMap.copyOf(introspector.mappings); } @Override void visitClass(Class<?> clazz) { visit(clazz.getGenericSuperclass()); visit(clazz.getGenericInterfaces()); } @Override void visitParameterizedType(ParameterizedType parameterizedType) { Class<?> rawClass = (Class<?>) parameterizedType.getRawType(); TypeVariable<?>[] vars = rawClass.getTypeParameters(); Type[] typeArgs = parameterizedType.getActualTypeArguments(); checkState(vars.length == typeArgs.length); for (int i = 0; i < vars.length; i++) { map(vars[i], typeArgs[i]); } visit(rawClass); visit(parameterizedType.getOwnerType()); } @Override void visitTypeVariable(TypeVariable<?> t) { visit(t.getBounds()); } @Override void visitWildcardType(WildcardType t) { visit(t.getUpperBounds()); } private void map(final TypeVariable<?> var, final Type arg) { if (mappings.containsKey(var)) { // Mapping already established // This is possible when following both superClass -> enclosingClass // and enclosingclass -> superClass paths. // Since we follow the path of superclass first, enclosing second, // superclass mapping should take precedence. return; } // First, check whether var -> arg forms a cycle for (Type t = arg; t != null; t = mappings.get(t)) { if (var.equals(t)) { // cycle detected, remove the entire cycle from the mapping so that // each type variable resolves deterministically to itself. // Otherwise, a F -> T cycle will end up resolving both F and T // nondeterministically to either F or T. for (Type x = arg; x != null; x = mappings.remove(x)) {} return; } } mappings.put(var, arg); } } // This is needed when resolving types against a context with wildcards // For example: // class Holder<T> { // void set(T data) {...} // } // Holder<List<?>> should *not* resolve the set() method to set(List<?> data). // Instead, it should create a capture of the wildcard so that set() rejects any List<T>. private static final class WildcardCapturer { private final AtomicInteger id = new AtomicInteger(); Type capture(Type type) { checkNotNull(type); if (type instanceof Class) { return type; } if (type instanceof TypeVariable) { return type; } if (type instanceof GenericArrayType) { GenericArrayType arrayType = (GenericArrayType) type; return Types.newArrayType(capture(arrayType.getGenericComponentType())); } if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; return Types.newParameterizedTypeWithOwner( captureNullable(parameterizedType.getOwnerType()), (Class<?>) parameterizedType.getRawType(), capture(parameterizedType.getActualTypeArguments())); } if (type instanceof WildcardType) { WildcardType wildcardType = (WildcardType) type; Type[] lowerBounds = wildcardType.getLowerBounds(); if (lowerBounds.length == 0) { // ? extends something changes to capture-of Type[] upperBounds = wildcardType.getUpperBounds(); String name = "capture#" + id.incrementAndGet() + "-of ? extends " + Joiner.on('&').join(upperBounds); return Types.newTypeVariable( WildcardCapturer.class, name, wildcardType.getUpperBounds()); } else { // TODO(benyu): handle ? super T somehow. return type; } } throw new AssertionError("must have been one of the known types"); } private Type captureNullable(@Nullable Type type) { if (type == null) { return null; } return capture(type); } private Type[] capture(Type[] types) { Type[] result = new Type[types.length]; for (int i = 0; i < types.length; i++) { result[i] = capture(types[i]); } return result; } } }
Java
/* * Copyright (C) 2011 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.reflect; import static com.google.common.base.Preconditions.checkArgument; import com.google.common.annotations.Beta; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import javax.annotation.Nullable; /** * Captures a free type variable that can be used in {@link TypeToken#where}. * For example: * * <pre> {@code * static <T> TypeToken<List<T>> listOf(Class<T> elementType) { * return new TypeToken<List<T>>() {} * .where(new TypeParameter<T>() {}, elementType); * }}</pre> * * @author Ben Yu * @since 12.0 */ @Beta public abstract class TypeParameter<T> extends TypeCapture<T> { final TypeVariable<?> typeVariable; protected TypeParameter() { Type type = capture(); checkArgument(type instanceof TypeVariable, "%s should be a type variable.", type); this.typeVariable = (TypeVariable<?>) type; } @Override public final int hashCode() { return typeVariable.hashCode(); } @Override public final boolean equals(@Nullable Object o) { if (o instanceof TypeParameter) { TypeParameter<?> that = (TypeParameter<?>) o; return typeVariable.equals(that.typeVariable); } return false; } @Override public String toString() { return typeVariable.toString(); } }
Java
/* * Copyright (C) 2006 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.reflect; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import com.google.common.annotations.Beta; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Predicate; import com.google.common.collect.FluentIterable; import com.google.common.collect.ForwardingSet; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; import com.google.common.collect.Ordering; import com.google.common.primitives.Primitives; import java.io.Serializable; import java.lang.reflect.Constructor; import java.lang.reflect.GenericArrayType; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.lang.reflect.WildcardType; import java.util.Arrays; import java.util.Comparator; import java.util.Map; import java.util.Set; import javax.annotation.Nullable; /** * A {@link Type} with generics. * * <p>Operations that are otherwise only available in {@link Class} are implemented to support * {@code Type}, for example {@link #isAssignableFrom}, {@link #isArray} and {@link * #getComponentType}. It also provides additional utilities such as {@link #getTypes} and {@link * #resolveType} etc. * * <p>There are three ways to get a {@code TypeToken} instance: <ul> * <li>Wrap a {@code Type} obtained via reflection. For example: {@code * TypeToken.of(method.getGenericReturnType())}. * <li>Capture a generic type with a (usually anonymous) subclass. For example: <pre> {@code * new TypeToken<List<String>>() {}}</pre> * <p>Note that it's critical that the actual type argument is carried by a subclass. * The following code is wrong because it only captures the {@code <T>} type variable * of the {@code listType()} method signature; while {@code <String>} is lost in erasure: * <pre> {@code * class Util { * static <T> TypeToken<List<T>> listType() { * return new TypeToken<List<T>>() {}; * } * } * * TypeToken<List<String>> stringListType = Util.<String>listType();}</pre> * <li>Capture a generic type with a (usually anonymous) subclass and resolve it against * a context class that knows what the type parameters are. For example: <pre> {@code * abstract class IKnowMyType<T> { * TypeToken<T> type = new TypeToken<T>(getClass()) {}; * } * new IKnowMyType<String>() {}.type => String}</pre> * </ul> * * <p>{@code TypeToken} is serializable when no type variable is contained in the type. * * <p>Note to Guice users: {@code} TypeToken is similar to Guice's {@code TypeLiteral} class * except that it is serializable and offers numerous additional utility methods. * * @author Bob Lee * @author Sven Mawson * @author Ben Yu * @since 12.0 */ @Beta @SuppressWarnings("serial") // SimpleTypeToken is the serialized form. public abstract class TypeToken<T> extends TypeCapture<T> implements Serializable { private final Type runtimeType; /** Resolver for resolving types with {@link #runtimeType} as context. */ private transient TypeResolver typeResolver; /** * Constructs a new type token of {@code T}. * * <p>Clients create an empty anonymous subclass. Doing so embeds the type * parameter in the anonymous class's type hierarchy so we can reconstitute * it at runtime despite erasure. * * <p>For example: <pre> {@code * TypeToken<List<String>> t = new TypeToken<List<String>>() {};}</pre> */ protected TypeToken() { this.runtimeType = capture(); checkState(!(runtimeType instanceof TypeVariable), "Cannot construct a TypeToken for a type variable.\n" + "You probably meant to call new TypeToken<%s>(getClass()) " + "that can resolve the type variable for you.\n" + "If you do need to create a TypeToken of a type variable, " + "please use TypeToken.of() instead.", runtimeType); } /** * Constructs a new type token of {@code T} while resolving free type variables in the context of * {@code declaringClass}. * * <p>Clients create an empty anonymous subclass. Doing so embeds the type * parameter in the anonymous class's type hierarchy so we can reconstitute * it at runtime despite erasure. * * <p>For example: <pre> {@code * abstract class IKnowMyType<T> { * TypeToken<T> getMyType() { * return new TypeToken<T>(getClass()) {}; * } * } * * new IKnowMyType<String>() {}.getMyType() => String}</pre> */ protected TypeToken(Class<?> declaringClass) { Type captured = super.capture(); if (captured instanceof Class) { this.runtimeType = captured; } else { this.runtimeType = of(declaringClass).resolveType(captured).runtimeType; } } private TypeToken(Type type) { this.runtimeType = checkNotNull(type); } /** Returns an instance of type token that wraps {@code type}. */ public static <T> TypeToken<T> of(Class<T> type) { return new SimpleTypeToken<T>(type); } /** Returns an instance of type token that wraps {@code type}. */ public static TypeToken<?> of(Type type) { return new SimpleTypeToken<Object>(type); } /** * Returns the raw type of {@code T}. Formally speaking, if {@code T} is returned by * {@link java.lang.reflect.Method#getGenericReturnType}, the raw type is what's returned by * {@link java.lang.reflect.Method#getReturnType} of the same method object. Specifically: * <ul> * <li>If {@code T} is a {@code Class} itself, {@code T} itself is returned. * <li>If {@code T} is a {@link ParameterizedType}, the raw type of the parameterized type is * returned. * <li>If {@code T} is a {@link GenericArrayType}, the returned type is the corresponding array * class. For example: {@code List<Integer>[] => List[]}. * <li>If {@code T} is a type variable or a wildcard type, the raw type of the first upper bound * is returned. For example: {@code <X extends Foo> => Foo}. * </ul> */ public final Class<? super T> getRawType() { Class<?> rawType = getRawType(runtimeType); @SuppressWarnings("unchecked") // raw type is |T| Class<? super T> result = (Class<? super T>) rawType; return result; } /** * Returns the raw type of the class or parameterized type; if {@code T} is type variable or * wildcard type, the raw types of all its upper bounds are returned. */ private ImmutableSet<Class<? super T>> getImmediateRawTypes() { // Cast from ImmutableSet<Class<?>> to ImmutableSet<Class<? super T>> @SuppressWarnings({"unchecked", "rawtypes"}) ImmutableSet<Class<? super T>> result = (ImmutableSet) getRawTypes(runtimeType); return result; } /** Returns the represented type. */ public final Type getType() { return runtimeType; } /** * <p>Returns a new {@code TypeToken} where type variables represented by {@code typeParam} * are substituted by {@code typeArg}. For example, it can be used to construct * {@code Map<K, V>} for any {@code K} and {@code V} type: <pre> {@code * static <K, V> TypeToken<Map<K, V>> mapOf( * TypeToken<K> keyType, TypeToken<V> valueType) { * return new TypeToken<Map<K, V>>() {} * .where(new TypeParameter<K>() {}, keyType) * .where(new TypeParameter<V>() {}, valueType); * }}</pre> * * @param <X> The parameter type * @param typeParam the parameter type variable * @param typeArg the actual type to substitute */ public final <X> TypeToken<T> where(TypeParameter<X> typeParam, TypeToken<X> typeArg) { TypeResolver resolver = new TypeResolver() .where(ImmutableMap.of(typeParam.typeVariable, typeArg.runtimeType)); // If there's any type error, we'd report now rather than later. return new SimpleTypeToken<T>(resolver.resolveType(runtimeType)); } /** * <p>Returns a new {@code TypeToken} where type variables represented by {@code typeParam} * are substituted by {@code typeArg}. For example, it can be used to construct * {@code Map<K, V>} for any {@code K} and {@code V} type: <pre> {@code * static <K, V> TypeToken<Map<K, V>> mapOf( * Class<K> keyType, Class<V> valueType) { * return new TypeToken<Map<K, V>>() {} * .where(new TypeParameter<K>() {}, keyType) * .where(new TypeParameter<V>() {}, valueType); * }}</pre> * * @param <X> The parameter type * @param typeParam the parameter type variable * @param typeArg the actual type to substitute */ public final <X> TypeToken<T> where(TypeParameter<X> typeParam, Class<X> typeArg) { return where(typeParam, of(typeArg)); } /** * <p>Resolves the given {@code type} against the type context represented by this type. * For example: <pre> {@code * new TypeToken<List<String>>() {}.resolveType( * List.class.getMethod("get", int.class).getGenericReturnType()) * => String.class}</pre> */ public final TypeToken<?> resolveType(Type type) { checkNotNull(type); TypeResolver resolver = typeResolver; if (resolver == null) { resolver = (typeResolver = TypeResolver.accordingTo(runtimeType)); } return of(resolver.resolveType(type)); } private Type[] resolveInPlace(Type[] types) { for (int i = 0; i < types.length; i++) { types[i] = resolveType(types[i]).getType(); } return types; } private TypeToken<?> resolveSupertype(Type type) { TypeToken<?> supertype = resolveType(type); // super types' type mapping is a subset of type mapping of this type. supertype.typeResolver = typeResolver; return supertype; } /** * Returns the generic superclass of this type or {@code null} if the type represents * {@link Object} or an interface. This method is similar but different from {@link * Class#getGenericSuperclass}. For example, {@code * new TypeToken<StringArrayList>() {}.getGenericSuperclass()} will return {@code * new TypeToken<ArrayList<String>>() {}}; while {@code * StringArrayList.class.getGenericSuperclass()} will return {@code ArrayList<E>}, where {@code E} * is the type variable declared by class {@code ArrayList}. * * <p>If this type is a type variable or wildcard, its first upper bound is examined and returned * if the bound is a class or extends from a class. This means that the returned type could be a * type variable too. */ @Nullable final TypeToken<? super T> getGenericSuperclass() { if (runtimeType instanceof TypeVariable) { // First bound is always the super class, if one exists. return boundAsSuperclass(((TypeVariable<?>) runtimeType).getBounds()[0]); } if (runtimeType instanceof WildcardType) { // wildcard has one and only one upper bound. return boundAsSuperclass(((WildcardType) runtimeType).getUpperBounds()[0]); } Type superclass = getRawType().getGenericSuperclass(); if (superclass == null) { return null; } @SuppressWarnings("unchecked") // super class of T TypeToken<? super T> superToken = (TypeToken<? super T>) resolveSupertype(superclass); return superToken; } @Nullable private TypeToken<? super T> boundAsSuperclass(Type bound) { TypeToken<?> token = of(bound); if (token.getRawType().isInterface()) { return null; } @SuppressWarnings("unchecked") // only upper bound of T is passed in. TypeToken<? super T> superclass = (TypeToken<? super T>) token; return superclass; } /** * Returns the generic interfaces that this type directly {@code implements}. This method is * similar but different from {@link Class#getGenericInterfaces()}. For example, {@code * new TypeToken<List<String>>() {}.getGenericInterfaces()} will return a list that contains * {@code new TypeToken<Iterable<String>>() {}}; while {@code List.class.getGenericInterfaces()} * will return an array that contains {@code Iterable<T>}, where the {@code T} is the type * variable declared by interface {@code Iterable}. * * <p>If this type is a type variable or wildcard, its upper bounds are examined and those that * are either an interface or upper-bounded only by interfaces are returned. This means that the * returned types could include type variables too. */ final ImmutableList<TypeToken<? super T>> getGenericInterfaces() { if (runtimeType instanceof TypeVariable) { return boundsAsInterfaces(((TypeVariable<?>) runtimeType).getBounds()); } if (runtimeType instanceof WildcardType) { return boundsAsInterfaces(((WildcardType) runtimeType).getUpperBounds()); } ImmutableList.Builder<TypeToken<? super T>> builder = ImmutableList.builder(); for (Type interfaceType : getRawType().getGenericInterfaces()) { @SuppressWarnings("unchecked") // interface of T TypeToken<? super T> resolvedInterface = (TypeToken<? super T>) resolveSupertype(interfaceType); builder.add(resolvedInterface); } return builder.build(); } private ImmutableList<TypeToken<? super T>> boundsAsInterfaces(Type[] bounds) { ImmutableList.Builder<TypeToken<? super T>> builder = ImmutableList.builder(); for (Type bound : bounds) { @SuppressWarnings("unchecked") // upper bound of T TypeToken<? super T> boundType = (TypeToken<? super T>) of(bound); if (boundType.getRawType().isInterface()) { builder.add(boundType); } } return builder.build(); } /** * Returns the set of interfaces and classes that this type is or is a subtype of. The returned * types are parameterized with proper type arguments. * * <p>Subtypes are always listed before supertypes. But the reverse is not true. A type isn't * necessarily a subtype of all the types following. Order between types without subtype * relationship is arbitrary and not guaranteed. * * <p>If this type is a type variable or wildcard, upper bounds that are themselves type variables * aren't included (their super interfaces and superclasses are). */ public final TypeSet getTypes() { return new TypeSet(); } /** * Returns the generic form of {@code superclass}. For example, if this is * {@code ArrayList<String>}, {@code Iterable<String>} is returned given the * input {@code Iterable.class}. */ public final TypeToken<? super T> getSupertype(Class<? super T> superclass) { checkArgument(superclass.isAssignableFrom(getRawType()), "%s is not a super class of %s", superclass, this); if (runtimeType instanceof TypeVariable) { return getSupertypeFromUpperBounds(superclass, ((TypeVariable<?>) runtimeType).getBounds()); } if (runtimeType instanceof WildcardType) { return getSupertypeFromUpperBounds(superclass, ((WildcardType) runtimeType).getUpperBounds()); } if (superclass.isArray()) { return getArraySupertype(superclass); } @SuppressWarnings("unchecked") // resolved supertype TypeToken<? super T> supertype = (TypeToken<? super T>) resolveSupertype(toGenericType(superclass).runtimeType); return supertype; } /** * Returns subtype of {@code this} with {@code subclass} as the raw class. * For example, if this is {@code Iterable<String>} and {@code subclass} is {@code List}, * {@code List<String>} is returned. */ public final TypeToken<? extends T> getSubtype(Class<?> subclass) { checkArgument(!(runtimeType instanceof TypeVariable), "Cannot get subtype of type variable <%s>", this); if (runtimeType instanceof WildcardType) { return getSubtypeFromLowerBounds(subclass, ((WildcardType) runtimeType).getLowerBounds()); } checkArgument(getRawType().isAssignableFrom(subclass), "%s isn't a subclass of %s", subclass, this); // unwrap array type if necessary if (isArray()) { return getArraySubtype(subclass); } @SuppressWarnings("unchecked") // guarded by the isAssignableFrom() statement above TypeToken<? extends T> subtype = (TypeToken<? extends T>) of(resolveTypeArgsForSubclass(subclass)); return subtype; } /** Returns true if this type is assignable from the given {@code type}. */ public final boolean isAssignableFrom(TypeToken<?> type) { return isAssignableFrom(type.runtimeType); } /** Check if this type is assignable from the given {@code type}. */ public final boolean isAssignableFrom(Type type) { return isAssignable(checkNotNull(type), runtimeType); } /** * Returns true if this type is known to be an array type, such as {@code int[]}, {@code T[]}, * {@code <? extends Map<String, Integer>[]>} etc. */ public final boolean isArray() { return getComponentType() != null; } /** * Returns true if this type is one of the nine primitive types (including {@code void}). * * @since 15.0 */ public final boolean isPrimitive() { return (runtimeType instanceof Class) && ((Class<?>) runtimeType).isPrimitive(); } /** * Returns the corresponding wrapper type if this is a primitive type; otherwise returns * {@code this} itself. Idempotent. * * @since 15.0 */ public final TypeToken<T> wrap() { if (isPrimitive()) { @SuppressWarnings("unchecked") // this is a primitive class Class<T> type = (Class<T>) runtimeType; return TypeToken.of(Primitives.wrap(type)); } return this; } private boolean isWrapper() { return Primitives.allWrapperTypes().contains(runtimeType); } /** * Returns the corresponding primitive type if this is a wrapper type; otherwise returns * {@code this} itself. Idempotent. * * @since 15.0 */ public final TypeToken<T> unwrap() { if (isWrapper()) { @SuppressWarnings("unchecked") // this is a wrapper class Class<T> type = (Class<T>) runtimeType; return TypeToken.of(Primitives.unwrap(type)); } return this; } /** * Returns the array component type if this type represents an array ({@code int[]}, {@code T[]}, * {@code <? extends Map<String, Integer>[]>} etc.), or else {@code null} is returned. */ @Nullable public final TypeToken<?> getComponentType() { Type componentType = Types.getComponentType(runtimeType); if (componentType == null) { return null; } return of(componentType); } /** * Returns the {@link Invokable} for {@code method}, which must be a member of {@code T}. * * @since 14.0 */ public final Invokable<T, Object> method(Method method) { checkArgument(of(method.getDeclaringClass()).isAssignableFrom(this), "%s not declared by %s", method, this); return new Invokable.MethodInvokable<T>(method) { @Override Type getGenericReturnType() { return resolveType(super.getGenericReturnType()).getType(); } @Override Type[] getGenericParameterTypes() { return resolveInPlace(super.getGenericParameterTypes()); } @Override Type[] getGenericExceptionTypes() { return resolveInPlace(super.getGenericExceptionTypes()); } @Override public TypeToken<T> getOwnerType() { return TypeToken.this; } }; } /** * Returns the {@link Invokable} for {@code constructor}, which must be a member of {@code T}. * * @since 14.0 */ public final Invokable<T, T> constructor(Constructor<?> constructor) { checkArgument(constructor.getDeclaringClass() == getRawType(), "%s not declared by %s", constructor, getRawType()); return new Invokable.ConstructorInvokable<T>(constructor) { @Override Type getGenericReturnType() { return resolveType(super.getGenericReturnType()).getType(); } @Override Type[] getGenericParameterTypes() { return resolveInPlace(super.getGenericParameterTypes()); } @Override Type[] getGenericExceptionTypes() { return resolveInPlace(super.getGenericExceptionTypes()); } @Override public TypeToken<T> getOwnerType() { return TypeToken.this; } }; } /** * The set of interfaces and classes that {@code T} is or is a subtype of. {@link Object} is not * included in the set if this type is an interface. */ public class TypeSet extends ForwardingSet<TypeToken<? super T>> implements Serializable { private transient ImmutableSet<TypeToken<? super T>> types; TypeSet() {} /** Returns the types that are interfaces implemented by this type. */ public TypeSet interfaces() { return new InterfaceSet(this); } /** Returns the types that are classes. */ public TypeSet classes() { return new ClassSet(); } @Override protected Set<TypeToken<? super T>> delegate() { ImmutableSet<TypeToken<? super T>> filteredTypes = types; if (filteredTypes == null) { // Java has no way to express ? super T when we parameterize TypeToken vs. Class. @SuppressWarnings({"unchecked", "rawtypes"}) ImmutableList<TypeToken<? super T>> collectedTypes = (ImmutableList) TypeCollector.FOR_GENERIC_TYPE.collectTypes(TypeToken.this); return (types = FluentIterable.from(collectedTypes) .filter(TypeFilter.IGNORE_TYPE_VARIABLE_OR_WILDCARD) .toSet()); } else { return filteredTypes; } } /** Returns the raw types of the types in this set, in the same order. */ public Set<Class<? super T>> rawTypes() { // Java has no way to express ? super T when we parameterize TypeToken vs. Class. @SuppressWarnings({"unchecked", "rawtypes"}) ImmutableList<Class<? super T>> collectedTypes = (ImmutableList) TypeCollector.FOR_RAW_TYPE.collectTypes(getImmediateRawTypes()); return ImmutableSet.copyOf(collectedTypes); } private static final long serialVersionUID = 0; } private final class InterfaceSet extends TypeSet { private transient final TypeSet allTypes; private transient ImmutableSet<TypeToken<? super T>> interfaces; InterfaceSet(TypeSet allTypes) { this.allTypes = allTypes; } @Override protected Set<TypeToken<? super T>> delegate() { ImmutableSet<TypeToken<? super T>> result = interfaces; if (result == null) { return (interfaces = FluentIterable.from(allTypes) .filter(TypeFilter.INTERFACE_ONLY) .toSet()); } else { return result; } } @Override public TypeSet interfaces() { return this; } @Override public Set<Class<? super T>> rawTypes() { // Java has no way to express ? super T when we parameterize TypeToken vs. Class. @SuppressWarnings({"unchecked", "rawtypes"}) ImmutableList<Class<? super T>> collectedTypes = (ImmutableList) TypeCollector.FOR_RAW_TYPE.collectTypes(getImmediateRawTypes()); return FluentIterable.from(collectedTypes) .filter(new Predicate<Class<?>>() { @Override public boolean apply(Class<?> type) { return type.isInterface(); } }) .toSet(); } @Override public TypeSet classes() { throw new UnsupportedOperationException("interfaces().classes() not supported."); } private Object readResolve() { return getTypes().interfaces(); } private static final long serialVersionUID = 0; } private final class ClassSet extends TypeSet { private transient ImmutableSet<TypeToken<? super T>> classes; @Override protected Set<TypeToken<? super T>> delegate() { ImmutableSet<TypeToken<? super T>> result = classes; if (result == null) { @SuppressWarnings({"unchecked", "rawtypes"}) ImmutableList<TypeToken<? super T>> collectedTypes = (ImmutableList) TypeCollector.FOR_GENERIC_TYPE.classesOnly().collectTypes(TypeToken.this); return (classes = FluentIterable.from(collectedTypes) .filter(TypeFilter.IGNORE_TYPE_VARIABLE_OR_WILDCARD) .toSet()); } else { return result; } } @Override public TypeSet classes() { return this; } @Override public Set<Class<? super T>> rawTypes() { // Java has no way to express ? super T when we parameterize TypeToken vs. Class. @SuppressWarnings({"unchecked", "rawtypes"}) ImmutableList<Class<? super T>> collectedTypes = (ImmutableList) TypeCollector.FOR_RAW_TYPE.classesOnly().collectTypes(getImmediateRawTypes()); return ImmutableSet.copyOf(collectedTypes); } @Override public TypeSet interfaces() { throw new UnsupportedOperationException("classes().interfaces() not supported."); } private Object readResolve() { return getTypes().classes(); } private static final long serialVersionUID = 0; } private enum TypeFilter implements Predicate<TypeToken<?>> { IGNORE_TYPE_VARIABLE_OR_WILDCARD { @Override public boolean apply(TypeToken<?> type) { return !(type.runtimeType instanceof TypeVariable || type.runtimeType instanceof WildcardType); } }, INTERFACE_ONLY { @Override public boolean apply(TypeToken<?> type) { return type.getRawType().isInterface(); } } } /** * Returns true if {@code o} is another {@code TypeToken} that represents the same {@link Type}. */ @Override public boolean equals(@Nullable Object o) { if (o instanceof TypeToken) { TypeToken<?> that = (TypeToken<?>) o; return runtimeType.equals(that.runtimeType); } return false; } @Override public int hashCode() { return runtimeType.hashCode(); } @Override public String toString() { return Types.toString(runtimeType); } /** Implemented to support serialization of subclasses. */ protected Object writeReplace() { // TypeResolver just transforms the type to our own impls that are Serializable // except TypeVariable. return of(new TypeResolver().resolveType(runtimeType)); } /** * Ensures that this type token doesn't contain type variables, which can cause unchecked type * errors for callers like {@link TypeToInstanceMap}. */ final TypeToken<T> rejectTypeVariables() { new TypeVisitor() { @Override void visitTypeVariable(TypeVariable<?> type) { throw new IllegalArgumentException( runtimeType + "contains a type variable and is not safe for the operation"); } @Override void visitWildcardType(WildcardType type) { visit(type.getLowerBounds()); visit(type.getUpperBounds()); } @Override void visitParameterizedType(ParameterizedType type) { visit(type.getActualTypeArguments()); visit(type.getOwnerType()); } @Override void visitGenericArrayType(GenericArrayType type) { visit(type.getGenericComponentType()); } }.visit(runtimeType); return this; } private static boolean isAssignable(Type from, Type to) { if (to.equals(from)) { return true; } if (to instanceof WildcardType) { return isAssignableToWildcardType(from, (WildcardType) to); } // if "from" is type variable, it's assignable if any of its "extends" // bounds is assignable to "to". if (from instanceof TypeVariable) { return isAssignableFromAny(((TypeVariable<?>) from).getBounds(), to); } // if "from" is wildcard, it'a assignable to "to" if any of its "extends" // bounds is assignable to "to". if (from instanceof WildcardType) { return isAssignableFromAny(((WildcardType) from).getUpperBounds(), to); } if (from instanceof GenericArrayType) { return isAssignableFromGenericArrayType((GenericArrayType) from, to); } // Proceed to regular Type assignability check if (to instanceof Class) { return isAssignableToClass(from, (Class<?>) to); } else if (to instanceof ParameterizedType) { return isAssignableToParameterizedType(from, (ParameterizedType) to); } else if (to instanceof GenericArrayType) { return isAssignableToGenericArrayType(from, (GenericArrayType) to); } else { // to instanceof TypeVariable return false; } } private static boolean isAssignableFromAny(Type[] fromTypes, Type to) { for (Type from : fromTypes) { if (isAssignable(from, to)) { return true; } } return false; } private static boolean isAssignableToClass(Type from, Class<?> to) { return to.isAssignableFrom(getRawType(from)); } private static boolean isAssignableToWildcardType( Type from, WildcardType to) { // if "to" is <? extends Foo>, "from" can be: // Foo, SubFoo, <? extends Foo>, <? extends SubFoo>, <T extends Foo> or // <T extends SubFoo>. // if "to" is <? super Foo>, "from" can be: // Foo, SuperFoo, <? super Foo> or <? super SuperFoo>. return isAssignable(from, supertypeBound(to)) && isAssignableBySubtypeBound(from, to); } private static boolean isAssignableBySubtypeBound(Type from, WildcardType to) { Type toSubtypeBound = subtypeBound(to); if (toSubtypeBound == null) { return true; } Type fromSubtypeBound = subtypeBound(from); if (fromSubtypeBound == null) { return false; } return isAssignable(toSubtypeBound, fromSubtypeBound); } private static boolean isAssignableToParameterizedType(Type from, ParameterizedType to) { Class<?> matchedClass = getRawType(to); if (!matchedClass.isAssignableFrom(getRawType(from))) { return false; } Type[] typeParams = matchedClass.getTypeParameters(); Type[] toTypeArgs = to.getActualTypeArguments(); TypeToken<?> fromTypeToken = of(from); for (int i = 0; i < typeParams.length; i++) { // If "to" is "List<? extends CharSequence>" // and "from" is StringArrayList, // First step is to figure out StringArrayList "is-a" List<E> and <E> is // String. // typeParams[0] is E and fromTypeToken.get(typeParams[0]) will resolve to // String. // String is then matched against <? extends CharSequence>. Type fromTypeArg = fromTypeToken.resolveType(typeParams[i]).runtimeType; if (!matchTypeArgument(fromTypeArg, toTypeArgs[i])) { return false; } } return true; } private static boolean isAssignableToGenericArrayType(Type from, GenericArrayType to) { if (from instanceof Class) { Class<?> fromClass = (Class<?>) from; if (!fromClass.isArray()) { return false; } return isAssignable(fromClass.getComponentType(), to.getGenericComponentType()); } else if (from instanceof GenericArrayType) { GenericArrayType fromArrayType = (GenericArrayType) from; return isAssignable(fromArrayType.getGenericComponentType(), to.getGenericComponentType()); } else { return false; } } private static boolean isAssignableFromGenericArrayType(GenericArrayType from, Type to) { if (to instanceof Class) { Class<?> toClass = (Class<?>) to; if (!toClass.isArray()) { return toClass == Object.class; // any T[] is assignable to Object } return isAssignable(from.getGenericComponentType(), toClass.getComponentType()); } else if (to instanceof GenericArrayType) { GenericArrayType toArrayType = (GenericArrayType) to; return isAssignable(from.getGenericComponentType(), toArrayType.getGenericComponentType()); } else { return false; } } private static boolean matchTypeArgument(Type from, Type to) { if (from.equals(to)) { return true; } if (to instanceof WildcardType) { return isAssignableToWildcardType(from, (WildcardType) to); } return false; } private static Type supertypeBound(Type type) { if (type instanceof WildcardType) { return supertypeBound((WildcardType) type); } return type; } private static Type supertypeBound(WildcardType type) { Type[] upperBounds = type.getUpperBounds(); if (upperBounds.length == 1) { return supertypeBound(upperBounds[0]); } else if (upperBounds.length == 0) { return Object.class; } else { throw new AssertionError( "There should be at most one upper bound for wildcard type: " + type); } } @Nullable private static Type subtypeBound(Type type) { if (type instanceof WildcardType) { return subtypeBound((WildcardType) type); } else { return type; } } @Nullable private static Type subtypeBound(WildcardType type) { Type[] lowerBounds = type.getLowerBounds(); if (lowerBounds.length == 1) { return subtypeBound(lowerBounds[0]); } else if (lowerBounds.length == 0) { return null; } else { throw new AssertionError( "Wildcard should have at most one lower bound: " + type); } } @VisibleForTesting static Class<?> getRawType(Type type) { // For wildcard or type variable, the first bound determines the runtime type. return getRawTypes(type).iterator().next(); } @VisibleForTesting static ImmutableSet<Class<?>> getRawTypes(Type type) { checkNotNull(type); final ImmutableSet.Builder<Class<?>> builder = ImmutableSet.builder(); new TypeVisitor() { @Override void visitTypeVariable(TypeVariable<?> t) { visit(t.getBounds()); } @Override void visitWildcardType(WildcardType t) { visit(t.getUpperBounds()); } @Override void visitParameterizedType(ParameterizedType t) { builder.add((Class<?>) t.getRawType()); } @Override void visitClass(Class<?> t) { builder.add(t); } @Override void visitGenericArrayType(GenericArrayType t) { builder.add(Types.getArrayClass(getRawType(t.getGenericComponentType()))); } }.visit(type); return builder.build(); } /** * Returns the type token representing the generic type declaration of {@code cls}. For example: * {@code TypeToken.getGenericType(Iterable.class)} returns {@code Iterable<T>}. * * <p>If {@code cls} isn't parameterized and isn't a generic array, the type token of the class is * returned. */ @VisibleForTesting static <T> TypeToken<? extends T> toGenericType(Class<T> cls) { if (cls.isArray()) { Type arrayOfGenericType = Types.newArrayType( // If we are passed with int[].class, don't turn it to GenericArrayType toGenericType(cls.getComponentType()).runtimeType); @SuppressWarnings("unchecked") // array is covariant TypeToken<? extends T> result = (TypeToken<? extends T>) of(arrayOfGenericType); return result; } TypeVariable<Class<T>>[] typeParams = cls.getTypeParameters(); if (typeParams.length > 0) { @SuppressWarnings("unchecked") // Like, it's Iterable<T> for Iterable.class TypeToken<? extends T> type = (TypeToken<? extends T>) of(Types.newParameterizedType(cls, typeParams)); return type; } else { return of(cls); } } private TypeToken<? super T> getSupertypeFromUpperBounds( Class<? super T> supertype, Type[] upperBounds) { for (Type upperBound : upperBounds) { @SuppressWarnings("unchecked") // T's upperbound is <? super T>. TypeToken<? super T> bound = (TypeToken<? super T>) of(upperBound); if (of(supertype).isAssignableFrom(bound)) { @SuppressWarnings({"rawtypes", "unchecked"}) // guarded by the isAssignableFrom check. TypeToken<? super T> result = bound.getSupertype((Class) supertype); return result; } } throw new IllegalArgumentException(supertype + " isn't a super type of " + this); } private TypeToken<? extends T> getSubtypeFromLowerBounds(Class<?> subclass, Type[] lowerBounds) { for (Type lowerBound : lowerBounds) { @SuppressWarnings("unchecked") // T's lower bound is <? extends T> TypeToken<? extends T> bound = (TypeToken<? extends T>) of(lowerBound); // Java supports only one lowerbound anyway. return bound.getSubtype(subclass); } throw new IllegalArgumentException(subclass + " isn't a subclass of " + this); } private TypeToken<? super T> getArraySupertype(Class<? super T> supertype) { // with component type, we have lost generic type information // Use raw type so that compiler allows us to call getSupertype() @SuppressWarnings("rawtypes") TypeToken componentType = checkNotNull(getComponentType(), "%s isn't a super type of %s", supertype, this); // array is covariant. component type is super type, so is the array type. @SuppressWarnings("unchecked") // going from raw type back to generics TypeToken<?> componentSupertype = componentType.getSupertype(supertype.getComponentType()); @SuppressWarnings("unchecked") // component type is super type, so is array type. TypeToken<? super T> result = (TypeToken<? super T>) // If we are passed with int[].class, don't turn it to GenericArrayType of(newArrayClassOrGenericArrayType(componentSupertype.runtimeType)); return result; } private TypeToken<? extends T> getArraySubtype(Class<?> subclass) { // array is covariant. component type is subtype, so is the array type. TypeToken<?> componentSubtype = getComponentType() .getSubtype(subclass.getComponentType()); @SuppressWarnings("unchecked") // component type is subtype, so is array type. TypeToken<? extends T> result = (TypeToken<? extends T>) // If we are passed with int[].class, don't turn it to GenericArrayType of(newArrayClassOrGenericArrayType(componentSubtype.runtimeType)); return result; } private Type resolveTypeArgsForSubclass(Class<?> subclass) { if (runtimeType instanceof Class) { // no resolution needed return subclass; } // class Base<A, B> {} // class Sub<X, Y> extends Base<X, Y> {} // Base<String, Integer>.subtype(Sub.class): // Sub<X, Y>.getSupertype(Base.class) => Base<X, Y> // => X=String, Y=Integer // => Sub<X, Y>=Sub<String, Integer> TypeToken<?> genericSubtype = toGenericType(subclass); @SuppressWarnings({"rawtypes", "unchecked"}) // subclass isn't <? extends T> Type supertypeWithArgsFromSubtype = genericSubtype .getSupertype((Class) getRawType()) .runtimeType; return new TypeResolver().where(supertypeWithArgsFromSubtype, runtimeType) .resolveType(genericSubtype.runtimeType); } /** * Creates an array class if {@code componentType} is a class, or else, a * {@link GenericArrayType}. This is what Java7 does for generic array type * parameters. */ private static Type newArrayClassOrGenericArrayType(Type componentType) { return Types.JavaVersion.JAVA7.newArrayType(componentType); } private static final class SimpleTypeToken<T> extends TypeToken<T> { SimpleTypeToken(Type type) { super(type); } private static final long serialVersionUID = 0; } /** * Collects parent types from a sub type. * * @param <K> The type "kind". Either a TypeToken, or Class. */ private abstract static class TypeCollector<K> { static final TypeCollector<TypeToken<?>> FOR_GENERIC_TYPE = new TypeCollector<TypeToken<?>>() { @Override Class<?> getRawType(TypeToken<?> type) { return type.getRawType(); } @Override Iterable<? extends TypeToken<?>> getInterfaces(TypeToken<?> type) { return type.getGenericInterfaces(); } @Nullable @Override TypeToken<?> getSuperclass(TypeToken<?> type) { return type.getGenericSuperclass(); } }; static final TypeCollector<Class<?>> FOR_RAW_TYPE = new TypeCollector<Class<?>>() { @Override Class<?> getRawType(Class<?> type) { return type; } @Override Iterable<? extends Class<?>> getInterfaces(Class<?> type) { return Arrays.asList(type.getInterfaces()); } @Nullable @Override Class<?> getSuperclass(Class<?> type) { return type.getSuperclass(); } }; /** For just classes, we don't have to traverse interfaces. */ final TypeCollector<K> classesOnly() { return new ForwardingTypeCollector<K>(this) { @Override Iterable<? extends K> getInterfaces(K type) { return ImmutableSet.of(); } @Override ImmutableList<K> collectTypes(Iterable<? extends K> types) { ImmutableList.Builder<K> builder = ImmutableList.builder(); for (K type : types) { if (!getRawType(type).isInterface()) { builder.add(type); } } return super.collectTypes(builder.build()); } }; } final ImmutableList<K> collectTypes(K type) { return collectTypes(ImmutableList.of(type)); } ImmutableList<K> collectTypes(Iterable<? extends K> types) { // type -> order number. 1 for Object, 2 for anything directly below, so on so forth. Map<K, Integer> map = Maps.newHashMap(); for (K type : types) { collectTypes(type, map); } return sortKeysByValue(map, Ordering.natural().reverse()); } /** Collects all types to map, and returns the total depth from T up to Object. */ private int collectTypes(K type, Map<? super K, Integer> map) { Integer existing = map.get(this); if (existing != null) { // short circuit: if set contains type it already contains its supertypes return existing; } int aboveMe = getRawType(type).isInterface() ? 1 // interfaces should be listed before Object : 0; for (K interfaceType : getInterfaces(type)) { aboveMe = Math.max(aboveMe, collectTypes(interfaceType, map)); } K superclass = getSuperclass(type); if (superclass != null) { aboveMe = Math.max(aboveMe, collectTypes(superclass, map)); } /* * TODO(benyu): should we include Object for interface? * Also, CharSequence[] and Object[] for String[]? * */ map.put(type, aboveMe + 1); return aboveMe + 1; } private static <K, V> ImmutableList<K> sortKeysByValue( final Map<K, V> map, final Comparator<? super V> valueComparator) { Ordering<K> keyOrdering = new Ordering<K>() { @Override public int compare(K left, K right) { return valueComparator.compare(map.get(left), map.get(right)); } }; return keyOrdering.immutableSortedCopy(map.keySet()); } abstract Class<?> getRawType(K type); abstract Iterable<? extends K> getInterfaces(K type); @Nullable abstract K getSuperclass(K type); private static class ForwardingTypeCollector<K> extends TypeCollector<K> { private final TypeCollector<K> delegate; ForwardingTypeCollector(TypeCollector<K> delegate) { this.delegate = delegate; } @Override Class<?> getRawType(K type) { return delegate.getRawType(type); } @Override Iterable<? extends K> getInterfaces(K type) { return delegate.getInterfaces(type); } @Override K getSuperclass(K type) { return delegate.getSuperclass(type); } } } }
Java
/* * Copyright (C) 2013 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.reflect; import com.google.common.collect.Sets; import java.lang.reflect.GenericArrayType; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.lang.reflect.WildcardType; import java.util.Set; import javax.annotation.concurrent.NotThreadSafe; /** * Based on what a {@link Type} is, dispatch it to the corresponding {@code visit*} method. By * default, no recursion is done for type arguments or type bounds. But subclasses can opt to do * recursion by calling {@link #visit} for any {@code Type} while visitation is in progress. For * example, this can be used to reject wildcards or type variables contained in a type as in: * * <pre> {@code * new TypeVisitor() { * protected void visitParameterizedType(ParameterizedType t) { * visit(t.getOwnerType()); * visit(t.getActualTypeArguments()); * } * protected void visitGenericArrayType(GenericArrayType t) { * visit(t.getGenericComponentType()); * } * protected void visitTypeVariable(TypeVariable<?> t) { * throw new IllegalArgumentException("Cannot contain type variable."); * } * protected void visitWildcardType(WildcardType t) { * throw new IllegalArgumentException("Cannot contain wildcard type."); * } * }.visit(type);}</pre> * * <p>One {@code Type} is visited at most once. The second time the same type is visited, it's * ignored by {@link #visit}. This avoids infinite recursion caused by recursive type bounds. * * <p>This class is <em>not</em> thread safe. * * @author Ben Yu */ @NotThreadSafe abstract class TypeVisitor { private final Set<Type> visited = Sets.newHashSet(); /** * Visits the given types. Null types are ignored. This allows subclasses to call * {@code visit(parameterizedType.getOwnerType())} safely without having to check nulls. */ public final void visit(Type... types) { for (Type type : types) { if (type == null || !visited.add(type)) { // null owner type, or already visited; continue; } boolean succeeded = false; try { if (type instanceof TypeVariable) { visitTypeVariable((TypeVariable<?>) type); } else if (type instanceof WildcardType) { visitWildcardType((WildcardType) type); } else if (type instanceof ParameterizedType) { visitParameterizedType((ParameterizedType) type); } else if (type instanceof Class) { visitClass((Class<?>) type); } else if (type instanceof GenericArrayType) { visitGenericArrayType((GenericArrayType) type); } else { throw new AssertionError("Unknown type: " + type); } succeeded = true; } finally { if (!succeeded) { // When the visitation failed, we don't want to ignore the second. visited.remove(type); } } } } void visitClass(Class<?> t) {} void visitGenericArrayType(GenericArrayType t) {} void visitParameterizedType(ParameterizedType t) {} void visitTypeVariable(TypeVariable<?> t) {} void visitWildcardType(WildcardType t) {} }
Java
/* * Copyright (C) 2012 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.reflect; import com.google.common.annotations.Beta; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import javax.annotation.Nullable; /** * Abstract implementation of {@link InvocationHandler} that handles {@link Object#equals}, * {@link Object#hashCode} and {@link Object#toString}. For example: <pre> * class Unsupported extends AbstractInvocationHandler { * protected Object handleInvocation( * Object proxy, Method method, Object[] args) { * throw new UnsupportedOperationException(); * } * } * * CharSequence unsupported = Reflection.newProxy(CharSequence.class, new Unsupported()); * </pre> * * @author Ben Yu * @since 12.0 */ @Beta public abstract class AbstractInvocationHandler implements InvocationHandler { private static final Object[] NO_ARGS = {}; /** * {@inheritDoc} * * <p><ul> * <li>{@code proxy.hashCode()} delegates to {@link AbstractInvocationHandler#hashCode} * <li>{@code proxy.toString()} delegates to {@link AbstractInvocationHandler#toString} * <li>{@code proxy.equals(argument)} returns true if: <ul> * <li>{@code proxy} and {@code argument} are of the same type * <li>and {@link AbstractInvocationHandler#equals} returns true for the {@link * InvocationHandler} of {@code argument} * </ul> * <li>other method calls are dispatched to {@link #handleInvocation}. * </ul> */ @Override public final Object invoke(Object proxy, Method method, @Nullable Object[] args) throws Throwable { if (args == null) { args = NO_ARGS; } if (args.length == 0 && method.getName().equals("hashCode")) { return hashCode(); } if (args.length == 1 && method.getName().equals("equals") && method.getParameterTypes()[0] == Object.class) { Object arg = args[0]; return proxy.getClass().isInstance(arg) && equals(Proxy.getInvocationHandler(arg)); } if (args.length == 0 && method.getName().equals("toString")) { return toString(); } return handleInvocation(proxy, method, args); } /** * {@link #invoke} delegates to this method upon any method invocation on the proxy instance, * except {@link Object#equals}, {@link Object#hashCode} and {@link Object#toString}. The result * will be returned as the proxied method's return value. * * <p>Unlike {@link #invoke}, {@code args} will never be null. When the method has no parameter, * an empty array is passed in. */ protected abstract Object handleInvocation(Object proxy, Method method, Object[] args) throws Throwable; /** * By default delegates to {@link Object#equals} so instances are only equal if they are * identical. {@code proxy.equals(argument)} returns true if: <ul> * <li>{@code proxy} and {@code argument} are of the same type * <li>and this method returns true for the {@link InvocationHandler} of {@code argument} * </ul> * <p>Subclasses can override this method to provide custom equality. */ @Override public boolean equals(Object obj) { return super.equals(obj); } /** * By default delegates to {@link Object#hashCode}. The dynamic proxies' {@code hashCode()} will * delegate to this method. Subclasses can override this method to provide custom equality. */ @Override public int hashCode() { return super.hashCode(); } /** * By default delegates to {@link Object#toString}. The dynamic proxies' {@code toString()} will * delegate to this method. Subclasses can override this method to provide custom string * representation for the proxies. */ @Override public String toString() { return super.toString(); } }
Java
/* * Copyright (C) 2012 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.reflect; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.base.Function; import com.google.common.collect.ForwardingMap; import com.google.common.collect.ForwardingMapEntry; import com.google.common.collect.ForwardingSet; import com.google.common.collect.Iterators; import com.google.common.collect.Maps; import java.util.Iterator; import java.util.Map; import java.util.Set; import javax.annotation.Nullable; /** * A mutable type-to-instance map. * See also {@link ImmutableTypeToInstanceMap}. * * @author Ben Yu * @since 13.0 */ @Beta public final class MutableTypeToInstanceMap<B> extends ForwardingMap<TypeToken<? extends B>, B> implements TypeToInstanceMap<B> { private final Map<TypeToken<? extends B>, B> backingMap = Maps.newHashMap(); @Nullable @Override public <T extends B> T getInstance(Class<T> type) { return trustedGet(TypeToken.of(type)); } @Nullable @Override public <T extends B> T putInstance(Class<T> type, @Nullable T value) { return trustedPut(TypeToken.of(type), value); } @Nullable @Override public <T extends B> T getInstance(TypeToken<T> type) { return trustedGet(type.rejectTypeVariables()); } @Nullable @Override public <T extends B> T putInstance(TypeToken<T> type, @Nullable T value) { return trustedPut(type.rejectTypeVariables(), value); } /** Not supported. Use {@link #putInstance} instead. */ @Override public B put(TypeToken<? extends B> key, B value) { throw new UnsupportedOperationException("Please use putInstance() instead."); } /** Not supported. Use {@link #putInstance} instead. */ @Override public void putAll(Map<? extends TypeToken<? extends B>, ? extends B> map) { throw new UnsupportedOperationException("Please use putInstance() instead."); } @Override public Set<Entry<TypeToken<? extends B>, B>> entrySet() { return UnmodifiableEntry.transformEntries(super.entrySet()); } @Override protected Map<TypeToken<? extends B>, B> delegate() { return backingMap; } @SuppressWarnings("unchecked") // value could not get in if not a T @Nullable private <T extends B> T trustedPut(TypeToken<T> type, @Nullable T value) { return (T) backingMap.put(type, value); } @SuppressWarnings("unchecked") // value could not get in if not a T @Nullable private <T extends B> T trustedGet(TypeToken<T> type) { return (T) backingMap.get(type); } private static final class UnmodifiableEntry<K, V> extends ForwardingMapEntry<K, V> { private final Entry<K, V> delegate; static <K, V> Set<Entry<K, V>> transformEntries(final Set<Entry<K, V>> entries) { return new ForwardingSet<Map.Entry<K, V>>() { @Override protected Set<Entry<K, V>> delegate() { return entries; } @Override public Iterator<Entry<K, V>> iterator() { return UnmodifiableEntry.transformEntries(super.iterator()); } @Override public Object[] toArray() { return standardToArray(); } @Override public <T> T[] toArray(T[] array) { return standardToArray(array); } }; } private static <K, V> Iterator<Entry<K, V>> transformEntries(Iterator<Entry<K, V>> entries) { return Iterators.transform(entries, new Function<Entry<K, V>, Entry<K, V>>() { @Override public Entry<K, V> apply(Entry<K, V> entry) { return new UnmodifiableEntry<K, V>(entry); } }); } private UnmodifiableEntry(java.util.Map.Entry<K, V> delegate) { this.delegate = checkNotNull(delegate); } @Override protected Entry<K, V> delegate() { return delegate; } @Override public V setValue(V value) { throw new UnsupportedOperationException(); } } }
Java
/* * Copyright (C) 2005 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.reflect; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Proxy; /** * Static utilities relating to Java reflection. * * @since 12.0 */ @Beta public final class Reflection { /** * Returns the package name of {@code clazz} according to the Java Language Specification (section * 6.7). Unlike {@link Class#getPackage}, this method only parses the class name, without * attempting to define the {@link Package} and hence load files. */ public static String getPackageName(Class<?> clazz) { return getPackageName(clazz.getName()); } /** * Returns the package name of {@code classFullName} according to the Java Language Specification * (section 6.7). Unlike {@link Class#getPackage}, this method only parses the class name, without * attempting to define the {@link Package} and hence load files. */ public static String getPackageName(String classFullName) { int lastDot = classFullName.lastIndexOf('.'); return (lastDot < 0) ? "" : classFullName.substring(0, lastDot); } /** * Ensures that the given classes are initialized, as described in * <a href="http://java.sun.com/docs/books/jls/third_edition/html/execution.html#12.4.2"> * JLS Section 12.4.2</a>. * * <p>WARNING: Normally it's a smell if a class needs to be explicitly initialized, because static * state hurts system maintainability and testability. In cases when you have no choice while * inter-operating with a legacy framework, this method helps to keep the code less ugly. * * @throws ExceptionInInitializerError if an exception is thrown during * initialization of a class */ public static void initialize(Class<?>... classes) { for (Class<?> clazz : classes) { try { Class.forName(clazz.getName(), true, clazz.getClassLoader()); } catch (ClassNotFoundException e) { throw new AssertionError(e); } } } /** * Returns a proxy instance that implements {@code interfaceType} by * dispatching method invocations to {@code handler}. The class loader of * {@code interfaceType} will be used to define the proxy class. To implement * multiple interfaces or specify a class loader, use * {@link Proxy#newProxyInstance}. * * @throws IllegalArgumentException if {@code interfaceType} does not specify * the type of a Java interface */ public static <T> T newProxy( Class<T> interfaceType, InvocationHandler handler) { checkNotNull(handler); checkArgument(interfaceType.isInterface(), "%s is not an interface", interfaceType); Object object = Proxy.newProxyInstance( interfaceType.getClassLoader(), new Class<?>[] { interfaceType }, handler); return interfaceType.cast(object); } private Reflection() {} }
Java
/* * Copyright (C) 2012 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.reflect; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Splitter; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.Maps; import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import java.io.File; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.net.URLClassLoader; import java.util.Enumeration; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; import java.util.jar.Attributes; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.jar.Manifest; import java.util.logging.Logger; import javax.annotation.Nullable; /** * Scans the source of a {@link ClassLoader} and finds all loadable classes and resources. * * @author Ben Yu * @since 14.0 */ @Beta public final class ClassPath { private static final Logger logger = Logger.getLogger(ClassPath.class.getName()); /** Separator for the Class-Path manifest attribute value in jar files. */ private static final Splitter CLASS_PATH_ATTRIBUTE_SEPARATOR = Splitter.on(" ").omitEmptyStrings(); private static final String CLASS_FILE_NAME_EXTENSION = ".class"; private final ImmutableSet<ResourceInfo> resources; private ClassPath(ImmutableSet<ResourceInfo> resources) { this.resources = resources; } /** * Returns a {@code ClassPath} representing all classes and resources loadable from {@code * classloader} and its parent class loaders. * * <p>Currently only {@link URLClassLoader} and only {@code file://} urls are supported. * * @throws IOException if the attempt to read class path resources (jar files or directories) * failed. */ public static ClassPath from(ClassLoader classloader) throws IOException { Scanner scanner = new Scanner(); for (Map.Entry<URI, ClassLoader> entry : getClassPathEntries(classloader).entrySet()) { scanner.scan(entry.getKey(), entry.getValue()); } return new ClassPath(scanner.getResources()); } /** * Returns all resources loadable from the current class path, including the class files of all * loadable classes but excluding the "META-INF/MANIFEST.MF" file. */ public ImmutableSet<ResourceInfo> getResources() { return resources; } /** Returns all top level classes loadable from the current class path. */ public ImmutableSet<ClassInfo> getTopLevelClasses() { return FluentIterable.from(resources).filter(ClassInfo.class).toSet(); } /** Returns all top level classes whose package name is {@code packageName}. */ public ImmutableSet<ClassInfo> getTopLevelClasses(String packageName) { checkNotNull(packageName); ImmutableSet.Builder<ClassInfo> builder = ImmutableSet.builder(); for (ClassInfo classInfo : getTopLevelClasses()) { if (classInfo.getPackageName().equals(packageName)) { builder.add(classInfo); } } return builder.build(); } /** * Returns all top level classes whose package name is {@code packageName} or starts with * {@code packageName} followed by a '.'. */ public ImmutableSet<ClassInfo> getTopLevelClassesRecursive(String packageName) { checkNotNull(packageName); String packagePrefix = packageName + '.'; ImmutableSet.Builder<ClassInfo> builder = ImmutableSet.builder(); for (ClassInfo classInfo : getTopLevelClasses()) { if (classInfo.getName().startsWith(packagePrefix)) { builder.add(classInfo); } } return builder.build(); } /** * Represents a class path resource that can be either a class file or any other resource file * loadable from the class path. * * @since 14.0 */ @Beta public static class ResourceInfo { private final String resourceName; final ClassLoader loader; static ResourceInfo of(String resourceName, ClassLoader loader) { if (resourceName.endsWith(CLASS_FILE_NAME_EXTENSION) && !resourceName.contains("$")) { return new ClassInfo(resourceName, loader); } else { return new ResourceInfo(resourceName, loader); } } ResourceInfo(String resourceName, ClassLoader loader) { this.resourceName = checkNotNull(resourceName); this.loader = checkNotNull(loader); } /** Returns the url identifying the resource. */ public final URL url() { return checkNotNull(loader.getResource(resourceName), "Failed to load resource: %s", resourceName); } /** Returns the fully qualified name of the resource. Such as "com/mycomp/foo/bar.txt". */ public final String getResourceName() { return resourceName; } @Override public int hashCode() { return resourceName.hashCode(); } @Override public boolean equals(Object obj) { if (obj instanceof ResourceInfo) { ResourceInfo that = (ResourceInfo) obj; return resourceName.equals(that.resourceName) && loader == that.loader; } return false; } // Do not change this arbitrarily. We rely on it for sorting ResourceInfo. @Override public String toString() { return resourceName; } } /** * Represents a class that can be loaded through {@link #load}. * * @since 14.0 */ @Beta public static final class ClassInfo extends ResourceInfo { private final String className; ClassInfo(String resourceName, ClassLoader loader) { super(resourceName, loader); this.className = getClassName(resourceName); } /** Returns the package name of the class, without attempting to load the class. */ public String getPackageName() { return Reflection.getPackageName(className); } /** Returns the simple name of the underlying class as given in the source code. */ public String getSimpleName() { String packageName = getPackageName(); if (packageName.isEmpty()) { return className; } // Since this is a top level class, its simple name is always the part after package name. return className.substring(packageName.length() + 1); } /** Returns the fully qualified name of the class. */ public String getName() { return className; } /** * Loads (but doesn't link or initialize) the class. * * @throws LinkageError when there were errors in loading classes that this class depends on. * For example, {@link NoClassDefFoundError}. */ public Class<?> load() { try { return loader.loadClass(className); } catch (ClassNotFoundException e) { // Shouldn't happen, since the class name is read from the class path. throw new IllegalStateException(e); } } @Override public String toString() { return className; } } @VisibleForTesting static ImmutableMap<URI, ClassLoader> getClassPathEntries( ClassLoader classloader) { LinkedHashMap<URI, ClassLoader> entries = Maps.newLinkedHashMap(); // Search parent first, since it's the order ClassLoader#loadClass() uses. ClassLoader parent = classloader.getParent(); if (parent != null) { entries.putAll(getClassPathEntries(parent)); } if (classloader instanceof URLClassLoader) { URLClassLoader urlClassLoader = (URLClassLoader) classloader; for (URL entry : urlClassLoader.getURLs()) { URI uri; try { uri = entry.toURI(); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } if (!entries.containsKey(uri)) { entries.put(uri, classloader); } } } return ImmutableMap.copyOf(entries); } @VisibleForTesting static final class Scanner { private final ImmutableSortedSet.Builder<ResourceInfo> resources = new ImmutableSortedSet.Builder<ResourceInfo>(Ordering.usingToString()); private final Set<URI> scannedUris = Sets.newHashSet(); ImmutableSortedSet<ResourceInfo> getResources() { return resources.build(); } void scan(URI uri, ClassLoader classloader) throws IOException { if (uri.getScheme().equals("file") && scannedUris.add(uri)) { scanFrom(new File(uri), classloader); } } @VisibleForTesting void scanFrom(File file, ClassLoader classloader) throws IOException { if (!file.exists()) { return; } if (file.isDirectory()) { scanDirectory(file, classloader); } else { scanJar(file, classloader); } } private void scanDirectory(File directory, ClassLoader classloader) throws IOException { scanDirectory(directory, classloader, "", ImmutableSet.<File>of()); } private void scanDirectory( File directory, ClassLoader classloader, String packagePrefix, ImmutableSet<File> ancestors) throws IOException { File canonical = directory.getCanonicalFile(); if (ancestors.contains(canonical)) { // A cycle in the filesystem, for example due to a symbolic link. return; } File[] files = directory.listFiles(); if (files == null) { logger.warning("Cannot read directory " + directory); // IO error, just skip the directory return; } ImmutableSet<File> newAncestors = ImmutableSet.<File>builder() .addAll(ancestors) .add(canonical) .build(); for (File f : files) { String name = f.getName(); if (f.isDirectory()) { scanDirectory(f, classloader, packagePrefix + name + "/", newAncestors); } else { String resourceName = packagePrefix + name; if (!resourceName.equals(JarFile.MANIFEST_NAME)) { resources.add(ResourceInfo.of(resourceName, classloader)); } } } } private void scanJar(File file, ClassLoader classloader) throws IOException { JarFile jarFile; try { jarFile = new JarFile(file); } catch (IOException e) { // Not a jar file return; } try { for (URI uri : getClassPathFromManifest(file, jarFile.getManifest())) { scan(uri, classloader); } Enumeration<JarEntry> entries = jarFile.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); if (entry.isDirectory() || entry.getName().equals(JarFile.MANIFEST_NAME)) { continue; } resources.add(ResourceInfo.of(entry.getName(), classloader)); } } finally { try { jarFile.close(); } catch (IOException ignored) {} } } /** * Returns the class path URIs specified by the {@code Class-Path} manifest attribute, according * to <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#Main%20Attributes"> * JAR File Specification</a>. If {@code manifest} is null, it means the jar file has no * manifest, and an empty set will be returned. */ @VisibleForTesting static ImmutableSet<URI> getClassPathFromManifest( File jarFile, @Nullable Manifest manifest) { if (manifest == null) { return ImmutableSet.of(); } ImmutableSet.Builder<URI> builder = ImmutableSet.builder(); String classpathAttribute = manifest.getMainAttributes() .getValue(Attributes.Name.CLASS_PATH.toString()); if (classpathAttribute != null) { for (String path : CLASS_PATH_ATTRIBUTE_SEPARATOR.split(classpathAttribute)) { URI uri; try { uri = getClassPathEntry(jarFile, path); } catch (URISyntaxException e) { // Ignore bad entry logger.warning("Invalid Class-Path entry: " + path); continue; } builder.add(uri); } } return builder.build(); } /** * Returns the absolute uri of the Class-Path entry value as specified in * <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#Main%20Attributes"> * JAR File Specification</a>. Even though the specification only talks about relative urls, * absolute urls are actually supported too (for example, in Maven surefire plugin). */ @VisibleForTesting static URI getClassPathEntry(File jarFile, String path) throws URISyntaxException { URI uri = new URI(path); if (uri.isAbsolute()) { return uri; } else { return new File(jarFile.getParentFile(), path.replace('/', File.separatorChar)).toURI(); } } } @VisibleForTesting static String getClassName(String filename) { int classNameEnd = filename.length() - CLASS_FILE_NAME_EXTENSION.length(); return filename.substring(0, classNameEnd).replace('/', '.'); } }
Java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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.primitives; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import javax.annotation.CheckForNull; /** * Static utility methods derived from Android's {@code Integer.java}. */ final class AndroidInteger { /** * See {@link Ints#tryParse(String)} for the public interface. */ @CheckForNull static Integer tryParse(String string) { return tryParse(string, 10); } /** * See {@link Ints#tryParse(String, int)} for the public interface. */ @CheckForNull static Integer tryParse(String string, int radix) { checkNotNull(string); checkArgument(radix >= Character.MIN_RADIX, "Invalid radix %s, min radix is %s", radix, Character.MIN_RADIX); checkArgument(radix <= Character.MAX_RADIX, "Invalid radix %s, max radix is %s", radix, Character.MAX_RADIX); int length = string.length(), i = 0; if (length == 0) { return null; } boolean negative = string.charAt(i) == '-'; if (negative && ++i == length) { return null; } return tryParse(string, i, radix, negative); } @CheckForNull private static Integer tryParse(String string, int offset, int radix, boolean negative) { int max = Integer.MIN_VALUE / radix; int result = 0, length = string.length(); while (offset < length) { int digit = Character.digit(string.charAt(offset++), radix); if (digit == -1) { return null; } if (max > result) { return null; } int next = result * radix - digit; if (next > result) { return null; } result = next; } if (!negative) { result = -result; if (result < 0) { return null; } } // For GWT where ints do not overflow if (result > Integer.MAX_VALUE || result < Integer.MIN_VALUE) { return null; } return result; } private AndroidInteger() {} }
Java
/* * 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.primitives; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkElementIndex; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkPositionIndexes; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import java.io.Serializable; import java.util.AbstractList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.RandomAccess; import javax.annotation.CheckForNull; /** * Static utility methods pertaining to {@code int} primitives, that are not * already found in either {@link Integer} or {@link Arrays}. * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/PrimitivesExplained"> * primitive utilities</a>. * * @author Kevin Bourrillion * @since 1.0 */ @GwtCompatible(emulated = true) public final class Ints { private Ints() {} /** * The number of bytes required to represent a primitive {@code int} * value. */ public static final int BYTES = Integer.SIZE / Byte.SIZE; /** * The largest power of two that can be represented as an {@code int}. * * @since 10.0 */ public static final int MAX_POWER_OF_TWO = 1 << (Integer.SIZE - 2); /** * Returns a hash code for {@code value}; equal to the result of invoking * {@code ((Integer) value).hashCode()}. * * @param value a primitive {@code int} value * @return a hash code for the value */ public static int hashCode(int value) { return value; } /** * Returns the {@code int} value that is equal to {@code value}, if possible. * * @param value any value in the range of the {@code int} type * @return the {@code int} value that equals {@code value} * @throws IllegalArgumentException if {@code value} is greater than {@link * Integer#MAX_VALUE} or less than {@link Integer#MIN_VALUE} */ public static int checkedCast(long value) { int result = (int) value; checkArgument(result == value, "Out of range: %s", value); return result; } /** * Returns the {@code int} nearest in value to {@code value}. * * @param value any {@code long} value * @return the same value cast to {@code int} if it is in the range of the * {@code int} type, {@link Integer#MAX_VALUE} if it is too large, * or {@link Integer#MIN_VALUE} if it is too small */ public static int saturatedCast(long value) { if (value > Integer.MAX_VALUE) { return Integer.MAX_VALUE; } if (value < Integer.MIN_VALUE) { return Integer.MIN_VALUE; } return (int) value; } /** * Compares the two specified {@code int} values. The sign of the value * returned is the same as that of {@code ((Integer) a).compareTo(b)}. * * @param a the first {@code int} to compare * @param b the second {@code int} to compare * @return a negative value if {@code a} is less than {@code b}; a positive * value if {@code a} is greater than {@code b}; or zero if they are equal */ public static int compare(int a, int b) { return (a < b) ? -1 : ((a > b) ? 1 : 0); } /** * Returns {@code true} if {@code target} is present as an element anywhere in * {@code array}. * * @param array an array of {@code int} values, possibly empty * @param target a primitive {@code int} value * @return {@code true} if {@code array[i] == target} for some value of {@code * i} */ public static boolean contains(int[] array, int target) { for (int value : array) { if (value == target) { return true; } } return false; } /** * Returns the index of the first appearance of the value {@code target} in * {@code array}. * * @param array an array of {@code int} values, possibly empty * @param target a primitive {@code int} value * @return the least index {@code i} for which {@code array[i] == target}, or * {@code -1} if no such index exists. */ public static int indexOf(int[] array, int target) { return indexOf(array, target, 0, array.length); } // TODO(kevinb): consider making this public private static int indexOf( int[] array, int target, int start, int end) { for (int i = start; i < end; i++) { if (array[i] == target) { return i; } } return -1; } /** * Returns the start position of the first occurrence of the specified {@code * target} within {@code array}, or {@code -1} if there is no such occurrence. * * <p>More formally, returns the lowest index {@code i} such that {@code * java.util.Arrays.copyOfRange(array, i, i + target.length)} contains exactly * the same elements as {@code target}. * * @param array the array to search for the sequence {@code target} * @param target the array to search for as a sub-sequence of {@code array} */ public static int indexOf(int[] array, int[] target) { checkNotNull(array, "array"); checkNotNull(target, "target"); if (target.length == 0) { return 0; } outer: for (int i = 0; i < array.length - target.length + 1; i++) { for (int j = 0; j < target.length; j++) { if (array[i + j] != target[j]) { continue outer; } } return i; } return -1; } /** * Returns the index of the last appearance of the value {@code target} in * {@code array}. * * @param array an array of {@code int} values, possibly empty * @param target a primitive {@code int} value * @return the greatest index {@code i} for which {@code array[i] == target}, * or {@code -1} if no such index exists. */ public static int lastIndexOf(int[] array, int target) { return lastIndexOf(array, target, 0, array.length); } // TODO(kevinb): consider making this public private static int lastIndexOf( int[] array, int target, int start, int end) { for (int i = end - 1; i >= start; i--) { if (array[i] == target) { return i; } } return -1; } /** * Returns the least value present in {@code array}. * * @param array a <i>nonempty</i> array of {@code int} values * @return the value present in {@code array} that is less than or equal to * every other value in the array * @throws IllegalArgumentException if {@code array} is empty */ public static int min(int... array) { checkArgument(array.length > 0); int min = array[0]; for (int i = 1; i < array.length; i++) { if (array[i] < min) { min = array[i]; } } return min; } /** * Returns the greatest value present in {@code array}. * * @param array a <i>nonempty</i> array of {@code int} values * @return the value present in {@code array} that is greater than or equal to * every other value in the array * @throws IllegalArgumentException if {@code array} is empty */ public static int max(int... array) { checkArgument(array.length > 0); int max = array[0]; for (int i = 1; i < array.length; i++) { if (array[i] > max) { max = array[i]; } } return max; } /** * Returns the values from each provided array combined into a single array. * For example, {@code concat(new int[] {a, b}, new int[] {}, new * int[] {c}} returns the array {@code {a, b, c}}. * * @param arrays zero or more {@code int} arrays * @return a single array containing all the values from the source arrays, in * order */ public static int[] concat(int[]... arrays) { int length = 0; for (int[] array : arrays) { length += array.length; } int[] result = new int[length]; int pos = 0; for (int[] array : arrays) { System.arraycopy(array, 0, result, pos, array.length); pos += array.length; } return result; } /** * Returns a big-endian representation of {@code value} in a 4-element byte * array; equivalent to {@code ByteBuffer.allocate(4).putInt(value).array()}. * For example, the input value {@code 0x12131415} would yield the byte array * {@code {0x12, 0x13, 0x14, 0x15}}. * * <p>If you need to convert and concatenate several values (possibly even of * different types), use a shared {@link java.nio.ByteBuffer} instance, or use * {@link com.google.common.io.ByteStreams#newDataOutput()} to get a growable * buffer. */ @GwtIncompatible("doesn't work") public static byte[] toByteArray(int value) { return new byte[] { (byte) (value >> 24), (byte) (value >> 16), (byte) (value >> 8), (byte) value}; } /** * Returns the {@code int} value whose big-endian representation is stored in * the first 4 bytes of {@code bytes}; equivalent to {@code * ByteBuffer.wrap(bytes).getInt()}. For example, the input byte array {@code * {0x12, 0x13, 0x14, 0x15, 0x33}} would yield the {@code int} value {@code * 0x12131415}. * * <p>Arguably, it's preferable to use {@link java.nio.ByteBuffer}; that * library exposes much more flexibility at little cost in readability. * * @throws IllegalArgumentException if {@code bytes} has fewer than 4 elements */ @GwtIncompatible("doesn't work") public static int fromByteArray(byte[] bytes) { checkArgument(bytes.length >= BYTES, "array too small: %s < %s", bytes.length, BYTES); return fromBytes(bytes[0], bytes[1], bytes[2], bytes[3]); } /** * Returns the {@code int} value whose byte representation is the given 4 * bytes, in big-endian order; equivalent to {@code Ints.fromByteArray(new * byte[] {b1, b2, b3, b4})}. * * @since 7.0 */ @GwtIncompatible("doesn't work") public static int fromBytes(byte b1, byte b2, byte b3, byte b4) { return b1 << 24 | (b2 & 0xFF) << 16 | (b3 & 0xFF) << 8 | (b4 & 0xFF); } /** * Returns an array containing the same values as {@code array}, but * guaranteed to be of a specified minimum length. If {@code array} already * has a length of at least {@code minLength}, it is returned directly. * Otherwise, a new array of size {@code minLength + padding} is returned, * containing the values of {@code array}, and zeroes in the remaining places. * * @param array the source array * @param minLength the minimum length the returned array must guarantee * @param padding an extra amount to "grow" the array by if growth is * necessary * @throws IllegalArgumentException if {@code minLength} or {@code padding} is * negative * @return an array containing the values of {@code array}, with guaranteed * minimum length {@code minLength} */ public static int[] ensureCapacity( int[] array, int minLength, int padding) { checkArgument(minLength >= 0, "Invalid minLength: %s", minLength); checkArgument(padding >= 0, "Invalid padding: %s", padding); return (array.length < minLength) ? copyOf(array, minLength + padding) : array; } // Arrays.copyOf() requires Java 6 private static int[] copyOf(int[] original, int length) { int[] copy = new int[length]; System.arraycopy(original, 0, copy, 0, Math.min(original.length, length)); return copy; } /** * Returns a string containing the supplied {@code int} values separated * by {@code separator}. For example, {@code join("-", 1, 2, 3)} returns * the string {@code "1-2-3"}. * * @param separator the text that should appear between consecutive values in * the resulting string (but not at the start or end) * @param array an array of {@code int} values, possibly empty */ public static String join(String separator, int... array) { checkNotNull(separator); if (array.length == 0) { return ""; } // For pre-sizing a builder, just get the right order of magnitude StringBuilder builder = new StringBuilder(array.length * 5); builder.append(array[0]); for (int i = 1; i < array.length; i++) { builder.append(separator).append(array[i]); } return builder.toString(); } /** * Returns a comparator that compares two {@code int} arrays * lexicographically. That is, it compares, using {@link * #compare(int, int)}), the first pair of values that follow any * common prefix, or when one array is a prefix of the other, treats the * shorter array as the lesser. For example, {@code [] < [1] < [1, 2] < [2]}. * * <p>The returned comparator is inconsistent with {@link * Object#equals(Object)} (since arrays support only identity equality), but * it is consistent with {@link Arrays#equals(int[], int[])}. * * @see <a href="http://en.wikipedia.org/wiki/Lexicographical_order"> * Lexicographical order article at Wikipedia</a> * @since 2.0 */ public static Comparator<int[]> lexicographicalComparator() { return LexicographicalComparator.INSTANCE; } private enum LexicographicalComparator implements Comparator<int[]> { INSTANCE; @Override public int compare(int[] left, int[] right) { int minLength = Math.min(left.length, right.length); for (int i = 0; i < minLength; i++) { int result = Ints.compare(left[i], right[i]); if (result != 0) { return result; } } return left.length - right.length; } } /** * Returns an array containing each value of {@code collection}, converted to * a {@code int} value in the manner of {@link Number#intValue}. * * <p>Elements are copied from the argument collection as if by {@code * collection.toArray()}. Calling this method is as thread-safe as calling * that method. * * @param collection a collection of {@code Number} instances * @return an array containing the same values as {@code collection}, in the * same order, converted to primitives * @throws NullPointerException if {@code collection} or any of its elements * is null * @since 1.0 (parameter was {@code Collection<Integer>} before 12.0) */ public static int[] toArray(Collection<? extends Number> collection) { if (collection instanceof IntArrayAsList) { return ((IntArrayAsList) collection).toIntArray(); } Object[] boxedArray = collection.toArray(); int len = boxedArray.length; int[] array = new int[len]; for (int i = 0; i < len; i++) { // checkNotNull for GWT (do not optimize) array[i] = ((Number) checkNotNull(boxedArray[i])).intValue(); } return array; } /** * Returns a fixed-size list backed by the specified array, similar to {@link * Arrays#asList(Object[])}. The list supports {@link List#set(int, Object)}, * but any attempt to set a value to {@code null} will result in a {@link * NullPointerException}. * * <p>The returned list maintains the values, but not the identities, of * {@code Integer} objects written to or read from it. For example, whether * {@code list.get(0) == list.get(0)} is true for the returned list is * unspecified. * * @param backingArray the array to back the list * @return a list view of the array */ public static List<Integer> asList(int... backingArray) { if (backingArray.length == 0) { return Collections.emptyList(); } return new IntArrayAsList(backingArray); } @GwtCompatible private static class IntArrayAsList extends AbstractList<Integer> implements RandomAccess, Serializable { final int[] array; final int start; final int end; IntArrayAsList(int[] array) { this(array, 0, array.length); } IntArrayAsList(int[] array, int start, int end) { this.array = array; this.start = start; this.end = end; } @Override public int size() { return end - start; } @Override public boolean isEmpty() { return false; } @Override public Integer get(int index) { checkElementIndex(index, size()); return array[start + index]; } @Override public boolean contains(Object target) { // Overridden to prevent a ton of boxing return (target instanceof Integer) && Ints.indexOf(array, (Integer) target, start, end) != -1; } @Override public int indexOf(Object target) { // Overridden to prevent a ton of boxing if (target instanceof Integer) { int i = Ints.indexOf(array, (Integer) target, start, end); if (i >= 0) { return i - start; } } return -1; } @Override public int lastIndexOf(Object target) { // Overridden to prevent a ton of boxing if (target instanceof Integer) { int i = Ints.lastIndexOf(array, (Integer) target, start, end); if (i >= 0) { return i - start; } } return -1; } @Override public Integer set(int index, Integer element) { checkElementIndex(index, size()); int oldValue = array[start + index]; // checkNotNull for GWT (do not optimize) array[start + index] = checkNotNull(element); return oldValue; } @Override public List<Integer> subList(int fromIndex, int toIndex) { int size = size(); checkPositionIndexes(fromIndex, toIndex, size); if (fromIndex == toIndex) { return Collections.emptyList(); } return new IntArrayAsList(array, start + fromIndex, start + toIndex); } @Override public boolean equals(Object object) { if (object == this) { return true; } if (object instanceof IntArrayAsList) { IntArrayAsList that = (IntArrayAsList) object; int size = size(); if (that.size() != size) { return false; } for (int i = 0; i < size; i++) { if (array[start + i] != that.array[that.start + i]) { return false; } } return true; } return super.equals(object); } @Override public int hashCode() { int result = 1; for (int i = start; i < end; i++) { result = 31 * result + Ints.hashCode(array[i]); } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(size() * 5); builder.append('[').append(array[start]); for (int i = start + 1; i < end; i++) { builder.append(", ").append(array[i]); } return builder.append(']').toString(); } int[] toIntArray() { // Arrays.copyOfRange() is not available under GWT int size = size(); int[] result = new int[size]; System.arraycopy(array, start, result, 0, size); return result; } private static final long serialVersionUID = 0; } /** * Parses the specified string as a signed decimal integer value. The ASCII * character {@code '-'} (<code>'&#92;u002D'</code>) is recognized as the * minus sign. * * <p>Unlike {@link Integer#parseInt(String)}, this method returns * {@code null} instead of throwing an exception if parsing fails. * * <p>Note that strings prefixed with ASCII {@code '+'} are rejected, even * under JDK 7, despite the change to {@link Integer#parseInt(String)} for * that version. * * @param string the string representation of an integer value * @return the integer value represented by {@code string}, or {@code null} if * {@code string} has a length of zero or cannot be parsed as an integer * value * @since 11.0 */ @Beta @CheckForNull @GwtIncompatible("TODO") public static Integer tryParse(String string) { return AndroidInteger.tryParse(string, 10); } }
Java
/* * 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.primitives; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkElementIndex; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkPositionIndexes; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import java.io.Serializable; import java.util.AbstractList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.RandomAccess; /** * Static utility methods pertaining to {@code char} primitives, that are not * already found in either {@link Character} or {@link Arrays}. * * <p>All the operations in this class treat {@code char} values strictly * numerically; they are neither Unicode-aware nor locale-dependent. * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/PrimitivesExplained"> * primitive utilities</a>. * * @author Kevin Bourrillion * @since 1.0 */ @GwtCompatible(emulated = true) public final class Chars { private Chars() {} /** * The number of bytes required to represent a primitive {@code char} * value. */ public static final int BYTES = Character.SIZE / Byte.SIZE; /** * Returns a hash code for {@code value}; equal to the result of invoking * {@code ((Character) value).hashCode()}. * * @param value a primitive {@code char} value * @return a hash code for the value */ public static int hashCode(char value) { return value; } /** * Returns the {@code char} value that is equal to {@code value}, if possible. * * @param value any value in the range of the {@code char} type * @return the {@code char} value that equals {@code value} * @throws IllegalArgumentException if {@code value} is greater than {@link * Character#MAX_VALUE} or less than {@link Character#MIN_VALUE} */ public static char checkedCast(long value) { char result = (char) value; checkArgument(result == value, "Out of range: %s", value); return result; } /** * Returns the {@code char} nearest in value to {@code value}. * * @param value any {@code long} value * @return the same value cast to {@code char} if it is in the range of the * {@code char} type, {@link Character#MAX_VALUE} if it is too large, * or {@link Character#MIN_VALUE} if it is too small */ public static char saturatedCast(long value) { if (value > Character.MAX_VALUE) { return Character.MAX_VALUE; } if (value < Character.MIN_VALUE) { return Character.MIN_VALUE; } return (char) value; } /** * Compares the two specified {@code char} values. The sign of the value * returned is the same as that of {@code ((Character) a).compareTo(b)}. * * @param a the first {@code char} to compare * @param b the second {@code char} to compare * @return a negative value if {@code a} is less than {@code b}; a positive * value if {@code a} is greater than {@code b}; or zero if they are equal */ public static int compare(char a, char b) { return a - b; // safe due to restricted range } /** * Returns {@code true} if {@code target} is present as an element anywhere in * {@code array}. * * @param array an array of {@code char} values, possibly empty * @param target a primitive {@code char} value * @return {@code true} if {@code array[i] == target} for some value of {@code * i} */ public static boolean contains(char[] array, char target) { for (char value : array) { if (value == target) { return true; } } return false; } /** * Returns the index of the first appearance of the value {@code target} in * {@code array}. * * @param array an array of {@code char} values, possibly empty * @param target a primitive {@code char} value * @return the least index {@code i} for which {@code array[i] == target}, or * {@code -1} if no such index exists. */ public static int indexOf(char[] array, char target) { return indexOf(array, target, 0, array.length); } // TODO(kevinb): consider making this public private static int indexOf( char[] array, char target, int start, int end) { for (int i = start; i < end; i++) { if (array[i] == target) { return i; } } return -1; } /** * Returns the start position of the first occurrence of the specified {@code * target} within {@code array}, or {@code -1} if there is no such occurrence. * * <p>More formally, returns the lowest index {@code i} such that {@code * java.util.Arrays.copyOfRange(array, i, i + target.length)} contains exactly * the same elements as {@code target}. * * @param array the array to search for the sequence {@code target} * @param target the array to search for as a sub-sequence of {@code array} */ public static int indexOf(char[] array, char[] target) { checkNotNull(array, "array"); checkNotNull(target, "target"); if (target.length == 0) { return 0; } outer: for (int i = 0; i < array.length - target.length + 1; i++) { for (int j = 0; j < target.length; j++) { if (array[i + j] != target[j]) { continue outer; } } return i; } return -1; } /** * Returns the index of the last appearance of the value {@code target} in * {@code array}. * * @param array an array of {@code char} values, possibly empty * @param target a primitive {@code char} value * @return the greatest index {@code i} for which {@code array[i] == target}, * or {@code -1} if no such index exists. */ public static int lastIndexOf(char[] array, char target) { return lastIndexOf(array, target, 0, array.length); } // TODO(kevinb): consider making this public private static int lastIndexOf( char[] array, char target, int start, int end) { for (int i = end - 1; i >= start; i--) { if (array[i] == target) { return i; } } return -1; } /** * Returns the least value present in {@code array}. * * @param array a <i>nonempty</i> array of {@code char} values * @return the value present in {@code array} that is less than or equal to * every other value in the array * @throws IllegalArgumentException if {@code array} is empty */ public static char min(char... array) { checkArgument(array.length > 0); char min = array[0]; for (int i = 1; i < array.length; i++) { if (array[i] < min) { min = array[i]; } } return min; } /** * Returns the greatest value present in {@code array}. * * @param array a <i>nonempty</i> array of {@code char} values * @return the value present in {@code array} that is greater than or equal to * every other value in the array * @throws IllegalArgumentException if {@code array} is empty */ public static char max(char... array) { checkArgument(array.length > 0); char max = array[0]; for (int i = 1; i < array.length; i++) { if (array[i] > max) { max = array[i]; } } return max; } /** * Returns the values from each provided array combined into a single array. * For example, {@code concat(new char[] {a, b}, new char[] {}, new * char[] {c}} returns the array {@code {a, b, c}}. * * @param arrays zero or more {@code char} arrays * @return a single array containing all the values from the source arrays, in * order */ public static char[] concat(char[]... arrays) { int length = 0; for (char[] array : arrays) { length += array.length; } char[] result = new char[length]; int pos = 0; for (char[] array : arrays) { System.arraycopy(array, 0, result, pos, array.length); pos += array.length; } return result; } /** * Returns a big-endian representation of {@code value} in a 2-element byte * array; equivalent to {@code * ByteBuffer.allocate(2).putChar(value).array()}. For example, the input * value {@code '\\u5432'} would yield the byte array {@code {0x54, 0x32}}. * * <p>If you need to convert and concatenate several values (possibly even of * different types), use a shared {@link java.nio.ByteBuffer} instance, or use * {@link com.google.common.io.ByteStreams#newDataOutput()} to get a growable * buffer. */ @GwtIncompatible("doesn't work") public static byte[] toByteArray(char value) { return new byte[] { (byte) (value >> 8), (byte) value}; } /** * Returns the {@code char} value whose big-endian representation is * stored in the first 2 bytes of {@code bytes}; equivalent to {@code * ByteBuffer.wrap(bytes).getChar()}. For example, the input byte array * {@code {0x54, 0x32}} would yield the {@code char} value {@code '\\u5432'}. * * <p>Arguably, it's preferable to use {@link java.nio.ByteBuffer}; that * library exposes much more flexibility at little cost in readability. * * @throws IllegalArgumentException if {@code bytes} has fewer than 2 * elements */ @GwtIncompatible("doesn't work") public static char fromByteArray(byte[] bytes) { checkArgument(bytes.length >= BYTES, "array too small: %s < %s", bytes.length, BYTES); return fromBytes(bytes[0], bytes[1]); } /** * Returns the {@code char} value whose byte representation is the given 2 * bytes, in big-endian order; equivalent to {@code Chars.fromByteArray(new * byte[] {b1, b2})}. * * @since 7.0 */ @GwtIncompatible("doesn't work") public static char fromBytes(byte b1, byte b2) { return (char) ((b1 << 8) | (b2 & 0xFF)); } /** * Returns an array containing the same values as {@code array}, but * guaranteed to be of a specified minimum length. If {@code array} already * has a length of at least {@code minLength}, it is returned directly. * Otherwise, a new array of size {@code minLength + padding} is returned, * containing the values of {@code array}, and zeroes in the remaining places. * * @param array the source array * @param minLength the minimum length the returned array must guarantee * @param padding an extra amount to "grow" the array by if growth is * necessary * @throws IllegalArgumentException if {@code minLength} or {@code padding} is * negative * @return an array containing the values of {@code array}, with guaranteed * minimum length {@code minLength} */ public static char[] ensureCapacity( char[] array, int minLength, int padding) { checkArgument(minLength >= 0, "Invalid minLength: %s", minLength); checkArgument(padding >= 0, "Invalid padding: %s", padding); return (array.length < minLength) ? copyOf(array, minLength + padding) : array; } // Arrays.copyOf() requires Java 6 private static char[] copyOf(char[] original, int length) { char[] copy = new char[length]; System.arraycopy(original, 0, copy, 0, Math.min(original.length, length)); return copy; } /** * Returns a string containing the supplied {@code char} values separated * by {@code separator}. For example, {@code join("-", '1', '2', '3')} returns * the string {@code "1-2-3"}. * * @param separator the text that should appear between consecutive values in * the resulting string (but not at the start or end) * @param array an array of {@code char} values, possibly empty */ public static String join(String separator, char... array) { checkNotNull(separator); int len = array.length; if (len == 0) { return ""; } StringBuilder builder = new StringBuilder(len + separator.length() * (len - 1)); builder.append(array[0]); for (int i = 1; i < len; i++) { builder.append(separator).append(array[i]); } return builder.toString(); } /** * Returns a comparator that compares two {@code char} arrays * lexicographically. That is, it compares, using {@link * #compare(char, char)}), the first pair of values that follow any * common prefix, or when one array is a prefix of the other, treats the * shorter array as the lesser. For example, * {@code [] < ['a'] < ['a', 'b'] < ['b']}. * * <p>The returned comparator is inconsistent with {@link * Object#equals(Object)} (since arrays support only identity equality), but * it is consistent with {@link Arrays#equals(char[], char[])}. * * @see <a href="http://en.wikipedia.org/wiki/Lexicographical_order"> * Lexicographical order article at Wikipedia</a> * @since 2.0 */ public static Comparator<char[]> lexicographicalComparator() { return LexicographicalComparator.INSTANCE; } private enum LexicographicalComparator implements Comparator<char[]> { INSTANCE; @Override public int compare(char[] left, char[] right) { int minLength = Math.min(left.length, right.length); for (int i = 0; i < minLength; i++) { int result = Chars.compare(left[i], right[i]); if (result != 0) { return result; } } return left.length - right.length; } } /** * Copies a collection of {@code Character} instances into a new array of * primitive {@code char} values. * * <p>Elements are copied from the argument collection as if by {@code * collection.toArray()}. Calling this method is as thread-safe as calling * that method. * * @param collection a collection of {@code Character} objects * @return an array containing the same values as {@code collection}, in the * same order, converted to primitives * @throws NullPointerException if {@code collection} or any of its elements * is null */ public static char[] toArray(Collection<Character> collection) { if (collection instanceof CharArrayAsList) { return ((CharArrayAsList) collection).toCharArray(); } Object[] boxedArray = collection.toArray(); int len = boxedArray.length; char[] array = new char[len]; for (int i = 0; i < len; i++) { // checkNotNull for GWT (do not optimize) array[i] = (Character) checkNotNull(boxedArray[i]); } return array; } /** * Returns a fixed-size list backed by the specified array, similar to {@link * Arrays#asList(Object[])}. The list supports {@link List#set(int, Object)}, * but any attempt to set a value to {@code null} will result in a {@link * NullPointerException}. * * <p>The returned list maintains the values, but not the identities, of * {@code Character} objects written to or read from it. For example, whether * {@code list.get(0) == list.get(0)} is true for the returned list is * unspecified. * * @param backingArray the array to back the list * @return a list view of the array */ public static List<Character> asList(char... backingArray) { if (backingArray.length == 0) { return Collections.emptyList(); } return new CharArrayAsList(backingArray); } @GwtCompatible private static class CharArrayAsList extends AbstractList<Character> implements RandomAccess, Serializable { final char[] array; final int start; final int end; CharArrayAsList(char[] array) { this(array, 0, array.length); } CharArrayAsList(char[] array, int start, int end) { this.array = array; this.start = start; this.end = end; } @Override public int size() { return end - start; } @Override public boolean isEmpty() { return false; } @Override public Character get(int index) { checkElementIndex(index, size()); return array[start + index]; } @Override public boolean contains(Object target) { // Overridden to prevent a ton of boxing return (target instanceof Character) && Chars.indexOf(array, (Character) target, start, end) != -1; } @Override public int indexOf(Object target) { // Overridden to prevent a ton of boxing if (target instanceof Character) { int i = Chars.indexOf(array, (Character) target, start, end); if (i >= 0) { return i - start; } } return -1; } @Override public int lastIndexOf(Object target) { // Overridden to prevent a ton of boxing if (target instanceof Character) { int i = Chars.lastIndexOf(array, (Character) target, start, end); if (i >= 0) { return i - start; } } return -1; } @Override public Character set(int index, Character element) { checkElementIndex(index, size()); char oldValue = array[start + index]; // checkNotNull for GWT (do not optimize) array[start + index] = checkNotNull(element); return oldValue; } @Override public List<Character> subList(int fromIndex, int toIndex) { int size = size(); checkPositionIndexes(fromIndex, toIndex, size); if (fromIndex == toIndex) { return Collections.emptyList(); } return new CharArrayAsList(array, start + fromIndex, start + toIndex); } @Override public boolean equals(Object object) { if (object == this) { return true; } if (object instanceof CharArrayAsList) { CharArrayAsList that = (CharArrayAsList) object; int size = size(); if (that.size() != size) { return false; } for (int i = 0; i < size; i++) { if (array[start + i] != that.array[that.start + i]) { return false; } } return true; } return super.equals(object); } @Override public int hashCode() { int result = 1; for (int i = start; i < end; i++) { result = 31 * result + Chars.hashCode(array[i]); } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(size() * 3); builder.append('[').append(array[start]); for (int i = start + 1; i < end; i++) { builder.append(", ").append(array[i]); } return builder.append(']').toString(); } char[] toCharArray() { // Arrays.copyOfRange() is not available under GWT int size = size(); char[] result = new char[size]; System.arraycopy(array, start, result, 0, size); return result; } private static final long serialVersionUID = 0; } }
Java
/* * 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.primitives; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.Beta; import com.google.common.annotations.VisibleForTesting; import sun.misc.Unsafe; import java.nio.ByteOrder; import java.util.Comparator; /** * Static utility methods pertaining to {@code byte} primitives that interpret * values as <i>unsigned</i> (that is, any negative value {@code b} is treated * as the positive value {@code 256 + b}). The corresponding methods that treat * the values as signed are found in {@link SignedBytes}, and the methods for * which signedness is not an issue are in {@link Bytes}. * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/PrimitivesExplained"> * primitive utilities</a>. * * @author Kevin Bourrillion * @author Martin Buchholz * @author Hiroshi Yamauchi * @author Louis Wasserman * @since 1.0 */ public final class UnsignedBytes { private UnsignedBytes() {} /** * The largest power of two that can be represented as an unsigned {@code * byte}. * * @since 10.0 */ public static final byte MAX_POWER_OF_TWO = (byte) 0x80; /** * The largest value that fits into an unsigned byte. * * @since 13.0 */ public static final byte MAX_VALUE = (byte) 0xFF; private static final int UNSIGNED_MASK = 0xFF; /** * Returns the value of the given byte as an integer, when treated as * unsigned. That is, returns {@code value + 256} if {@code value} is * negative; {@code value} itself otherwise. * * @since 6.0 */ public static int toInt(byte value) { return value & UNSIGNED_MASK; } /** * Returns the {@code byte} value that, when treated as unsigned, is equal to * {@code value}, if possible. * * @param value a value between 0 and 255 inclusive * @return the {@code byte} value that, when treated as unsigned, equals * {@code value} * @throws IllegalArgumentException if {@code value} is negative or greater * than 255 */ public static byte checkedCast(long value) { checkArgument(value >> Byte.SIZE == 0, "out of range: %s", value); return (byte) value; } /** * Returns the {@code byte} value that, when treated as unsigned, is nearest * in value to {@code value}. * * @param value any {@code long} value * @return {@code (byte) 255} if {@code value >= 255}, {@code (byte) 0} if * {@code value <= 0}, and {@code value} cast to {@code byte} otherwise */ public static byte saturatedCast(long value) { if (value > toInt(MAX_VALUE)) { return MAX_VALUE; // -1 } if (value < 0) { return (byte) 0; } return (byte) value; } /** * Compares the two specified {@code byte} values, treating them as unsigned * values between 0 and 255 inclusive. For example, {@code (byte) -127} is * considered greater than {@code (byte) 127} because it is seen as having * the value of positive {@code 129}. * * @param a the first {@code byte} to compare * @param b the second {@code byte} to compare * @return a negative value if {@code a} is less than {@code b}; a positive * value if {@code a} is greater than {@code b}; or zero if they are equal */ public static int compare(byte a, byte b) { return toInt(a) - toInt(b); } /** * Returns the least value present in {@code array}. * * @param array a <i>nonempty</i> array of {@code byte} values * @return the value present in {@code array} that is less than or equal to * every other value in the array * @throws IllegalArgumentException if {@code array} is empty */ public static byte min(byte... array) { checkArgument(array.length > 0); int min = toInt(array[0]); for (int i = 1; i < array.length; i++) { int next = toInt(array[i]); if (next < min) { min = next; } } return (byte) min; } /** * Returns the greatest value present in {@code array}. * * @param array a <i>nonempty</i> array of {@code byte} values * @return the value present in {@code array} that is greater than or equal * to every other value in the array * @throws IllegalArgumentException if {@code array} is empty */ public static byte max(byte... array) { checkArgument(array.length > 0); int max = toInt(array[0]); for (int i = 1; i < array.length; i++) { int next = toInt(array[i]); if (next > max) { max = next; } } return (byte) max; } /** * Returns a string representation of x, where x is treated as unsigned. * * @since 13.0 */ @Beta public static String toString(byte x) { return toString(x, 10); } /** * Returns a string representation of {@code x} for the given radix, where {@code x} is treated * as unsigned. * * @param x the value to convert to a string. * @param radix the radix to use while working with {@code x} * @throws IllegalArgumentException if {@code radix} is not between {@link Character#MIN_RADIX} * and {@link Character#MAX_RADIX}. * @since 13.0 */ @Beta public static String toString(byte x, int radix) { checkArgument(radix >= Character.MIN_RADIX && radix <= Character.MAX_RADIX, "radix (%s) must be between Character.MIN_RADIX and Character.MAX_RADIX", radix); // Benchmarks indicate this is probably not worth optimizing. return Integer.toString(toInt(x), radix); } /** * Returns the unsigned {@code byte} value represented by the given decimal string. * * @throws NumberFormatException if the string does not contain a valid unsigned {@code byte} * value * @throws NullPointerException if {@code s} is null * (in contrast to {@link Byte#parseByte(String)}) * @since 13.0 */ @Beta public static byte parseUnsignedByte(String string) { return parseUnsignedByte(string, 10); } /** * Returns the unsigned {@code byte} value represented by a string with the given radix. * * @param string the string containing the unsigned {@code byte} representation to be parsed. * @param radix the radix to use while parsing {@code string} * @throws NumberFormatException if the string does not contain a valid unsigned {@code byte} * with the given radix, or if {@code radix} is not between {@link Character#MIN_RADIX} * and {@link Character#MAX_RADIX}. * @throws NullPointerException if {@code s} is null * (in contrast to {@link Byte#parseByte(String)}) * @since 13.0 */ @Beta public static byte parseUnsignedByte(String string, int radix) { int parse = Integer.parseInt(checkNotNull(string), radix); // We need to throw a NumberFormatException, so we have to duplicate checkedCast. =( if (parse >> Byte.SIZE == 0) { return (byte) parse; } else { throw new NumberFormatException("out of range: " + parse); } } /** * Returns a string containing the supplied {@code byte} values separated by * {@code separator}. For example, {@code join(":", (byte) 1, (byte) 2, * (byte) 255)} returns the string {@code "1:2:255"}. * * @param separator the text that should appear between consecutive values in * the resulting string (but not at the start or end) * @param array an array of {@code byte} values, possibly empty */ public static String join(String separator, byte... array) { checkNotNull(separator); if (array.length == 0) { return ""; } // For pre-sizing a builder, just get the right order of magnitude StringBuilder builder = new StringBuilder(array.length * (3 + separator.length())); builder.append(toInt(array[0])); for (int i = 1; i < array.length; i++) { builder.append(separator).append(toString(array[i])); } return builder.toString(); } /** * Returns a comparator that compares two {@code byte} arrays * lexicographically. That is, it compares, using {@link * #compare(byte, byte)}), the first pair of values that follow any common * prefix, or when one array is a prefix of the other, treats the shorter * array as the lesser. For example, {@code [] < [0x01] < [0x01, 0x7F] < * [0x01, 0x80] < [0x02]}. Values are treated as unsigned. * * <p>The returned comparator is inconsistent with {@link * Object#equals(Object)} (since arrays support only identity equality), but * it is consistent with {@link java.util.Arrays#equals(byte[], byte[])}. * * @see <a href="http://en.wikipedia.org/wiki/Lexicographical_order"> * Lexicographical order article at Wikipedia</a> * @since 2.0 */ public static Comparator<byte[]> lexicographicalComparator() { return LexicographicalComparatorHolder.BEST_COMPARATOR; } @VisibleForTesting static Comparator<byte[]> lexicographicalComparatorJavaImpl() { return LexicographicalComparatorHolder.PureJavaComparator.INSTANCE; } /** * Provides a lexicographical comparator implementation; either a Java * implementation or a faster implementation based on {@link Unsafe}. * * <p>Uses reflection to gracefully fall back to the Java implementation if * {@code Unsafe} isn't available. */ @VisibleForTesting static class LexicographicalComparatorHolder { static final String UNSAFE_COMPARATOR_NAME = LexicographicalComparatorHolder.class.getName() + "$UnsafeComparator"; static final Comparator<byte[]> BEST_COMPARATOR = getBestComparator(); @VisibleForTesting enum UnsafeComparator implements Comparator<byte[]> { INSTANCE; static final boolean BIG_ENDIAN = ByteOrder.nativeOrder().equals(ByteOrder.BIG_ENDIAN); /* * The following static final fields exist for performance reasons. * * In UnsignedBytesBenchmark, accessing the following objects via static * final fields is the fastest (more than twice as fast as the Java * implementation, vs ~1.5x with non-final static fields, on x86_32) * under the Hotspot server compiler. The reason is obviously that the * non-final fields need to be reloaded inside the loop. * * And, no, defining (final or not) local variables out of the loop still * isn't as good because the null check on the theUnsafe object remains * inside the loop and BYTE_ARRAY_BASE_OFFSET doesn't get * constant-folded. * * The compiler can treat static final fields as compile-time constants * and can constant-fold them while (final or not) local variables are * run time values. */ static final Unsafe theUnsafe; /** The offset to the first element in a byte array. */ static final int BYTE_ARRAY_BASE_OFFSET; static { theUnsafe = getUnsafe(); BYTE_ARRAY_BASE_OFFSET = theUnsafe.arrayBaseOffset(byte[].class); // sanity check - this should never fail if (theUnsafe.arrayIndexScale(byte[].class) != 1) { throw new AssertionError(); } } /** * Returns a sun.misc.Unsafe. Suitable for use in a 3rd party package. * Replace with a simple call to Unsafe.getUnsafe when integrating * into a jdk. * * @return a sun.misc.Unsafe */ private static sun.misc.Unsafe getUnsafe() { try { return sun.misc.Unsafe.getUnsafe(); } catch (SecurityException tryReflectionInstead) {} try { return java.security.AccessController.doPrivileged (new java.security.PrivilegedExceptionAction<sun.misc.Unsafe>() { public sun.misc.Unsafe run() throws Exception { Class<sun.misc.Unsafe> k = sun.misc.Unsafe.class; for (java.lang.reflect.Field f : k.getDeclaredFields()) { f.setAccessible(true); Object x = f.get(null); if (k.isInstance(x)) return k.cast(x); } throw new NoSuchFieldError("the Unsafe"); }}); } catch (java.security.PrivilegedActionException e) { throw new RuntimeException("Could not initialize intrinsics", e.getCause()); } } @Override public int compare(byte[] left, byte[] right) { int minLength = Math.min(left.length, right.length); int minWords = minLength / Longs.BYTES; /* * Compare 8 bytes at a time. Benchmarking shows comparing 8 bytes at a * time is no slower than comparing 4 bytes at a time even on 32-bit. * On the other hand, it is substantially faster on 64-bit. */ for (int i = 0; i < minWords * Longs.BYTES; i += Longs.BYTES) { long lw = theUnsafe.getLong(left, BYTE_ARRAY_BASE_OFFSET + (long) i); long rw = theUnsafe.getLong(right, BYTE_ARRAY_BASE_OFFSET + (long) i); if (lw != rw) { if (BIG_ENDIAN) { return UnsignedLongs.compare(lw, rw); } /* * We want to compare only the first index where left[index] != right[index]. * This corresponds to the least significant nonzero byte in lw ^ rw, since lw * and rw are little-endian. Long.numberOfTrailingZeros(diff) tells us the least * significant nonzero bit, and zeroing out the first three bits of L.nTZ gives us the * shift to get that least significant nonzero byte. */ int n = Long.numberOfTrailingZeros(lw ^ rw) & ~0x7; return (int) (((lw >>> n) & UNSIGNED_MASK) - ((rw >>> n) & UNSIGNED_MASK)); } } // The epilogue to cover the last (minLength % 8) elements. for (int i = minWords * Longs.BYTES; i < minLength; i++) { int result = UnsignedBytes.compare(left[i], right[i]); if (result != 0) { return result; } } return left.length - right.length; } } enum PureJavaComparator implements Comparator<byte[]> { INSTANCE; @Override public int compare(byte[] left, byte[] right) { int minLength = Math.min(left.length, right.length); for (int i = 0; i < minLength; i++) { int result = UnsignedBytes.compare(left[i], right[i]); if (result != 0) { return result; } } return left.length - right.length; } } /** * Returns the Unsafe-using Comparator, or falls back to the pure-Java * implementation if unable to do so. */ static Comparator<byte[]> getBestComparator() { try { Class<?> theClass = Class.forName(UNSAFE_COMPARATOR_NAME); // yes, UnsafeComparator does implement Comparator<byte[]> @SuppressWarnings("unchecked") Comparator<byte[]> comparator = (Comparator<byte[]>) theClass.getEnumConstants()[0]; return comparator; } catch (Throwable t) { // ensure we really catch *everything* return lexicographicalComparatorJavaImpl(); } } } }
Java
/* * 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.primitives; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkElementIndex; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkPositionIndexes; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import java.io.Serializable; import java.util.AbstractList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.RandomAccess; /** * Static utility methods pertaining to {@code long} primitives, that are not * already found in either {@link Long} or {@link Arrays}. * * <p>See the Guava User Guide article on <a href= * "http://code.google.com/p/guava-libraries/wiki/PrimitivesExplained"> * primitive utilities</a>. * * @author Kevin Bourrillion * @since 1.0 */ @GwtCompatible public final class Longs { private Longs() {} /** * The number of bytes required to represent a primitive {@code long} * value. */ public static final int BYTES = Long.SIZE / Byte.SIZE; /** * The largest power of two that can be represented as a {@code long}. * * @since 10.0 */ public static final long MAX_POWER_OF_TWO = 1L << (Long.SIZE - 2); /** * Returns a hash code for {@code value}; equal to the result of invoking * {@code ((Long) value).hashCode()}. * * <p>This method always return the value specified by {@link * Long#hashCode()} in java, which might be different from * {@code ((Long) value).hashCode()} in GWT because {@link Long#hashCode()} * in GWT does not obey the JRE contract. * * @param value a primitive {@code long} value * @return a hash code for the value */ public static int hashCode(long value) { return (int) (value ^ (value >>> 32)); } /** * Compares the two specified {@code long} values. The sign of the value * returned is the same as that of {@code ((Long) a).compareTo(b)}. * * @param a the first {@code long} to compare * @param b the second {@code long} to compare * @return a negative value if {@code a} is less than {@code b}; a positive * value if {@code a} is greater than {@code b}; or zero if they are equal */ public static int compare(long a, long b) { return (a < b) ? -1 : ((a > b) ? 1 : 0); } /** * Returns {@code true} if {@code target} is present as an element anywhere in * {@code array}. * * @param array an array of {@code long} values, possibly empty * @param target a primitive {@code long} value * @return {@code true} if {@code array[i] == target} for some value of {@code * i} */ public static boolean contains(long[] array, long target) { for (long value : array) { if (value == target) { return true; } } return false; } /** * Returns the index of the first appearance of the value {@code target} in * {@code array}. * * @param array an array of {@code long} values, possibly empty * @param target a primitive {@code long} value * @return the least index {@code i} for which {@code array[i] == target}, or * {@code -1} if no such index exists. */ public static int indexOf(long[] array, long target) { return indexOf(array, target, 0, array.length); } // TODO(kevinb): consider making this public private static int indexOf( long[] array, long target, int start, int end) { for (int i = start; i < end; i++) { if (array[i] == target) { return i; } } return -1; } /** * Returns the start position of the first occurrence of the specified {@code * target} within {@code array}, or {@code -1} if there is no such occurrence. * * <p>More formally, returns the lowest index {@code i} such that {@code * java.util.Arrays.copyOfRange(array, i, i + target.length)} contains exactly * the same elements as {@code target}. * * @param array the array to search for the sequence {@code target} * @param target the array to search for as a sub-sequence of {@code array} */ public static int indexOf(long[] array, long[] target) { checkNotNull(array, "array"); checkNotNull(target, "target"); if (target.length == 0) { return 0; } outer: for (int i = 0; i < array.length - target.length + 1; i++) { for (int j = 0; j < target.length; j++) { if (array[i + j] != target[j]) { continue outer; } } return i; } return -1; } /** * Returns the index of the last appearance of the value {@code target} in * {@code array}. * * @param array an array of {@code long} values, possibly empty * @param target a primitive {@code long} value * @return the greatest index {@code i} for which {@code array[i] == target}, * or {@code -1} if no such index exists. */ public static int lastIndexOf(long[] array, long target) { return lastIndexOf(array, target, 0, array.length); } // TODO(kevinb): consider making this public private static int lastIndexOf( long[] array, long target, int start, int end) { for (int i = end - 1; i >= start; i--) { if (array[i] == target) { return i; } } return -1; } /** * Returns the least value present in {@code array}. * * @param array a <i>nonempty</i> array of {@code long} values * @return the value present in {@code array} that is less than or equal to * every other value in the array * @throws IllegalArgumentException if {@code array} is empty */ public static long min(long... array) { checkArgument(array.length > 0); long min = array[0]; for (int i = 1; i < array.length; i++) { if (array[i] < min) { min = array[i]; } } return min; } /** * Returns the greatest value present in {@code array}. * * @param array a <i>nonempty</i> array of {@code long} values * @return the value present in {@code array} that is greater than or equal to * every other value in the array * @throws IllegalArgumentException if {@code array} is empty */ public static long max(long... array) { checkArgument(array.length > 0); long max = array[0]; for (int i = 1; i < array.length; i++) { if (array[i] > max) { max = array[i]; } } return max; } /** * Returns the values from each provided array combined into a single array. * For example, {@code concat(new long[] {a, b}, new long[] {}, new * long[] {c}} returns the array {@code {a, b, c}}. * * @param arrays zero or more {@code long} arrays * @return a single array containing all the values from the source arrays, in * order */ public static long[] concat(long[]... arrays) { int length = 0; for (long[] array : arrays) { length += array.length; } long[] result = new long[length]; int pos = 0; for (long[] array : arrays) { System.arraycopy(array, 0, result, pos, array.length); pos += array.length; } return result; } /** * Returns a big-endian representation of {@code value} in an 8-element byte * array; equivalent to {@code ByteBuffer.allocate(8).putLong(value).array()}. * For example, the input value {@code 0x1213141516171819L} would yield the * byte array {@code {0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19}}. * * <p>If you need to convert and concatenate several values (possibly even of * different types), use a shared {@link java.nio.ByteBuffer} instance, or use * {@link com.google.common.io.ByteStreams#newDataOutput()} to get a growable * buffer. */ public static byte[] toByteArray(long value) { // Note that this code needs to stay compatible with GWT, which has known // bugs when narrowing byte casts of long values occur. byte[] result = new byte[8]; for (int i = 7; i >= 0; i--) { result[i] = (byte) (value & 0xffL); value >>= 8; } return result; } /** * Returns the {@code long} value whose big-endian representation is * stored in the first 8 bytes of {@code bytes}; equivalent to {@code * ByteBuffer.wrap(bytes).getLong()}. For example, the input byte array * {@code {0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19}} would yield the * {@code long} value {@code 0x1213141516171819L}. * * <p>Arguably, it's preferable to use {@link java.nio.ByteBuffer}; that * library exposes much more flexibility at little cost in readability. * * @throws IllegalArgumentException if {@code bytes} has fewer than 8 * elements */ public static long fromByteArray(byte[] bytes) { checkArgument(bytes.length >= BYTES, "array too small: %s < %s", bytes.length, BYTES); return fromBytes(bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7]) ; } /** * Returns the {@code long} value whose byte representation is the given 8 * bytes, in big-endian order; equivalent to {@code Longs.fromByteArray(new * byte[] {b1, b2, b3, b4, b5, b6, b7, b8})}. * * @since 7.0 */ public static long fromBytes(byte b1, byte b2, byte b3, byte b4, byte b5, byte b6, byte b7, byte b8) { return (b1 & 0xFFL) << 56 | (b2 & 0xFFL) << 48 | (b3 & 0xFFL) << 40 | (b4 & 0xFFL) << 32 | (b5 & 0xFFL) << 24 | (b6 & 0xFFL) << 16 | (b7 & 0xFFL) << 8 | (b8 & 0xFFL); } /** * Parses the specified string as a signed decimal long value. The ASCII * character {@code '-'} (<code>'&#92;u002D'</code>) is recognized as the * minus sign. * * <p>Unlike {@link Long#parseLong(String)}, this method returns * {@code null} instead of throwing an exception if parsing fails. * * <p>Note that strings prefixed with ASCII {@code '+'} are rejected, even * under JDK 7, despite the change to {@link Long#parseLong(String)} for * that version. * * @param string the string representation of a long value * @return the long value represented by {@code string}, or {@code null} if * {@code string} has a length of zero or cannot be parsed as a long * value * @since 14.0 */ @Beta public static Long tryParse(String string) { if (checkNotNull(string).isEmpty()) { return null; } boolean negative = string.charAt(0) == '-'; int index = negative ? 1 : 0; if (index == string.length()) { return null; } int digit = string.charAt(index++) - '0'; if (digit < 0 || digit > 9) { return null; } long accum = -digit; while (index < string.length()) { digit = string.charAt(index++) - '0'; if (digit < 0 || digit > 9 || accum < Long.MIN_VALUE / 10) { return null; } accum *= 10; if (accum < Long.MIN_VALUE + digit) { return null; } accum -= digit; } if (negative) { return accum; } else if (accum == Long.MIN_VALUE) { return null; } else { return -accum; } } /** * Returns an array containing the same values as {@code array}, but * guaranteed to be of a specified minimum length. If {@code array} already * has a length of at least {@code minLength}, it is returned directly. * Otherwise, a new array of size {@code minLength + padding} is returned, * containing the values of {@code array}, and zeroes in the remaining places. * * @param array the source array * @param minLength the minimum length the returned array must guarantee * @param padding an extra amount to "grow" the array by if growth is * necessary * @throws IllegalArgumentException if {@code minLength} or {@code padding} is * negative * @return an array containing the values of {@code array}, with guaranteed * minimum length {@code minLength} */ public static long[] ensureCapacity( long[] array, int minLength, int padding) { checkArgument(minLength >= 0, "Invalid minLength: %s", minLength); checkArgument(padding >= 0, "Invalid padding: %s", padding); return (array.length < minLength) ? copyOf(array, minLength + padding) : array; } // Arrays.copyOf() requires Java 6 private static long[] copyOf(long[] original, int length) { long[] copy = new long[length]; System.arraycopy(original, 0, copy, 0, Math.min(original.length, length)); return copy; } /** * Returns a string containing the supplied {@code long} values separated * by {@code separator}. For example, {@code join("-", 1L, 2L, 3L)} returns * the string {@code "1-2-3"}. * * @param separator the text that should appear between consecutive values in * the resulting string (but not at the start or end) * @param array an array of {@code long} values, possibly empty */ public static String join(String separator, long... array) { checkNotNull(separator); if (array.length == 0) { return ""; } // For pre-sizing a builder, just get the right order of magnitude StringBuilder builder = new StringBuilder(array.length * 10); builder.append(array[0]); for (int i = 1; i < array.length; i++) { builder.append(separator).append(array[i]); } return builder.toString(); } /** * Returns a comparator that compares two {@code long} arrays * lexicographically. That is, it compares, using {@link * #compare(long, long)}), the first pair of values that follow any * common prefix, or when one array is a prefix of the other, treats the * shorter array as the lesser. For example, * {@code [] < [1L] < [1L, 2L] < [2L]}. * * <p>The returned comparator is inconsistent with {@link * Object#equals(Object)} (since arrays support only identity equality), but * it is consistent with {@link Arrays#equals(long[], long[])}. * * @see <a href="http://en.wikipedia.org/wiki/Lexicographical_order"> * Lexicographical order article at Wikipedia</a> * @since 2.0 */ public static Comparator<long[]> lexicographicalComparator() { return LexicographicalComparator.INSTANCE; } private enum LexicographicalComparator implements Comparator<long[]> { INSTANCE; @Override public int compare(long[] left, long[] right) { int minLength = Math.min(left.length, right.length); for (int i = 0; i < minLength; i++) { int result = Longs.compare(left[i], right[i]); if (result != 0) { return result; } } return left.length - right.length; } } /** * Returns an array containing each value of {@code collection}, converted to * a {@code long} value in the manner of {@link Number#longValue}. * * <p>Elements are copied from the argument collection as if by {@code * collection.toArray()}. Calling this method is as thread-safe as calling * that method. * * @param collection a collection of {@code Number} instances * @return an array containing the same values as {@code collection}, in the * same order, converted to primitives * @throws NullPointerException if {@code collection} or any of its elements * is null * @since 1.0 (parameter was {@code Collection<Long>} before 12.0) */ public static long[] toArray(Collection<? extends Number> collection) { if (collection instanceof LongArrayAsList) { return ((LongArrayAsList) collection).toLongArray(); } Object[] boxedArray = collection.toArray(); int len = boxedArray.length; long[] array = new long[len]; for (int i = 0; i < len; i++) { // checkNotNull for GWT (do not optimize) array[i] = ((Number) checkNotNull(boxedArray[i])).longValue(); } return array; } /** * Returns a fixed-size list backed by the specified array, similar to {@link * Arrays#asList(Object[])}. The list supports {@link List#set(int, Object)}, * but any attempt to set a value to {@code null} will result in a {@link * NullPointerException}. * * <p>The returned list maintains the values, but not the identities, of * {@code Long} objects written to or read from it. For example, whether * {@code list.get(0) == list.get(0)} is true for the returned list is * unspecified. * * @param backingArray the array to back the list * @return a list view of the array */ public static List<Long> asList(long... backingArray) { if (backingArray.length == 0) { return Collections.emptyList(); } return new LongArrayAsList(backingArray); } @GwtCompatible private static class LongArrayAsList extends AbstractList<Long> implements RandomAccess, Serializable { final long[] array; final int start; final int end; LongArrayAsList(long[] array) { this(array, 0, array.length); } LongArrayAsList(long[] array, int start, int end) { this.array = array; this.start = start; this.end = end; } @Override public int size() { return end - start; } @Override public boolean isEmpty() { return false; } @Override public Long get(int index) { checkElementIndex(index, size()); return array[start + index]; } @Override public boolean contains(Object target) { // Overridden to prevent a ton of boxing return (target instanceof Long) && Longs.indexOf(array, (Long) target, start, end) != -1; } @Override public int indexOf(Object target) { // Overridden to prevent a ton of boxing if (target instanceof Long) { int i = Longs.indexOf(array, (Long) target, start, end); if (i >= 0) { return i - start; } } return -1; } @Override public int lastIndexOf(Object target) { // Overridden to prevent a ton of boxing if (target instanceof Long) { int i = Longs.lastIndexOf(array, (Long) target, start, end); if (i >= 0) { return i - start; } } return -1; } @Override public Long set(int index, Long element) { checkElementIndex(index, size()); long oldValue = array[start + index]; // checkNotNull for GWT (do not optimize) array[start + index] = checkNotNull(element); return oldValue; } @Override public List<Long> subList(int fromIndex, int toIndex) { int size = size(); checkPositionIndexes(fromIndex, toIndex, size); if (fromIndex == toIndex) { return Collections.emptyList(); } return new LongArrayAsList(array, start + fromIndex, start + toIndex); } @Override public boolean equals(Object object) { if (object == this) { return true; } if (object instanceof LongArrayAsList) { LongArrayAsList that = (LongArrayAsList) object; int size = size(); if (that.size() != size) { return false; } for (int i = 0; i < size; i++) { if (array[start + i] != that.array[that.start + i]) { return false; } } return true; } return super.equals(object); } @Override public int hashCode() { int result = 1; for (int i = start; i < end; i++) { result = 31 * result + Longs.hashCode(array[i]); } return result; } @Override public String toString() { StringBuilder builder = new StringBuilder(size() * 10); builder.append('[').append(array[start]); for (int i = start + 1; i < end; i++) { builder.append(", ").append(array[i]); } return builder.append(']').toString(); } long[] toLongArray() { // Arrays.copyOfRange() is not available under GWT int size = size(); long[] result = new long[size]; System.arraycopy(array, start, result, 0, size); return result; } private static final long serialVersionUID = 0; } }
Java