Well you certainly have given me enough to phrase my needs with narrower conciseness. The first use I had for anything like this, I managed to get a '
word count' type of implementation that would take a reader and come up with a list of words that were used in that document/file/source/feed - whatever one may wish to call it, the nature of which is displayable | printable characters. The immediate next evolution was a TreeMap in which the frequencies of occurence were noted for some paticular document / file / source / feed and with that accomplished I delved into
Threads and Regexs. Today I went back to re-code major portions and it occured to me that what I was passing around was a character sequence.
In general:
here, the vertical bars may need to be mutable, but I could do that by passing a new character sequence which is the result of some op, denoted here by a vertical bar and in my code by a
Thread Object. I figured out how to implement Runnable, and often do that when coding
test funcs, but the original concept - which holds valid at this point - is an operation that is best modeled in my mind by a Thread of Operation, which when complete may be thought of as applying Operation(i) to Cleartext(j) | and I may study combinatorics in the attempt to retire lattice plane Z(i,j) which may then become a point on a
sombrero function It originally occured to me to just use a char[], and consequent to your reply that may be the correct answer to my goal. I could easily with my skills attained thusfar write a class which implements CharSequence, along with some other stuff I need such as clear(), blank(), scramble() and other more sophisticated encipherments and rotators. It is ultra-easy and fast for me to write these things, it is the fundamental concept of how you can have something like set or something which only has func(); and have it operate, except by obsucurity. When I try to write an interface myself, it does not work. The best I can tell is that one declares an interface as a named something or other and there are no constructors nor anything else that 'works like it should' it just sort of ..... well, I don't know -> that's what the question is.
Set is becoming useful, along with some things such as this if I knew how to use them ~ but I always just do: Vector victor = new Vector(101,75); because then I can "see" where the Vector is keeping things. Let us say I had a String, or a Vector of words: My first attempt used File that was not of any use past the work of passing results of Operation(i,j) to Operation (i+1,j+1) and would like to be able to pass entire phrase collections, maybe even paragraphs == whatever -> along the chain of operations.
But let us say the class SpecialString has a method which gets the contents of the internal buffer, clearly checking bounds and failure points and pumping default values if needed to thwart failure such as null strings and so on. How would I pump these characters into a CharSequence, as in the return value from a func() such that this CharSequence is now a new whatchamacallit, somewhere else in ram other than where the stack frame for instance n+ij of SpecialString points to ?
This would simplifiy my design in that passing a *COPY* of SpecialStrings char[] at some points in the control flow may be of use later and thus would retire trying to code in workarounds for boundary conditions that I cannot at this point guess at.
StringBuffer does something not unlike this in it's toSring()
IOW - how to write:
[ November 06, 2007: Message edited by: Nicholas Jordan ]