Package dev.enola.datatype
Record Class ImmutableDatatype<T>
java.lang.Object
java.lang.Record
dev.enola.datatype.ImmutableDatatype<T>
- All Implemented Interfaces:
Datatype<T>
-
Constructor Summary
ConstructorsConstructorDescriptionImmutableDatatype(String iri) ImmutableDatatype(String iri, ObjectToStringBiConverter<T> stringConverter, Class<T> javaType) ImmutableDatatype(String iri, ObjectToStringBiConverter<T> stringConverter, Class<T> javaType, String pattern) ImmutableDatatype(String iri, ObjectToStringBiConverter<T> stringConverter, Class<T> javaType, Pattern pattern) ImmutableDatatype(String iri, Optional<Pattern> pattern, ObjectToStringBiConverter<T> stringConverter, Optional<Class<T>> javaType) Creates an instance of aImmutableDatatyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionchild()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iri()Returns the value of theirirecord component.javaType()Returns the value of thejavaTyperecord component.pattern()Returns the value of thepatternrecord component.Returns the value of thestringConverterrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.enola.datatype.Datatype
stringConverterFromObject
-
Constructor Details
-
ImmutableDatatype
public ImmutableDatatype(String iri, Optional<Pattern> pattern, ObjectToStringBiConverter<T> stringConverter, Optional<Class<T>> javaType) Creates an instance of aImmutableDatatyperecord class.- Parameters:
iri- the value for theirirecord componentpattern- the value for thepatternrecord componentstringConverter- the value for thestringConverterrecord componentjavaType- the value for thejavaTyperecord component
-
ImmutableDatatype
-
ImmutableDatatype
public ImmutableDatatype(String iri, ObjectToStringBiConverter<T> stringConverter, Class<T> javaType) -
ImmutableDatatype
public ImmutableDatatype(String iri, ObjectToStringBiConverter<T> stringConverter, Class<T> javaType, Pattern pattern) -
ImmutableDatatype
public ImmutableDatatype(String iri, ObjectToStringBiConverter<T> stringConverter, Class<T> javaType, String pattern)
-
-
Method Details
-
child
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
iri
Returns the value of theirirecord component. -
pattern
Returns the value of thepatternrecord component. -
stringConverter
Returns the value of thestringConverterrecord component.- Specified by:
stringConverterin interfaceDatatype<T>- Returns:
- the value of the
stringConverterrecord component
-
javaType
Returns the value of thejavaTyperecord component.
-