~ubuntu-branches/debian/sid/php-cassandra/sid

« back to all changes in this revision

Viewing changes to cassandra-1.3.0/doc/Cassandra/Smallint.php

  • Committer: Package Import Robot
  • Author(s): Ondřej Surý
  • Date: 2017-04-18 17:16:30 UTC
  • Revision ID: package-import@ubuntu.com-20170418171630-fw8udixss0879s32
Tags: upstream-1.3.0
Import upstream version 1.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
/**
 
4
 * Copyright 2017 DataStax, Inc.
 
5
 *
 
6
 * Licensed under the Apache License, Version 2.0 (the "License");
 
7
 * you may not use this file except in compliance with the License.
 
8
 * You may obtain a copy of the License at
 
9
 *
 
10
 * http://www.apache.org/licenses/LICENSE-2.0
 
11
 *
 
12
 * Unless required by applicable law or agreed to in writing, software
 
13
 * distributed under the License is distributed on an "AS IS" BASIS,
 
14
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
15
 * See the License for the specific language governing permissions and
 
16
 * limitations under the License.
 
17
 */
 
18
 
 
19
namespace Cassandra;
 
20
 
 
21
/**
 
22
 * A PHP representation of the CQL `smallint` datatype.
 
23
 */
 
24
final class Smallint implements Value, Numeric {
 
25
 
 
26
    /**
 
27
     * Creates a new 16-bit signed integer.
 
28
     *
 
29
     * @param int|double|string $value The value as an integer, double or string
 
30
     */
 
31
    public function __construct($value) { }
 
32
 
 
33
    /**
 
34
     * @return string
 
35
     */
 
36
    public function __toString() { }
 
37
 
 
38
    /**
 
39
     * The type of this value (smallint).
 
40
     *
 
41
     * @return Type
 
42
     */
 
43
    public function type() { }
 
44
 
 
45
    /**
 
46
     * Returns the integer value.
 
47
     *
 
48
     * @return int integer value
 
49
     */
 
50
    public function value() { }
 
51
 
 
52
    /**
 
53
     * @param Numeric $num a number to add to this one
 
54
     * @return Numeric sum
 
55
     */
 
56
    public function add($num) { }
 
57
 
 
58
    /**
 
59
     * @param Numeric $num a number to subtract from this one
 
60
     * @return Numeric difference
 
61
     */
 
62
    public function sub($num) { }
 
63
 
 
64
    /**
 
65
     * @param Numeric $num a number to multiply this one by
 
66
     * @return Numeric product
 
67
     */
 
68
    public function mul($num) { }
 
69
 
 
70
    /**
 
71
     * @param Numeric $num a number to divide this one by
 
72
     * @return Numeric quotient
 
73
     */
 
74
    public function div($num) { }
 
75
 
 
76
    /**
 
77
     * @param Numeric $num a number to divide this one by
 
78
     * @return Numeric remainder
 
79
     */
 
80
    public function mod($num) { }
 
81
 
 
82
    /**
 
83
     * @return Numeric absolute value
 
84
     */
 
85
    public function abs() { }
 
86
 
 
87
    /**
 
88
     * @return Numeric negative value
 
89
     */
 
90
    public function neg() { }
 
91
 
 
92
    /**
 
93
     * @return Numeric square root
 
94
     */
 
95
    public function sqrt() { }
 
96
 
 
97
    /**
 
98
     * @return int this number as int
 
99
     */
 
100
    public function toInt() { }
 
101
 
 
102
    /**
 
103
     * @return float this number as float
 
104
     */
 
105
    public function toDouble() { }
 
106
 
 
107
    /**
 
108
     * Minimum possible Smallint value
 
109
     *
 
110
     * @return Smallint minimum value
 
111
     */
 
112
    public static function min() { }
 
113
 
 
114
    /**
 
115
     * Maximum possible Smallint value
 
116
     *
 
117
     * @return Smallint maximum value
 
118
     */
 
119
    public static function max() { }
 
120
 
 
121
}