Interface SimpleType
- All Known Subinterfaces:
TypeCollection,TypeScalar
- All Known Implementing Classes:
TypeBase,TypeCollectionImpl,TypeScalarImpl
public interface SimpleType
A simplified typ class for capturing scalar types and collection types with a lower bounded type.
- TypeScalar.from(Integer.class), TypeScalar.from(RdfPerson.class)
- new TypeCollection(List.class, TypeScalar.from(RdfPerson.class) -> List<? extends RdfPerson>
- Author:
- raven
-
Method Summary
Modifier and TypeMethodDescriptionasScalar()booleanbooleanisScalar()stricterType(SimpleType other) Attempt to yield the stricter type of this and the other.
-
Method Details
-
isScalar
boolean isScalar() -
isCollection
boolean isCollection() -
asScalar
TypeScalar asScalar() -
asCollection
TypeCollection asCollection() -
stricterType
Attempt to yield the stricter type of this and the other. For example, if B extends A, Type[A].stricterType(Type[B]) yields B. Type[Collection].stricterType(Set)] yields Set If there is no common type, null is returned- Parameters:
other-- Returns:
-