| MAP | PageMixer Documents > Design note > Fixed object |
This section explains that
how to reduce handling cost for
correction of Token or Attribute.
In this document, abbreviated class names are used. Complete names are shown below.
| Notation | Full name |
|---|---|
| Token | jp.ne.dti.lares.foozy.pagemixer.Token |
| Producer | jp.ne.dti.lares.foozy.pagemixer.mixer.Producer |
| MutableStartTagToken | jp.ne.dti.lares.foozy.pagemixer.MutableStartTagToken |
| MutableProducer | jp.ne.dti.lares.foozy.pagemixer.mixer.MutableProducer |
| FixedStartTagToken | jp.ne.dti.lares.foozy.pagemixer.FixedStartTagToken |
| FixedProducer | jp.ne.dti.lares.foozy.pagemixer.mixer.FixedProducer |
Usually,
if you do not know how many objects are contained,
it is not so bad to use
ArrayList and
Iterator gotten from them
for containing them and scanning them.
But once number of objects is fixed,
array is faster and more efficient than
ArrayList and Iterator,
even though array resizing is very difficult.
In PageMixer,
Token and Producer classes
provide createFixed() method.
Some derived classes of them,
MutableStartTagToken or
MutableProducer
for example,
create fixed one from themselvs.
Fixed one,
FixedStartTagToken or
FixedProducer
for example,
contain elements of them in array.
After building/modifying,
you can use fixed one
gotten from createFixed() of it
for scanning efficiency.
| MAP | PageMixer Documents > Design note > Fixed object |