Class: RDF::Literal::NonNegativeInteger

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

Overview

nonNegativeInteger is derived from integer by setting the value of minInclusive to be 0. This results in the standard mathematical concept of the non-negative integers. The value space of nonNegativeInteger is the infinite set [0,1,2,...]. The base type of nonNegativeInteger is integer.

Direct Known Subclasses

PositiveInteger, UnsignedLong

Constant Summary collapse

GRAMMAR =
/^(?:(?:[\+\-]?0)|(?:\+?\d+))$/.freeze
DATATYPE =
RDF::XSD.nonNegativeInteger

Instance Method Summary collapse

Methods inherited from Integer

#to_sxp

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


118
119
120
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/rdf-xsd-e532a0ab7189/lib/rdf/xsd/integer.rb', line 118

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