diff --git a/Ant-Clean.xml b/Ant-Clean.xml
index ebcf3977..22e810a1 100644
--- a/Ant-Clean.xml
+++ b/Ant-Clean.xml
@@ -31,8 +31,7 @@
-
-
+
diff --git a/Ant-Common.xml b/Ant-Common.xml
index f11eb74b..16dfc784 100644
--- a/Ant-Common.xml
+++ b/Ant-Common.xml
@@ -74,7 +74,13 @@
+ srcdir="${basedir}/../onjava/">
+
+
+
+
@@ -90,6 +96,12 @@
+
+
+
+
testObject = new HashSet<>();
diff --git a/annotations/StackLStringTest.java b/annotations/StackLStringTest.java
index 9a2d973f..1175f25e 100644
--- a/annotations/StackLStringTest.java
+++ b/annotations/StackLStringTest.java
@@ -2,7 +2,7 @@
// Applying @Unit to generics.
package annotations;
import com.mindviewinc.atunit.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class StackLStringTest extends StackL {
@Test void _push() {
diff --git a/arrays/AlphabeticSearch.java b/arrays/AlphabeticSearch.java
index 0fe2fc5e..27c4a1c8 100644
--- a/arrays/AlphabeticSearch.java
+++ b/arrays/AlphabeticSearch.java
@@ -1,7 +1,7 @@
// arrays/AlphabeticSearch.java
// Searching with a Comparator.
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class AlphabeticSearch {
public static void main(String[] args) {
diff --git a/arrays/ArrayOptions.java b/arrays/ArrayOptions.java
index a6bbcc22..42ed6575 100644
--- a/arrays/ArrayOptions.java
+++ b/arrays/ArrayOptions.java
@@ -7,6 +7,7 @@ public class ArrayOptions {
// Arrays of objects:
BerylliumSphere[] a; // Local uninitialized variable
BerylliumSphere[] b = new BerylliumSphere[5];
+
// The references inside the array are
// automatically initialized to null:
System.out.println("b: " + Arrays.toString(b));
@@ -14,14 +15,17 @@ public class ArrayOptions {
for(int i = 0; i < c.length; i++)
if(c[i] == null) // Can test for null reference
c[i] = new BerylliumSphere();
+
// Aggregate initialization:
BerylliumSphere[] d = { new BerylliumSphere(),
new BerylliumSphere(), new BerylliumSphere()
};
+
// Dynamic aggregate initialization:
a = new BerylliumSphere[]{
new BerylliumSphere(), new BerylliumSphere(),
};
+
// (Trailing comma is optional in both cases)
System.out.println("a.length = " + a.length);
System.out.println("b.length = " + b.length);
@@ -33,6 +37,7 @@ public class ArrayOptions {
// Arrays of primitives:
int[] e; // Null reference
int[] f = new int[5];
+
// The primitives inside the array are
// automatically initialized to zero:
System.out.println("f: " + Arrays.toString(f));
@@ -40,6 +45,7 @@ public class ArrayOptions {
for(int i = 0; i < g.length; i++)
g[i] = i*i;
int[] h = { 11, 47, 93 };
+
// Compile error: variable e not initialized:
//!print("e.length = " + e.length);
System.out.println("f.length = " + f.length);
diff --git a/arrays/ArraySearching.java b/arrays/ArraySearching.java
index f99bd8f5..4fb3317a 100644
--- a/arrays/ArraySearching.java
+++ b/arrays/ArraySearching.java
@@ -2,7 +2,7 @@
// Using Arrays.binarySearch().
import java.util.*;
import java.util.function.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class ArraySearching {
public static void main(String[] args) {
diff --git a/arrays/CompType.java b/arrays/CompType.java
index be0e1401..981bbce8 100644
--- a/arrays/CompType.java
+++ b/arrays/CompType.java
@@ -2,7 +2,7 @@
// Implementing Comparable in a class.
import java.util.*;
import java.util.function.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class CompType implements Comparable {
int i;
diff --git a/arrays/ComparatorTest.java b/arrays/ComparatorTest.java
index 1ef1b529..8921458f 100644
--- a/arrays/ComparatorTest.java
+++ b/arrays/ComparatorTest.java
@@ -1,7 +1,7 @@
// arrays/ComparatorTest.java
// Implementing a Comparator for a class.
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
class CompTypeComparator implements Comparator {
public int compare(CompType o1, CompType o2) {
diff --git a/arrays/PrimitiveConversionDemonstration.java b/arrays/PrimitiveConversionDemonstration.java
index ec20cfa4..e3edb799 100644
--- a/arrays/PrimitiveConversionDemonstration.java
+++ b/arrays/PrimitiveConversionDemonstration.java
@@ -1,6 +1,6 @@
// arrays/PrimitiveConversionDemonstration.java
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class PrimitiveConversionDemonstration {
public static void main(String[] args) {
diff --git a/arrays/RandomSuppliersTest.java b/arrays/RandomSuppliersTest.java
index 076959df..0f313ba3 100644
--- a/arrays/RandomSuppliersTest.java
+++ b/arrays/RandomSuppliersTest.java
@@ -1,5 +1,5 @@
// arrays/RandomSuppliersTest.java
-import com.mindviewinc.util.*;
+import onjava.*;
public class RandomSuppliersTest {
public static void main(String[] args) {
diff --git a/arrays/Reverse.java b/arrays/Reverse.java
index 0cadef57..734171aa 100644
--- a/arrays/Reverse.java
+++ b/arrays/Reverse.java
@@ -1,7 +1,7 @@
// arrays/Reverse.java
// The Collections.reverseOrder() Comparator
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class Reverse {
public static void main(String[] args) {
diff --git a/arrays/StringSorting.java b/arrays/StringSorting.java
index 1c18f567..edb24530 100644
--- a/arrays/StringSorting.java
+++ b/arrays/StringSorting.java
@@ -1,7 +1,7 @@
// arrays/StringSorting.java
// Sorting an array of Strings.
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class StringSorting {
public static void main(String[] args) {
diff --git a/arrays/SuppliersTest.java b/arrays/SuppliersTest.java
index 252cf404..9860d596 100644
--- a/arrays/SuppliersTest.java
+++ b/arrays/SuppliersTest.java
@@ -1,6 +1,6 @@
// arrays/SuppliersTest.java
import java.util.function.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class SuppliersTest {
public static int size = 10;
diff --git a/arrays/TestArrayGeneration.java b/arrays/TestArrayGeneration.java
index 9388d75d..d5262d52 100644
--- a/arrays/TestArrayGeneration.java
+++ b/arrays/TestArrayGeneration.java
@@ -1,7 +1,7 @@
// arrays/TestArrayGeneration.java
// Test the tools that use generators to fill arrays.
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class TestArrayGeneration {
public static void main(String[] args) {
diff --git a/arrays/TestGenerated.java b/arrays/TestGenerated.java
index bbe46080..8059dfc7 100644
--- a/arrays/TestGenerated.java
+++ b/arrays/TestGenerated.java
@@ -1,6 +1,6 @@
// arrays/TestGenerated.java
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class TestGenerated {
public static void main(String[] args) {
diff --git a/build.xml b/build.xml
index 0294e84c..70dc2438 100644
--- a/build.xml
+++ b/build.xml
@@ -30,28 +30,35 @@
polymorphism/build.xml
interfaces/build.xml
innerclasses/build.xml
+ functions/build.xml
containers/build.xml
+ streams/build.xml
exceptions/build.xml
strings/build.xml
typeinfo/build.xml
generics/build.xml
arrays/build.xml
containersindepth/build.xml
- io/build.xml
- xml/build.xml
+ files/build.xml
enums/build.xml
annotations/build.xml
concurrency/build.xml
ui/build.xml
swt/build.xml
patterns/build.xml
- references/build.xml
- assertions/build.xml
unittesting/build.xml
- debugging/build.xml
- logging/build.xml
+ assertions/build.xml
+ references/build.xml
+ iostreams/build.xml
+ standardio/build.xml
+ newio/build.xml
+ compression/build.xml
+ serialization/build.xml
+ preferences/build.xml
network/build.xml
remote/build.xml
+ logging/build.xml
+ debugging/build.xml
staticchecking/build.xml
"/>
diff --git a/com/build.xml b/com/build.xml
index e13085a3..4429a242 100644
--- a/com/build.xml
+++ b/com/build.xml
@@ -9,13 +9,6 @@
-
-
-
-
-
-
-
diff --git a/com/mindviewinc/atunit/AtUnit.java b/com/mindviewinc/atunit/AtUnit.java
index 4e5c6b77..d14c3eed 100644
--- a/com/mindviewinc/atunit/AtUnit.java
+++ b/com/mindviewinc/atunit/AtUnit.java
@@ -4,7 +4,7 @@ package com.mindviewinc.atunit;
import java.lang.reflect.*;
import java.io.*;
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class AtUnit implements ProcessFiles.Strategy {
static Class> testClass;
diff --git a/com/mindviewinc/atunit/ClassNameFinder.java b/com/mindviewinc/atunit/ClassNameFinder.java
index 0f9591ab..226e99df 100644
--- a/com/mindviewinc/atunit/ClassNameFinder.java
+++ b/com/mindviewinc/atunit/ClassNameFinder.java
@@ -2,7 +2,7 @@
package com.mindviewinc.atunit;
import java.io.*;
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class ClassNameFinder {
public static String thisClass(byte[] classBytes) {
diff --git a/com/mindviewinc/util/FiveTuple.java b/com/mindviewinc/util/FiveTuple.java
deleted file mode 100644
index f2deb630..00000000
--- a/com/mindviewinc/util/FiveTuple.java
+++ /dev/null
@@ -1,16 +0,0 @@
-// com/mindviewinc/util/FiveTuple.java
-package com.mindviewinc.util;
-
-public class FiveTuple
-extends FourTuple {
- public final E fifth;
- public FiveTuple(A a, B b, C c, D d, E e) {
- super(a, b, c, d);
- fifth = e;
- }
- @Override
- public String toString() {
- return "(" + first + ", " + second + ", " +
- third + ", " + fourth + ", " + fifth + ")";
- }
-}
diff --git a/com/mindviewinc/util/FourTuple.java b/com/mindviewinc/util/FourTuple.java
deleted file mode 100644
index 837127b0..00000000
--- a/com/mindviewinc/util/FourTuple.java
+++ /dev/null
@@ -1,16 +0,0 @@
-// com/mindviewinc/util/FourTuple.java
-package com.mindviewinc.util;
-
-public class FourTuple
- extends ThreeTuple {
- public final D fourth;
- public FourTuple(A a, B b, C c, D d) {
- super(a, b, c);
- fourth = d;
- }
- @Override
- public String toString() {
- return "(" + first + ", " + second + ", " +
- third + ", " + fourth + ")";
- }
-}
diff --git a/com/mindviewinc/util/Null.java b/com/mindviewinc/util/Null.java
deleted file mode 100644
index 5b618bc1..00000000
--- a/com/mindviewinc/util/Null.java
+++ /dev/null
@@ -1,3 +0,0 @@
-// com/mindviewinc/util/Null.java
-package com.mindviewinc.util;
-public interface Null {}
diff --git a/com/mindviewinc/util/ThreeTuple.java b/com/mindviewinc/util/ThreeTuple.java
deleted file mode 100644
index c5b129e7..00000000
--- a/com/mindviewinc/util/ThreeTuple.java
+++ /dev/null
@@ -1,14 +0,0 @@
-// com/mindviewinc/util/ThreeTuple.java
-package com.mindviewinc.util;
-
-public class ThreeTuple extends TwoTuple {
- public final C third;
- public ThreeTuple(A a, B b, C c) {
- super(a, b);
- third = c;
- }
- @Override
- public String toString() {
- return "(" + first + ", " + second + ", " + third +")";
- }
-}
diff --git a/com/mindviewinc/util/Tuple.java b/com/mindviewinc/util/Tuple.java
deleted file mode 100644
index 7dbc2cbd..00000000
--- a/com/mindviewinc/util/Tuple.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// com/mindviewinc/util/Tuple.java
-// Tuple library using type argument inference.
-package com.mindviewinc.util;
-
-public class Tuple {
- public static TwoTuple tuple(A a, B b) {
- return new TwoTuple<>(a, b);
- }
- public static ThreeTuple
- tuple(A a, B b, C c) {
- return new ThreeTuple<>(a, b, c);
- }
- public static FourTuple
- tuple(A a, B b, C c, D d) {
- return new FourTuple<>(a, b, c, d);
- }
- public static
- FiveTuple tuple(A a, B b, C c, D d, E e) {
- return new FiveTuple<>(a, b, c, d, e);
- }
-}
diff --git a/com/mindviewinc/util/TwoTuple.java b/com/mindviewinc/util/TwoTuple.java
deleted file mode 100644
index 264bbc68..00000000
--- a/com/mindviewinc/util/TwoTuple.java
+++ /dev/null
@@ -1,12 +0,0 @@
-// com/mindviewinc/util/TwoTuple.java
-package com.mindviewinc.util;
-
-public class TwoTuple {
- public final A first;
- public final B second;
- public TwoTuple(A a, B b) { first = a; second = b; }
- @Override
- public String toString() {
- return "(" + first + ", " + second + ")";
- }
-}
diff --git a/concurrency/AtomicIntegerTest.java b/concurrency/AtomicIntegerTest.java
index e3467ba3..f1873f9e 100644
--- a/concurrency/AtomicIntegerTest.java
+++ b/concurrency/AtomicIntegerTest.java
@@ -2,7 +2,7 @@
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class AtomicIntegerTest implements Runnable {
private AtomicInteger i = new AtomicInteger(0);
diff --git a/concurrency/DaemonFromFactory.java b/concurrency/DaemonFromFactory.java
index 82a3af82..5073a5f6 100644
--- a/concurrency/DaemonFromFactory.java
+++ b/concurrency/DaemonFromFactory.java
@@ -1,7 +1,7 @@
// concurrency/DaemonFromFactory.java
// Using a Thread Factory to create daemons.
import java.util.concurrent.*;
-import com.mindviewinc.util.*;
+import onjava.*;
public class DaemonFromFactory implements Runnable {
@Override
diff --git a/concurrency/ExchangerDemo.java b/concurrency/ExchangerDemo.java
index 92c1da4f..64393879 100644
--- a/concurrency/ExchangerDemo.java
+++ b/concurrency/ExchangerDemo.java
@@ -2,7 +2,7 @@
import java.util.concurrent.*;
import java.util.*;
import java.util.function.*;
-import com.mindviewinc.util.*;
+import onjava.*;
class ExchangerProducer implements Runnable {
private Supplier generator;
diff --git a/concurrency/ListComparisons.java b/concurrency/ListComparisons.java
index fd90dd49..077d101f 100644
--- a/concurrency/ListComparisons.java
+++ b/concurrency/ListComparisons.java
@@ -3,7 +3,7 @@
// Rough comparison of thread-safe List performance.
import java.util.concurrent.*;
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
abstract class ListTest extends Tester> {
ListTest(String testId, int nReaders, int nWriters) {
diff --git a/concurrency/MapComparisons.java b/concurrency/MapComparisons.java
index f9a073f4..4df74cdd 100644
--- a/concurrency/MapComparisons.java
+++ b/concurrency/MapComparisons.java
@@ -3,7 +3,7 @@
// Rough comparison of thread-safe Map performance.
import java.util.concurrent.*;
import java.util.*;
-import com.mindviewinc.util.*;
+import onjava.*;
abstract class MapTest
extends Tester