org.scijava
Interface Typed<T>

All Known Subinterfaces:
ButtonWidget<U>, ChoiceWidget<U>, ColorWidget<U>, ConsoleArgument, ConsoleService, Converter<I,O>, ConvertService, DateWidget<U>, DragAndDropHandler<D>, DragAndDropService, FileWidget<U>, HandlerPlugin<D>, HandlerService<DT,PT>, InputWidget<T,W>, IOPlugin<D>, IOService, MessageWidget<U>, NumberWidget<U>, ObjectWidget<U>, ScriptHeader, ScriptHeaderService, TextFormat, TextService, TextWidget<U>, ToggleWidget<U>, TypedPlugin<D>, TypedService<DT,PT>, WidgetService, WrapperPlugin<D>, WrapperService<DT,PT>
All Known Implementing Classes:
AbstractConsoleArgument, AbstractConverter, AbstractConvertService, AbstractDragAndDropHandler, AbstractHandlerPlugin, AbstractHandlerService, AbstractInputWidget, AbstractIOPlugin, AbstractScriptHeader, AbstractTextFormat, AbstractTypedPlugin, AbstractTypedService, AbstractUIInputWidget, AbstractWrapperPlugin, AbstractWrapperService, DefaultConsoleService, DefaultConverter, DefaultConvertService, DefaultDragAndDropService, DefaultIOService, DefaultScriptHeaderService, DefaultTextService, DefaultWidgetService, FileDragAndDropHandler, ListDragAndDropHandler, NullConverter, OpenArgument, RunArgument, ScriptFileDragAndDropHandler, ScriptIOPlugin, TextIOPlugin, UIArgument

public interface Typed<T>

An object with an associated type (i.e., Class), which can be queried at runtime.

Author:
Curtis Rueden

Method Summary
 Class<T> getType()
          Gets the type associated with the object.
 boolean supports(T data)
          Gets whether this object is compatible with the given data object.
 

Method Detail

supports

boolean supports(T data)
Gets whether this object is compatible with the given data object.

Typically, this will be the case when data.getClass() is assignable to the type associated with the object (i.e., the one returned by getType()). But individual implementations may have other requirements beyond class assignability.


getType

Class<T> getType()
Gets the type associated with the object.



Copyright © 2009–2014 SciJava. All rights reserved.