use of ch.cyberduck.core.Serializable in project cyberduck by iterate-ch.
the class PlistSerializer method setListForKey.
@Override
public <T extends Serializable> void setListForKey(final Collection<T> value, final String key) {
final NSArray list = new NSArray(value.size());
int i = 0;
for (Serializable serializable : value) {
list.setValue(i, serializable.<NSDictionary>serialize(new PlistSerializer()));
i++;
}
dict.put(key, list);
}
use of ch.cyberduck.core.Serializable in project cyberduck by iterate-ch.
the class PlistSerializer method setListForKey.
@Override
public <T extends Serializable> void setListForKey(final Collection<T> value, final String key) {
final NSMutableArray list = NSMutableArray.array();
for (Serializable serializable : value) {
list.addObject(serializable.<NSDictionary>serialize(new PlistSerializer()));
}
dict.setObjectForKey(list, key);
}
Aggregations