indexing
description: "Integer values coded on 16 bits"
legal: "See notice at end of class."
status: "See notice at end of class."
external_name: "System.Int16"
assembly: "mscorlib"
date: "$Date: 2006-08-04 06:13:21 -0700 (Fri, 04 Aug 2006) $"
revision: "$Revision: 62257 $"
frozen expanded class interface
INTEGER_16
create
default_create
ANY
make_from_reference (v: INTEGER_16_REF)
`Current'`v.item'
INTEGER_16_REF
require INTEGER_16_REF
v_not_void: v /= Void
ensure INTEGER_16_REF
item_set: item = v.item
convert
make_from_reference ({INTEGER_16_REF}),
make_from_reference: {REAL_32},
make_from_reference: {REAL_64},
make_from_reference: {INTEGER_32},
make_from_reference: {INTEGER_64}
feature
generating_type: STRING_8
ANY
generator: STRING_8
ANY
hash_code: INTEGER_32
INTEGER_16_REF
ensure HASHABLE
good_hash_value: Result >= 0
item: INTEGER_16
INTEGER_16_REF
max_value: INTEGER_16 is 32767
item
INTEGER_16_REF
min_value: INTEGER_16 is -32768
INTEGER_16_REF
one: like Current
INTEGER_16_REF
ensure NUMERIC
result_exists: Result /= Void
sign: INTEGER_16
INTEGER_16_REF
ensure INTEGER_16_REF
three_way: Result = three_way_comparison (zero)
zero: like Current
INTEGER_16_REF
ensure NUMERIC
result_exists: Result /= Void
feature
frozen deep_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
shallow_implies_deep: standard_equal (some, other) implies Result
both_or_none_void: (some = Void) implies (Result = (other = Void))
same_type: (Result and (some /= Void)) implies some.same_type (other)
symmetric: Result implies deep_equal (other, some)
frozen equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.is_equal (other))
is_equal (other: like Current): BOOLEAN
`other'
INTEGER_16_REF
require ANY
other_not_void: other /= Void
ensure ANY
symmetric: Result implies other.is_equal (Current)
consistent: standard_is_equal (other) implies Result
ensure then COMPARABLE
trichotomy: Result = (not (Current < other) and not (other < Current))
max (other: like Current): like Current
`other'
COMPARABLE
require COMPARABLE
other_exists: other /= Void
ensure COMPARABLE
current_if_not_smaller: Current >= other implies Result = Current
other_if_smaller: Current < other implies Result = other
min (other: like Current): like Current
`other'
COMPARABLE
require COMPARABLE
other_exists: other /= Void
ensure COMPARABLE
current_if_not_greater: Current <= other implies Result = Current
other_if_greater: Current > other implies Result = other
frozen standard_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.standard_is_equal (other))
frozen standard_is_equal (other: like Current): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
same_type: Result implies same_type (other)
symmetric: Result implies other.standard_is_equal (Current)
three_way_comparison (other: like Current): INTEGER_32
`other'
COMPARABLE
require COMPARABLE
other_exists: other /= Void
ensure COMPARABLE
equal_zero: (Result = 0) = is_equal (other)
smaller_negative: (Result = -1) = (Current < other)
greater_positive: (Result = 1) = (Current > other)
infix "<" (other: like Current): BOOLEAN
`other'
INTEGER_16_REF
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
asymmetric: Result implies not (other < Current)
infix "<=" (other: like Current): BOOLEAN
`other'
COMPARABLE
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
definition: Result = ((Current < other) or is_equal (other))
infix ">" (other: like Current): BOOLEAN
`other'
COMPARABLE
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
definition: Result = (other < Current)
infix ">=" (other: like Current): BOOLEAN
`other'
COMPARABLE
require PART_COMPARABLE
other_exists: other /= Void
ensure then COMPARABLE
definition: Result = (other <= Current)
feature
conforms_to (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
divisible (other: INTEGER_16_REF): BOOLEAN
`other'
INTEGER_16_REF
require NUMERIC
other_exists: other /= Void
ensure then INTEGER_16_REF
value: Result = (other.item /= 0)
exponentiable (other: NUMERIC): BOOLEAN
`other'
INTEGER_16_REF
require NUMERIC
other_exists: other /= Void
ensure then INTEGER_16_REF
safe_values: ((other.conforms_to (0) and item /= 0) or (other.conforms_to (0.0) and item > 0)) implies Result
is_hashable: BOOLEAN
INTEGER_16_REF
ensure HASHABLE
ok_if_not_default: Result implies (Current /= default)
is_valid_character_32_code: BOOLEAN
INTEGER_16_REF
is_valid_character_8_code: BOOLEAN
INTEGER_16_REF
same_type (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
definition: Result = (conforms_to (other) and other.conforms_to (Current))
feature
set_item (i: INTEGER_16)
`i'item
INTEGER_16_REF
ensure INTEGER_16_REF
item_set: item = i
feature
frozen as_integer_16: INTEGER_16
item
INTEGER_16_REF
frozen as_integer_32: INTEGER_32
item
INTEGER_16_REF
frozen as_integer_64: INTEGER_64
item
INTEGER_16_REF
frozen as_integer_8: INTEGER_8
item
INTEGER_16_REF
frozen as_natural_16: NATURAL_16
item
INTEGER_16_REF
frozen as_natural_32: NATURAL_32
item
INTEGER_16_REF
frozen as_natural_64: NATURAL_64
item
INTEGER_16_REF
frozen as_natural_8: NATURAL_8
item
INTEGER_16_REF
frozen to_boolean: BOOLEAN
zero
INTEGER_16_REF
to_character_32: CHARACTER_32
INTEGER_16_REF
require INTEGER_16_REF
valid_character: is_valid_character_32_code
to_character_8: CHARACTER_8
INTEGER_16_REF
require INTEGER_16_REF
valid_character: is_valid_character_8_code
frozen to_double: REAL_64
item
INTEGER_16_REF
to_hex_character: CHARACTER_8
item
INTEGER_16_REF
require INTEGER_16_REF
in_bounds: 0 <= item and item <= 15
ensure INTEGER_16_REF
valid_character: ("0123456789ABCDEF").has (Result)
to_hex_string: STRING_8
item
INTEGER_16_REF
ensure INTEGER_16_REF
result_not_void: Result /= Void
result_valid_count: Result.count = (create {PLATFORM}).integer_16_bits // 4
frozen to_integer: INTEGER_32
item
INTEGER_16_REFto_integer_32
INTEGER_16_REF
frozen to_integer_16: INTEGER_16
item
INTEGER_16_REF
frozen to_integer_32: INTEGER_32
item
INTEGER_16_REFto_integer
INTEGER_16_REF
frozen to_integer_64: INTEGER_64
item
INTEGER_16_REF
frozen to_integer_8: INTEGER_8
item
INTEGER_16_REF
require INTEGER_16_REF
not_too_small: item >= {INTEGER_8}.min_value
not_too_big: item <= {INTEGER_8}.max_value
frozen to_natural_16: NATURAL_16
item
INTEGER_16_REF
require INTEGER_16_REF
item_non_negative: item >= 0
frozen to_natural_32: NATURAL_32
item
INTEGER_16_REF
require INTEGER_16_REF
item_non_negative: item >= 0
frozen to_natural_64: NATURAL_64
item
INTEGER_16_REF
require INTEGER_16_REF
item_non_negative: item >= 0
frozen to_natural_8: NATURAL_8
item
INTEGER_16_REF
require INTEGER_16_REF
item_non_negative: item >= 0
not_too_big: item <= {NATURAL_8}.max_value
frozen to_real: REAL_32
item
INTEGER_16_REF
to_reference: INTEGER_16_REF
INTEGER_16_REF
ensure INTEGER_16_REF
to_reference_not_void: Result /= Void
feature
copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_equal: is_equal (other)
frozen deep_copy (other: like Current)
copy`other'deep_twin
ANY
require ANY
other_not_void: other /= Void
ensure ANY
deep_equal: deep_equal (Current, other)
frozen deep_twin: like Current
ANY
ensure ANY
deep_equal: deep_equal (Current, Result)
frozen standard_copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_standard_equal: standard_is_equal (other)
frozen standard_twin: like Current
`other'
ANY
ensure ANY
standard_twin_not_void: Result /= Void
equal: standard_equal (Result, Current)
frozen twin: like Current
`Current'
twincopycopy
ANY
ensure ANY
twin_not_void: Result /= Void
is_equal: Result.is_equal (Current)
feature
abs: INTEGER_16
INTEGER_16_REF
ensure INTEGER_16_REF
non_negative: Result >= 0
same_absolute_value: (Result = item) or (Result = - item)
frozen default: like Current
ANY
frozen default_pointer: POINTER
`POINTER'
`p'default
`p'`POINTER'
ANY
default_rescue
ANY
frozen do_nothing
ANY
infix "*" (other: like Current): like Current
`other'
INTEGER_16_REF
require NUMERIC
other_exists: other /= Void
ensure NUMERIC
result_exists: Result /= Void
prefix "+": like Current
INTEGER_16_REF
ensure NUMERIC
result_exists: Result /= Void
infix "+" (other: like Current): like Current
`other'
INTEGER_16_REF
require NUMERIC
other_exists: other /= Void
ensure NUMERIC
result_exists: Result /= Void
commutative: equal (Result, other + Current)
prefix "-": like Current
INTEGER_16_REF
ensure NUMERIC
result_exists: Result /= Void
infix "-" (other: like Current): like Current
`other'
INTEGER_16_REF
require NUMERIC
other_exists: other /= Void
ensure NUMERIC
result_exists: Result /= Void
infix "/" (other: like Current): REAL_64
`other'
INTEGER_16_REF
require INTEGER_16_REF
other_exists: other /= Void
good_divisor: divisible (other)
infix "//" (other: like Current): like Current
`other'
INTEGER_16_REF
require NUMERIC
other_exists: other /= Void
good_divisor: divisible (other)
ensure NUMERIC
result_exists: Result /= Void
infix "\\" (other: like Current): like Current
`other'
INTEGER_16_REF
require INTEGER_16_REF
other_exists: other /= Void
good_divisor: divisible (other)
ensure INTEGER_16_REF
result_exists: Result /= Void
infix "^" (other: REAL_64): REAL_64
`other'
INTEGER_16_REF
infix "|..|" (other: INTEGER_32): INTEGER_INTERVAL
`other'
`other'
INTEGER_16_REF
feature
frozen bit_and (i: like Current): like Current
`i'
INTEGER_16_REFinfix "&"
INTEGER_16_REF
require INTEGER_16_REF
i_not_void: i /= Void
ensure INTEGER_16_REF
bitwise_and_not_void: Result /= Void
frozen bit_not: like Current
INTEGER_16_REF
ensure INTEGER_16_REF
bit_not_not_void: Result /= Void
frozen bit_or (i: like Current): like Current
`i'
INTEGER_16_REFinfix "|"
INTEGER_16_REF
require INTEGER_16_REF
i_not_void: i /= Void
ensure INTEGER_16_REF
bitwise_or_not_void: Result /= Void
frozen bit_shift (n: INTEGER_32): INTEGER_16
`n'`n'
INTEGER_16_REF
require INTEGER_16_REF
n_less_or_equal_to_16: n <= 16
n_greater_or_equal_to_minus_16: n >= -16
frozen bit_shift_left (n: INTEGER_32): like Current
`n'
INTEGER_16_REFinfix "|<<"
INTEGER_16_REF
require INTEGER_16_REF
n_nonnegative: n >= 0
n_less_or_equal_to_16: n <= 16
ensure INTEGER_16_REF
bit_shift_left_not_void: Result /= Void
frozen bit_shift_right (n: INTEGER_32): like Current
`n'
INTEGER_16_REFinfix "|>>"
INTEGER_16_REF
require INTEGER_16_REF
n_nonnegative: n >= 0
n_less_or_equal_to_16: n <= 16
ensure INTEGER_16_REF
bit_shift_right_not_void: Result /= Void
frozen bit_test (n: INTEGER_32): BOOLEAN
`n'
INTEGER_16_REF
require INTEGER_16_REF
n_nonnegative: n >= 0
n_less_than_16: n < 16
frozen bit_xor (i: like Current): like Current
`i'
INTEGER_16_REF
require INTEGER_16_REF
i_not_void: i /= Void
ensure INTEGER_16_REF
bitwise_xor_not_void: Result /= Void
frozen set_bit (b: BOOLEAN; n: INTEGER_32): INTEGER_16
`n'
`b'
INTEGER_16_REF
require INTEGER_16_REF
n_nonnegative: n >= 0
n_less_than_16: n < 16
frozen set_bit_with_mask (b: BOOLEAN; m: INTEGER_16): INTEGER_16
`b'
INTEGER_16_REF
frozen infix "&" (i: like Current): like Current
`i'
INTEGER_16_REFbit_and
INTEGER_16_REF
require INTEGER_16_REF
i_not_void: i /= Void
ensure INTEGER_16_REF
bitwise_and_not_void: Result /= Void
frozen infix "|" (i: like Current): like Current
`i'
INTEGER_16_REFbit_or
INTEGER_16_REF
require INTEGER_16_REF
i_not_void: i /= Void
ensure INTEGER_16_REF
bitwise_or_not_void: Result /= Void
frozen infix "|<<" (n: INTEGER_32): like Current
`n'
INTEGER_16_REFbit_shift_left
INTEGER_16_REF
require INTEGER_16_REF
n_nonnegative: n >= 0
n_less_or_equal_to_16: n <= 16
ensure INTEGER_16_REF
bit_shift_left_not_void: Result /= Void
frozen infix "|>>" (n: INTEGER_32): like Current
`n'
INTEGER_16_REFbit_shift_right
INTEGER_16_REF
require INTEGER_16_REF
n_nonnegative: n >= 0
n_less_or_equal_to_16: n <= 16
ensure INTEGER_16_REF
bit_shift_right_not_void: Result /= Void
feature
io: STD_FILES
ANY
out: STRING_8
INTEGER_16_REF
require DEBUG_OUTPUT
True
require ANY
True
ensure DEBUG_OUTPUT
result_not_void: Result /= Void
print (some: ANY)
`some'
ANY
frozen tagged_out: STRING_8
ANYout
ANY
feature
operating_environment: OPERATING_ENVIRONMENT
ANY
invariant
INTEGER_16_REF
sign_times_abs: sign * abs = item
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
COMPARABLE
irreflexive_comparison: not (Current < Current)
indexing
library: "EiffelBase: Library of reusable components for Eiffel."
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end INTEGER_16