|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Type
Representation of a type.
The types form a free algebra of terms
Τ over {ι,→,()}
plus perhaps {×,∩,∪,{},〈〉,〔〕}.
Intuitively, ι
is the type for individuals,
σ→τ
the type for maps from σ to τ,
and (σ) = σ→ο
the type for predicates of σ,
likewise ο = ()
is the type of truth-values.
A type denotes the set of possible values for a quantity.
But there is also a precise semantics.
TypeSystem
,
Typed.getType()
,
Class
Nested Class Summary | |
---|---|
static interface |
Type.Composite
The base interface for all composite types that are composed of other types. |
Nested classes/interfaces inherited from interface orbital.logic.functor.Functor |
---|
Functor.Specification |
Field Summary |
---|
Fields inherited from interface orbital.logic.functor.Predicate |
---|
callTypeDeclaration |
Method Summary | |
---|---|
boolean |
apply(java.lang.Object x)
Checks whether an object x is an instance of this type. |
Type |
codomain()
Get the co-domain τ of a type σ→τ. |
int |
compareTo(java.lang.Object tau)
Compares two types for subtype inclusions. |
Type |
domain()
Get the domain σ of a type σ→τ. |
boolean |
equals(java.lang.Object o)
Checks two types for equality. |
int |
hashCode()
|
Type |
on(Type sigma)
Applies this type on sigma returning the resulting type. |
boolean |
subtypeOf(Type tau)
Checks whether this type is a subtype of tau. |
java.lang.String |
toString()
Returns a string representation of this type. |
TypeSystem |
typeSystem()
Get the type system that this type stems from. |
Method Detail |
---|
boolean equals(java.lang.Object o)
equals
in interface Functor
equals
in class java.lang.Object
int hashCode()
hashCode
in interface Functor
hashCode
in class java.lang.Object
java.lang.String toString()
toString
in interface Functor
toString
in class java.lang.Object
Type domain()
TypeSystem.NOTYPE()
if this type does not take parameters.Type codomain()
TypeSystem typeSystem()
int compareTo(java.lang.Object tau)
compareTo
in interface java.lang.Comparable
tau
- the type τ to check for being a supertype, subtype of us, or equals.
IncomparableException
- if the types are incomparable.subtypeOf(Type)
,
TypeSystem.inf()
,
TypeSystem.sup()
boolean subtypeOf(Type tau)
compareTo(Object)
,
Class.isAssignableFrom(java.lang.Class)
Type on(Type sigma)
Applying objects of type τ∈Τ on objects of type σ∈Τ gives objects of type τ∘σ∈Τ. For example,
sigma
- the type σ that this type is applied on.
TypeException
- if τ∘σ
is undefined, i.e. objects of this type τ
cannot be applied to objects of type σ.boolean apply(java.lang.Object x)
The type identifier predicate belonging to the type τ, is:
apply
in interface Predicate
x
- single Object argument
Class.isInstance(Object)
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |