|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.datatransfer.DataFlavor | +--org.favabeans.base.Type
A Type
object is an analogue of a Java class. However,
implementations can use any algorithm for determining whether a
given Java object is "an instance of" this Type
.
Instances of Type
form a bridge between the
java.awt.datatransfer
interfaces and the internal
workings of FavaBeans.
Type
s generalize the Java class system, and are
intended to be flexible enough to categorize objects arbitrarily,
according to their content, so that the UI can make intelligent
choices about how -- or even whether -- to present a specific
object to the user.
Fields inherited from class java.awt.datatransfer.DataFlavor |
javaFileListFlavor, javaJVMLocalObjectMimeType, javaRemoteObjectMimeType, javaSerializedObjectMimeType, plainTextFlavor, stringFlavor |
Constructor Summary | |
protected |
Type()
|
Method Summary | |
boolean |
equals(DataFlavor t)
Determine if this object is equal to some other
Type object. |
boolean |
equals(Object o)
Determine if an object is equal to this one. |
String |
getMimeType()
|
static Type |
getType(Object o)
Obtain a unique Type that matches a given
object. |
boolean |
greaterThan(Object t)
Determine if this object is greater than some
other Type object. |
boolean |
isAssignableFrom(Type t)
Determine whether the specified Type is a subtype
of, or equal to, this Type . |
abstract boolean |
isInstance(Object object)
Determine if a given arbitrary Java object is an instance of this Type . |
abstract boolean |
isStrictSubtypeOf(Type t)
Determine whether this Type is a strict subtype of
another Type t . |
boolean |
lessThan(Object t)
Determine if this object is less than some other
Type object. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected Type()
Method Detail |
public String getMimeType()
getMimeType
in class DataFlavor
DataFlavor.javaJVMLocalObjectMimeType
, always.public abstract boolean isStrictSubtypeOf(Type t)
Type
is a strict subtype of
another Type t
. By strict subtype, we
mean that this Type
is a subtype of
t
, but not equal to t
.type
- the specified Type
true
if this object is a strict subtype of
t
; false
otherwise.public boolean isAssignableFrom(Type t)
Type
is a subtype
of, or equal to, this Type
.t
- the specified Type
true
if type
is a subtype of,
or equals()
, this
; false
otherwise.Class.isAssignableFrom(java.lang.Class)
public abstract boolean isInstance(Object object)
Type
.object
- an arbitrary Java object reference.true
if object
is considered
"an instance of this Type
"; false
otherwise.Class.isInstance(java.lang.Object)
public boolean greaterThan(Object t)
this
object is greater than some
other Type
object. By definition, a Type
p
is greater than a Type q
if
p.isAssignableFrom(q)
.greaterThan
in interface PoComparable
t
- another object, perhaps another Type
.t
is a Type
and
this object is greater than t
.public boolean lessThan(Object t)
this
object is less than some other
Type
object. By definition, a Type t
is less than a Type q
if
q.isAssignableFrom(t)
.lessThan
in interface PoComparable
t
- another object, perhaps another Type
.t
is a Type
and
this object is less than t
.public boolean equals(DataFlavor t)
this
object is equal to some other
Type
object.equals
in class DataFlavor
t
- another DataFlavor
, perhaps another
Type
.t
is a Type
and
t
is equal to this
.public boolean equals(Object o)
PoComparable
equals
in interface PoComparable
equals
in class DataFlavor
org.favabeans.util.PoComparable
x
- the object to which this object will be compared.true
if this object is equal to
x
; false
otherwise.public static Type getType(Object o)
Type
that matches a given
object.o
- the object for which to obtain the Type
.Type
representing the object o
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |