
com.activitystream.aspects.ItemsAspect Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
For a description please see https://github.com/activitystream/as-sdk-java
package com.activitystream.aspects;
import com.activitystream.Aspect;
import java.util.*;
public class ItemsAspect implements Aspect {
private List items = new ArrayList<>();
public ItemsAspect(AspectItem... items) {
add(items);
}
public ItemsAspect add(AspectItem... items) {
Collections.addAll(this.items, items);
return this;
}
@Override
public void addToObject(Map jsonObject, Set processed) {
List inv = new ArrayList();
for (AspectItem item : items) {
if (item != null) inv.add(item.toJson(processed));
}
jsonObject.put("items", inv);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy