@Override public EcefVector convert(Point3DAttribute source) { return (EcefVector) source.getValueAsObject(); }
public Point3DAttribute convert(String name, IAttribute attribute) { return new Point3DAttribute(name, (EcefVector) attribute); }
@Override public String toString() { return "score: " + score.total() + ", item: " + item.toString(); } }
public BooleanValue convertToInternal(int attrid, Attribute<?> object) { if (object instanceof UnspecifiedTypeAttribute){ return new BooleanValue(attrid, ((UnspecifiedTypeAttribute) object).asBoolean()); } BooleanAttribute attr = (BooleanAttribute)object; return new BooleanValue(attrid, attr.getValue() ); } }
public FloatValue convertToInternal(int attrid, Attribute<?> object) { if (object instanceof UnspecifiedTypeAttribute) { return new FloatValue(attrid, ((UnspecifiedTypeAttribute)object).asFloat() ); } FloatAttribute attr = (FloatAttribute) object; return new FloatValue(attrid, attr.getValue() ); } }
@Override public NonIndexStringAttribute next(String attrName) { return new NonIndexStringAttribute(attrName, nextShortPostcode()); }
public FloatAttribute convert(String name, IAttribute attribute) { return new FloatAttribute( name, ((FloatValue)attribute).getValue() ); }
public EnumValue convertToInternal(int attrId, EnumDefinition enumDef, EnumeratedAttribute<?> attr) { MultiEnumAttribute enumAttr = (MultiEnumAttribute) attr; return enumDef.getMultiEnum(enumAttr.getValues(), attrId); } }
public EnumExclusiveValue convertToInternal(int attrId, EnumDefinition enumDef, EnumeratedAttribute<?> attr) { EnumAttribute enumAttr = (EnumAttribute) attr; return enumDef.getEnumValue(enumAttr.getValue(), attrId); } }
public Attribute<?> convert(String name, IAttribute attribute) { FloatRangePreference pref = (FloatRangePreference) attribute; // NOTE: name=null, as we don't need to use it in this direction return new FloatRangeAttribute(name, pref.getMin(), pref.getPreferred(), pref.getMax()); }
@Override public Attribute<?> getAttribute() { return new EnumAttribute( getName(), getEnumName(), getValue() ); } }
@Override public Attribute<?> getAttribute() { return new DateAttribute(getName(), getYear(), getMonth(), getDay() ); } }
public FloatValue convertToInternal(int attrid, Attribute<?> object) { IntegerAttribute intAttr = (IntegerAttribute) object; return new FloatValue(attrid, intAttr.getValue()); }
public StringValue convertToInternal(int attrid, Attribute<?> object) { return new StringValue(attrid, ((UnspecifiedTypeAttribute)object).getValue() ); } }
public EcefVector convertToInternal(int attrid, Attribute<?> object) { Point3DAttribute attr = (Point3DAttribute) object; IPoint3D point = attr.getPoint(); EcefVector result = new EcefVector(attrid, point); return result; }
@Override public Attribute<?> getAttribute() { return new LocationAttribute( getName(), getPostcode() ); } }
@Override public Attribute<?> getAttribute() { return new NonIndexStringAttribute( getName(), getValue() ); } }
@Override public Attribute<?> getAttribute() { return new FloatAttribute( getName(), getValue() ); } }
public Point3DAttribute convert(String name, IAttribute attribute) { return new Point3DAttribute(name, (IPoint3D) attribute); }