class RDF::Literal::NegativeInteger
negativeInteger is derived from nonPositiveInteger by setting the value of maxInclusive to be -1. This results in the standard mathematical concept of the negative integers. The value space of negativeInteger is the infinite set ‘{…,-2,-1}`. The base type of negativeInteger is nonPositiveInteger.
@see www.w3.org/TR/2004/REC-xmlschema-2-20041028/#negativeInteger
Constants
- DATATYPE
- GRAMMAR
Public Instance Methods
-@()
click to toggle source
Returns ‘self` negated.
@return [RDF::Literal::Numeric]
# File lib/rdf/xsd/integer.rb, line 43 def -@ if object != 0 # XXX Raise error? end self.class.new(-self.object) end
valid?()
click to toggle source
Calls superclass method
RDF::Literal::NonPositiveInteger#valid?
# File lib/rdf/xsd/integer.rb, line 50 def valid? super && @object < 0 end