1 23 package org.objectweb.medor.lib; 24 25 import org.objectweb.jorm.type.api.PType; 26 import org.objectweb.medor.api.Field; 27 import org.objectweb.medor.api.MedorException; 28 import org.objectweb.medor.api.MultivaluedField; 29 30 import java.util.Map ; 31 32 public class BasicMultivaluedField extends BasicTupleStructure 33 implements MultivaluedField { 34 35 protected String name = null; 36 protected PType type = null; 37 38 public BasicMultivaluedField() { 39 } 40 41 public BasicMultivaluedField(String name, 42 Field[] fields) throws MedorException { 43 super(fields); 44 this.name = name; 45 } 46 47 public Object clone(Object clone, 48 Map obj2clone) throws CloneNotSupportedException { 49 clone = super.clone(clone, obj2clone); 50 ((BasicMultivaluedField) clone).name = name; 51 ((BasicMultivaluedField) clone).type = type; 52 return clone; 53 } 54 55 58 public String getName() { 59 return name; 60 } 61 62 public PType getType() { 63 return type; 64 } 65 66 public short getNullStatus() { 67 return 99; 69 } 70 71 public int compareTo(Object o) { 72 Field f = (Field) o; 73 return name.compareTo(f.getName()); 74 } 75 } 76 | Popular Tags |