All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.tidalwave.mobile.media.Entity Maven / Gradle / Ivy

There is a newer version: 1.0.9
Show newest version
/*
 * 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"));
      }
  }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy