Class: RDF::Literal::UnsignedShort

Inherits:
UnsignedInt show all
Defined in:
vendor/bundler/ruby/2.5.0/bundler/gems/rdf-xsd-d4b9d6c7dd20/lib/rdf/xsd/integer.rb

Overview

unsignedShort is derived from unsignedInt by setting the value of maxInclusive to be 65535. The base type of unsignedShort is unsignedInt.

Direct Known Subclasses

UnsignedByte

Constant Summary collapse

DATATYPE =
RDF::XSD.unsignedShort

Constants inherited from UnsignedLong

RDF::Literal::UnsignedLong::GRAMMAR

Constants inherited from NonNegativeInteger

NonNegativeInteger::GRAMMAR

Constants inherited from Integer

Integer::GRAMMAR

Constants inherited from Decimal

Decimal::GRAMMAR

Constants inherited from RDF::Literal

FALSE, TRUE, ZERO

Instance Attribute Summary

Attributes inherited from RDF::Literal

#datatype, #language

Instance Method Summary collapse

Methods inherited from Integer

#abs, #canonicalize!, #even?, #initialize, #nonzero?, #odd?, #pred, #round, #succ, #to_bn, #to_s, #zero?

Methods inherited from Decimal

#abs, #canonicalize!, #ceil, #floor, #initialize, #nonzero?, #round, #to_s, #zero?

Methods inherited from Numeric

#*, #+, #+@, #-, #-@, #/, #<=>, #==, #abs, #ceil, #floor, #round, #to_d, #to_f, #to_i, #to_r

Methods inherited from RDF::Literal

#==, #canonicalize!, #compatible?, #comperable_datatype?, #eql?, #escape, #has_datatype?, #has_language?, #hash, #humanize, #initialize, #inspect, #literal?, #method_missing, #object, #plain?, #respond_to_missing?, #simple?, #squish, #squish!, #to_s, #valid_extended?, #validate!, #value, #value_hash

Methods included from Term

#<=>, #==, #aggregate?, #compatible?, #eql?, #escape, #evaluate, #ndvars, #term?, #to_base, #to_term, #vars

Methods included from SPARQL::Algebra::Expression

cast, #constant?, #evaluate, extension, extensions, for, #invalid?, new, #node?, open, #optimize, parse, register_extension, #to_sxp_bin, #validate!, #variable?

Methods included from Value

#anonymous?, #canonicalize, #canonicalize!, #constant?, #graph?, #inspect, #inspect!, #invalid?, #iri?, #list?, #literal?, #node?, #resource?, #start_with?, #statement?, #term?, #to_nquads, #to_ntriples, #to_rdf, #to_term, #type_error, #uri?, #validate!, #variable?

Constructor Details

This class inherits a constructor from RDF::Literal::Integer

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RDF::Literal

Instance Method Details

#valid?Boolean

Returns:



173
174
175
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/rdf-xsd-d4b9d6c7dd20/lib/rdf/xsd/integer.rb', line 173

def valid?
  super && @object >= 0 && @object <= 65535
end