6 import java.io.BufferedReader;
7 import java.io.PrintWriter;
8 import java.io.IOException;
18 public MFString(
int size, String[] s) {
19 for (
int i = 0; i < size; i++)
23 public void getValue(String[] s) {
25 int size = __vect.size();
26 for (
int i = 0; i < size; i++) {
32 public String get1Value(
int index) {
37 public void setValue(String[] s) {
38 setValue(s.length, s);
41 public void setValue(
int size, String[] s) {
43 for (
int i = 0; i < size; i++)
48 public void set1Value(
int index, String s) {
52 public void set1Value(
int index,
SFString sfString) {
53 sfString.__updateRead();
58 __set1Value(index, sfString);
61 public void addValue(String s) {
65 public void addValue(
SFString sfString) {
66 sfString.__updateRead();
74 public void insertValue(
int index, String s) {
78 public void insertValue(
int index,
SFString sfString) {
79 sfString.__updateRead();
84 __insertValue(index, sfString);
87 public String toString() {
89 StringBuffer sb =
new StringBuffer(
"[");
90 int size = __vect.size();
91 for (
int i = 0; i < size; i++) {
92 if (i > 0) sb.append(
", ");
93 sb.append(__vect.elementAt(i));
95 return sb.append(
"]").toString();
98 public void __fromPerl(BufferedReader in)
throws IOException {
100 String lenline = in.readLine();
103 int len = Integer.parseInt(lenline);
104 for (
int i = 0; i < len; i++) {
107 __vect.addElement(sf);
111 public void __toPerl(PrintWriter out)
throws IOException {
112 StringBuffer sb =
new StringBuffer(
"");
113 int size = __vect.size();
115 for (
int i = 0; i < size; i++) {
117 if (i != (size-1)) out.print (
", ");