|
fop 2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.complexscripts.util.CharAssociation
public class CharAssociation
A structure class encapsulating an interval of characters expressed as an offset and count of
Unicode scalar values (in an IntBuffer). A CharAssociation
is used to maintain a
backpointer from a glyph to one or more character intervals from which the glyph was derived.
Each glyph in a glyph sequence is associated with a single CharAssociation
instance.
A CharAssociation
instance is additionally (and optionally) used to record
predication information about the glyph, such as whether the glyph was produced by the
application of a specific substitution table or whether its position was adjusted by a specific
poisitioning table.
This work was originally authored by Glenn Adams (gadams@apache.org).
Constructor Summary | |
---|---|
CharAssociation(int[] subIntervals)
Instantiate a non-disjoint character association. |
|
CharAssociation(int offset,
int count)
Instantiate a non-disjoint character association. |
|
CharAssociation(int offset,
int count,
int[] subIntervals)
Instantiate a character association. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
boolean |
contained(int offset,
int count)
|
int |
getCount()
|
int |
getEnd()
|
int |
getOffset()
|
java.lang.Object |
getPredication(java.lang.String key)
Get predication KEY. |
static org.apache.fop.complexscripts.util.CharAssociation.PredicationMerger |
getPredicationMerger(java.lang.String key)
Obtain predication merger for KEY. |
int |
getStart()
|
int |
getSubIntervalCount()
|
int[] |
getSubIntervals()
|
boolean |
isDisjoint()
|
static CharAssociation |
join(CharAssociation[] aa)
Join (merge) multiple associations into a single, potentially disjoint association. |
void |
mergePredication(java.lang.String key,
java.lang.Object value)
Merge predication |
void |
mergePredications(CharAssociation ca)
Merge predications from another CA. |
static java.lang.Object |
mergePredicationValues(java.lang.String key,
java.lang.Object v1,
java.lang.Object v2)
Merge predication values V1 and V2 on KEY. |
static CharAssociation[] |
replicate(CharAssociation a,
int repeat)
Replicate association to form repeat new associations. |
void |
setPredication(java.lang.String key,
java.lang.Object value)
Set predication |
static void |
setPredicationMerger(java.lang.String key,
org.apache.fop.complexscripts.util.CharAssociation.PredicationMerger pm)
Register predication merger PM for KEY. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CharAssociation(int offset, int count, int[] subIntervals)
offset
- into array of Unicode scalar values (in associated IntBuffer)count
- of Unicode scalar values (in associated IntBuffer)subIntervals
- if disjoint, then array of sub-intervals, otherwise null; even
members of array are sub-interval starts, and odd members are sub-interval
ends (exclusive)public CharAssociation(int offset, int count)
offset
- into array of UTF-16 code elements (in associated CharSequence)count
- of UTF-16 character code elements (in associated CharSequence)public CharAssociation(int[] subIntervals)
subIntervals
- if disjoint, then array of sub-intervals, otherwise null; even
members of array are sub-interval starts, and odd members are sub-interval
ends (exclusive)Method Detail |
---|
public int getOffset()
public int getCount()
public int getStart()
public int getEnd()
public boolean isDisjoint()
public int[] getSubIntervals()
public int getSubIntervalCount()
public boolean contained(int offset, int count)
offset
- of interval in sequencecount
- length of interval
public void setPredication(java.lang.String key, java.lang.Object value)
key
- predication keyvalue
- predication valuepublic java.lang.Object getPredication(java.lang.String key)
key
- predication key
public void mergePredication(java.lang.String key, java.lang.Object value)
key
- predication keyvalue
- predication valuepublic static java.lang.Object mergePredicationValues(java.lang.String key, java.lang.Object v1, java.lang.Object v2)
PredicationMerger
if one exists, otherwise uses V2 if non-null, otherwise uses V1.
key
- predication keyv1
- first (original) predication valuev2
- second (to be merged) predication value
public void mergePredications(CharAssociation ca)
ca
- from which to mergepublic java.lang.Object clone()
clone
in class java.lang.Object
public static void setPredicationMerger(java.lang.String key, org.apache.fop.complexscripts.util.CharAssociation.PredicationMerger pm)
key
- for predication mergerpm
- predication mergerpublic static org.apache.fop.complexscripts.util.CharAssociation.PredicationMerger getPredicationMerger(java.lang.String key)
key
- for predication merger
public static CharAssociation[] replicate(CharAssociation a, int repeat)
repeat
new associations.
a
- association to replicaterepeat
- count
public static CharAssociation join(CharAssociation[] aa)
aa
- array of associations to join
public java.lang.String toString()
toString
in class java.lang.Object
|
fop 2.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |