I have a issue with my java code. i asked the same question yesterday. I got answer but sorry it was my fault. My question is not clear.
I have code looks like this:
public String asString(ProximityTarget target) {
StringBuilder sb = new StringBuilder("circle:");
sb.append(target.getGeoPoint().getLatitudeInMicroDegrees()).append(":");
sb.append(target.getGeoPoint().getLongitudeInMicroDegrees()).append(":");
sb.append(target.getRadiusDistanceUnits());
return sb.toString();
}
public void someMethod() {
//...
StringBuilder sb = new StringBuilder();
for(i = 0; i < geo.getTargets().length ; i++ )
{
if(geo.getTargets(i).getTargetType().equalsIgnoreCase("ProximityTarget"))
{
final ProximityTarget prox = (ProximityTarget)geo.getTargets(i);
if (!sb.isEmpty())
sb.append("|");
sb.append(asString(prox));
}
}
String formattedString = sb.toString();
//...
}