[FOray-commit] SF.net SVN: foray:[10649] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2009-03-12 16:04:00
|
Revision: 10649
http://foray.svn.sourceforge.net/foray/?rev=10649&view=rev
Author: victormote
Date: 2009-03-12 16:03:48 +0000 (Thu, 12 Mar 2009)
Log Message:
-----------
Add "add" method, and remove one dependency on alloc.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/ByteVector.java
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/ByteVector.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ByteVector.java 2009-03-12 15:58:38 UTC (rev 10648)
+++ trunk/foray/foray-common/src/java/org/foray/common/ByteVector.java 2009-03-12 16:03:48 UTC (rev 10649)
@@ -93,6 +93,15 @@
}
/**
+ * Adds one element to the vector.
+ * @param value The byte value to be added to the vector.
+ */
+ public void add(final byte value) {
+ alloc(1);
+ set(this.nextIndex - 1, value);
+ }
+
+ /**
* Place an item in the vector at a specific index.
* @param index The 0-based index into the vector.
* @param val The byte value to be placed in the vector.
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java 2009-03-12 15:58:38 UTC (rev 10648)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/HyphenationTree.java 2009-03-12 16:03:48 UTC (rev 10649)
@@ -143,7 +143,7 @@
*/
public HyphenationTree() {
/* This reserves index 0, which we don't use. */
- this.patternValues.alloc(1);
+ this.patternValues.add((byte) 0x0);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|