introduced Verbex: Verb extension or Verb expansion or verb expression
created AbstractComplement to collect common methods
the error is because the elements added are just Complement, whereas
the receiving array may be storing a subclass of Complement;
added AbstractComplement, which should hav been committed long ago!
solved the problem in CoplementsOnArrayList by fixed T to Complement
deleted this one, it is over typed anyway
Verbex and Fillable
folded Fillable into Verbex; created AbstractVerbex and used it
added Complements2 interface that extends Collection<Complement>;
created AbstractComplements2 that implements most of the above;
note the concat method....does it create a new copy? I hope so.
Note: in Verbex without complements delegate is null, thus saving space
append can't be implemented in AbstractComplements because the
Collection type is abstract; renamed the concat method to something
funny because it manipulates only views
using instanceof to simulate polymorphism of a Collection argument;
we can't change the Collection API to pass the method to call, nor do we
want to replace the Collection argument with a subclass argument
ComplementsArrayList is now derived from AbstractComplements;
append returns a new object containing the same delegate, hence the
current object is modified too!
trying to use clone() instead of instanceof
implemented ComplementsArrayList as subclass of AbstractComplements;
introduced distint append and copyAppend methods
removed append(), redundant because it's the same as Collection.add();
rename copyAppend() to copyAdd()
removed ComplementsOnArrayList; since ComplementsArrayList now
implements Collection, the two have the same interfaces!
introduced AtomicSingletonCollection and used it for AbstractComplement
no compile errors in the Complement(s) classes;
renamed to AtomicMonoCollection
some replacements Complements to Complements2; deleted UnaryComplements
renamed AtomicUnaryComplements to AtomicComplementsMono, etc.
Note: this class is a very light implementation of a 1-element
Complement container based on an essence object.
It avoids extending AtomicMonoCollection, thus reducing by 1 reference
the memory consumption. The price is that it must implement all the
Collection methods explicitely (only stumps are present now)