it.tidalwave.mobile.media.Entity Maven / Gradle / Ivy
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package it.tidalwave.mobile.media;
import javax.annotation.Nonnull;
import org.openide.util.Lookup;
import it.tidalwave.util.As;
import it.tidalwave.util.DefaultDisplayable;
import it.tidalwave.util.DefaultIdentifiable;
import it.tidalwave.util.Id;
import it.tidalwave.mobile.util.AsSupport;
/**
*
* @author fritz
*/
public class Entity extends AsSupport implements As, Lookup.Provider
{
public static final Class Entity = Entity.class;
public Entity (final @Nonnull Object ... capabilities)
{
super(capabilities);
}
@Nonnull
public static Entity namedEntity (final @Nonnull String displayName)
{
return new Entity(new DefaultDisplayable(displayName, "Entity"));
}
@Nonnull
public static Entity namedEntity (final @Nonnull Id id, final @Nonnull String displayName)
{
return new Entity(new DefaultIdentifiable(id),
new DefaultDisplayable(displayName, "Entity"));
}
}