blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 3
616
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
112
| license_type
stringclasses 2
values | repo_name
stringlengths 5
115
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 777
values | visit_date
timestamp[us]date 2015-08-06 10:31:46
2023-09-06 10:44:38
| revision_date
timestamp[us]date 1970-01-01 02:38:32
2037-05-03 13:00:00
| committer_date
timestamp[us]date 1970-01-01 02:38:32
2023-09-06 01:08:06
| github_id
int64 4.92k
681M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us]date 2012-06-04 01:52:49
2023-09-14 21:59:50
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-21 12:35:19
⌀ | gha_language
stringclasses 149
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 2
classes | is_generated
bool 2
classes | length_bytes
int64 3
10.2M
| extension
stringclasses 188
values | content
stringlengths 3
10.2M
| authors
listlengths 1
1
| author_id
stringlengths 1
132
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d02961f6bb0710a6363c4a70e20835eb34887b2a
|
b681f93e6790f86f5710820e5ba3aa35fefa6f25
|
/Fred2/Apps/EpitopeAssembly.py
|
e0422ad80f47fb04fc50623c73547ae310e60a65
|
[] |
no_license
|
SteffenK12/Fred2
|
89be9d081cae4dda6be6ba49c13155910f4ecd00
|
4d627ee1f28380efb3c6af61895623d33ff8785d
|
refs/heads/master
| 2020-04-05T23:39:27.786786 | 2015-10-09T14:18:37 | 2015-10-09T14:18:37 | 44,380,401 | 0 | 0 | null | 2015-10-16T11:18:44 | 2015-10-16T11:18:44 | null |
UTF-8
|
Python
| false | false | 5,349 |
py
|
__author__ = 'schubert'
import argparse, sys, os
from Fred2.Core.Peptide import Peptide
from Fred2.Core.Base import ACleavageSitePrediction
from Fred2.IO.FileReader import read_lines
from Fred2.EpitopeAssembly.EpitopeAssembly import EpitopeAssembly
from Fred2.CleavagePrediction import CleavageSitePredictorFactory
def main():
parser = argparse.ArgumentParser(description="Reads peptide sequences and predicts best arrangement "+
"for a string-of-beats peptide vaccine based on proteasomal cleavage prediction.")
parser.add_argument("-i", "--input",
nargs="+",
required=True,
help="peptide file (one peptide per line),"
+" or peptide sequences as sequences (max 50)"
)
input_types = parser.add_mutually_exclusive_group(required=True)
input_types.add_argument("-pf","--pepfile",
action="store_true",
help= "Specifies the input as peptide file")
input_types.add_argument("-p","--peptide",
action="store_true",
help= "Specifies the input as peptide sequences")
parser.add_argument("-m", "--method",
default="PCM",
help="Specifies the Cleavage Site prediction tool to use - default PCM."
)
parser.add_argument("-s", "--solver",
default="glpk",
help="Specifies the ILP solver to use (must be installed) - default glpk"
)
parser.add_argument("-o", "--output",
required=True,
help="Specifies the output path. Results will be written to CSV")
parser.add_argument("-v", "--verbose",
action="store_true",
help="Specifies verbose run."
)
parser.add_argument("-am", "--available",
required=False,
action="store_true",
help="Returns all available methods and their allele models.")
#COMMENT: These options are hidden and only used for ETK2
parser.add_argument("-html", "--html",
required=False,
action="store_true",
help=argparse.SUPPRESS)
parser.add_argument("-od", "--outdir",
required=False,
default="",
help=argparse.SUPPRESS)
args = parser.parse_args()
if args.available:
for pred, obj in ACleavageSitePrediction.registry.iteritems():
if pred not in ["ACleavageSitePrediction", "APSSMCleavageSitePredictor"]:
print "Method: ",pred
print "Supported Length: ", " ".join(map(str, getattr(obj, "_"+pred+"__supported_length")))
print
sys.exit(0)
if args.pepfile:
peptides = read_lines(args.input, type="Peptide")
else:
peptides = [Peptide(s) for s in args.input]
cleav_pred = CleavageSitePredictorFactory(args.method)
assembler = EpitopeAssembly(peptides, cleav_pred, solver=args.solver, verbosity=1 if args.verbose else 0)
result = assembler.solve()
output = args.output if args.outdir == "" else args.outdir + os.path.basename(args.output)
with open(output, "w") as out:
out.write("Order,Peptide\n")
out.write("\n".join("%i,%s"%(i+1,str(p)) for i, p in enumerate(result)))
if args.html:
begin_html = """<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/static/style/etk.css" type="text/css" />
<script type="text/javascript" src="/static/scripts/libs/jquery/jquery.js"></script>
<script type="text/javascript" src="/static/scripts/libs/jquery/jquery.tablesorter.js"></script>
<script type="text/javascript" src="/static/scripts/libs/etk.js"></script>
</head>
<body>
<div class="document">"""
setting = """ <h2 class="etk-heading">Peptide String-of-Beats Design</h2>
<table class="etk-parameterT">
<tr> <th class ="etk-innerHeading" colspan="2"> Parameters </th></tr>
<tr>
<th>Cleave Site Prediction Method:</th>
<td>%s</td>
</tr>
</table>"""%args.method
table="""
<input id="etk-search" placeholder=" filter">
<table class="etk-sortT etk-resultsT etk-filterT">
<thead>
<tr>
<th>Order</th><th>Peptide</th>
</tr>
</thead>"""+"".join("<tr><td>%i</td><td>%s</td></tr>"%(i+1,p) for i, p in enumerate(result))+"</table>"
end_html = "</div></body></html>"
html_out = ".".join(output.split(".")[:-1])+".html"
with open(html_out, "w") as html_o:
html_o.write(begin_html+setting+table+end_html)
if __name__ == "__main__":
main()
|
[
"[email protected]"
] | |
6b98fd9480c24ce1dfbab89aa37782b26192a924
|
4e04db11d891f869a51adf0e0895999d425f29f6
|
/tests/accounting/testcases/tc_connect.py
|
3461941a88ef6bf289dc812d1e69a820ca204837
|
[] |
no_license
|
mthangaraj/ix-ec-backend
|
21e2d4b642c1174b53a86cd1a15564f99985d23f
|
11b80dbd665e3592ed862403dd8c8d65b6791b30
|
refs/heads/master
| 2022-12-12T12:21:29.237675 | 2018-06-20T13:10:21 | 2018-06-20T13:10:21 | 138,033,811 | 0 | 0 | null | 2022-06-27T16:54:14 | 2018-06-20T13:04:22 |
JavaScript
|
UTF-8
|
Python
| false | false | 2,283 |
py
|
from rest_framework.test import APITestCase
from portalbackend.lendapi.accounts.models import Company
from tests.constants import ResponseCodeConstant, CompanyConstant, TestConstants
from tests.utils import TestUtils
class _001_ConnectionTestCase(APITestCase):
"""
Tests the Connection View
"""
def setUp(self):
self.userid = ''
self.superuser = TestUtils._create_superuser()
self.company = TestUtils._create_company(1, CompanyConstant.COMPANY_NAME_001)
TestUtils._create_companymeta(self.company.id)
self.user = TestUtils._create_user('ut_user001', self.company.id)
self.login = TestUtils._admin_login(self.client)
def test_001_connect_company_success(self):
"""
Creating connection for given company
"""
TestUtils._create_accounting_configuration(Company.QUICKBOOKS)
self.data = {
"company": self.company.id
}
response = self.client.get('/lend/v1/connect/', self.data, format='json', secure=TestConstants.SECURE_CONNECTION,
HTTP_HOST=TestConstants.HOST_URL)
code = response.status_code
self.assertEqual(code, ResponseCodeConstant.REDIRECT_302)
def test_002_connect_company_without_company_id(self):
"""
Creating connection for not existing company
"""
TestUtils._create_accounting_configuration(Company.QUICKBOOKS)
self.data = {
}
response = self.client.get('/lend/v1/connect/', self.data, format='json', secure=TestConstants.SECURE_CONNECTION,
HTTP_HOST=TestConstants.HOST_URL)
code = response.status_code
self.assertEqual(code, ResponseCodeConstant.RESOURCE_NOT_FOUND_404)
def test_003_connect_company_without_accounting_configuration(self):
"""
Creating connection for given company without accounting configuration
"""
self.data = {
}
response = self.client.get('/lend/v1/connect/', self.data, format='json', secure=TestConstants.SECURE_CONNECTION,
HTTP_HOST=TestConstants.HOST_URL)
code = response.status_code
self.assertEqual(code, ResponseCodeConstant.RESOURCE_NOT_FOUND_404)
|
[
"[email protected]"
] | |
d99d4beeb8c042e0badd83d8956a7da9fada0dea
|
885e488098bb3482ac86146cdf708ac039b33718
|
/Part/伊斯塔战灵.py
|
9588f3cabdce7892e074b1ff2716c8e0b301e250
|
[] |
no_license
|
bunemp/DNFCalculating
|
e17c3aa87b1225080311e37268bd2817c91b8548
|
2099aff612999694a1a9313b1f50063780ab9ba5
|
refs/heads/master
| 2022-11-26T23:51:32.488619 | 2020-08-04T13:40:25 | 2020-08-04T13:40:25 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 15,265 |
py
|
from PublicReference.base import *
class 伊斯塔战灵主动技能(主动技能):
def 等效CD(self, 武器类型):
if 武器类型 == '矛':
return round(self.CD / self.恢复 * 1.05, 1)
if 武器类型 == '棍棒':
return round(self.CD / self.恢复 * 0.95, 1)
class 伊斯塔战灵技能0(被动技能):
名称 = '尼巫的战斗术'
所在等级=15
等级上限=11
基础等级=1
def 加成倍率(self, 武器类型):
if self.等级==0:
return 1.0
else:
return round(1.18+0.02*self.等级,3)
class 伊斯塔战灵技能1(被动技能):
名称 = '炫纹'
所在等级=15
等级上限=60
基础等级=46
def 加成倍率(self, 武器类型):
if self.等级==0:
return 1.0
else:
return round(1.20+0.00*self.等级,3)
class 伊斯塔战灵技能2(被动技能):
名称='矛精通'
所在等级=20
等级上限=30
基础等级=20
def 加成倍率(self, 武器类型):
if self.等级==0 or 武器类型 != '矛':
return 1.0
if self.等级<=20:
return round(1.00+0.01*self.等级,3)
if self.等级>20:
return round(0.80+0.02*self.等级,3)
def 物理攻击力倍率(self, 武器类型):
return self.加成倍率(武器类型)
def 魔法攻击力倍率(self, 武器类型):
return self.加成倍率(武器类型)
class 伊斯塔战灵技能3(被动技能):
名称='棍棒精通'
所在等级=20
等级上限=30
基础等级=20
def 加成倍率(self, 武器类型):
if self.等级==0 or 武器类型 != '棍棒':
return 1.0
if self.等级<=20:
return round(1.00+0.01*self.等级,3)
if self.等级>20:
return round(0.80+0.02*self.等级,3)
def 物理攻击力倍率(self, 武器类型):
return self.加成倍率(武器类型)
def 魔法攻击力倍率(self, 武器类型):
return self.加成倍率(武器类型)
class 伊斯塔战灵技能4(伊斯塔战灵主动技能):
名称 = '炫纹发射'
备注 = '(个数,TP为强化炫纹)'
所在等级=15
等级上限=60
基础等级=46
基础=326.00
成长=37.00
CD=0.25
TP成长=0.10
TP上限 = 1
class 伊斯塔战灵技能5(伊斯塔战灵主动技能):
名称='碎霸'
所在等级=30
等级上限=60
基础等级=38
基础=4133.2790
成长=476.7209
CD=8
TP成长=0.10
TP上限 = 5
额外倍率 = 0
触发概率 = 0
def 等效百分比(self, 武器类型):
return (1 + self.额外倍率 * self.触发概率) * super().等效百分比(武器类型)
class 伊斯塔战灵技能6(伊斯塔战灵主动技能):
名称='流星闪影击'
所在等级=35
等级上限=60
基础等级=36
基础=7762.4285
成长=876.5714
CD=20
TP成长=0.10
TP上限 = 5
class 伊斯塔战灵技能7(伊斯塔战灵主动技能):
名称='炫纹强压'
所在等级=35
等级上限=60
基础等级=36
基础=8777
成长=991
CD=25
TP成长=0.10
TP上限 = 5
是否有护石=1
演出时间 = 1.4
def 装备护石(self):
self.倍率*=1.23
self.CD *= 0.92
class 伊斯塔战灵技能8(伊斯塔战灵主动技能):
名称='强袭流星打'
所在等级=40
等级上限=60
基础等级=33
基础=8884.8461
成长=1025.1538
CD=25
TP成长=0.10
TP上限 = 5
是否有护石=1
def 装备护石(self):
self.倍率*=1.18
class 伊斯塔战灵技能9(伊斯塔战灵主动技能):
名称='煌龙偃月'
所在等级=45
等级上限=60
基础等级=31
基础 = 3542.2972
成长 = 408.7027
攻击次数 = 1.0
基础2 = 1181.7837
成长2 = 136.2162
攻击次数2 = 7.0
基础3 = 5056.6216
成长3 = 584.3783
攻击次数3 = 1.0
CD=45
TP成长=0.10
TP上限 = 5
是否有护石=1
演出时间 = 3
def 装备护石(self):
self.倍率*=1.24
class 伊斯塔战灵技能10(伊斯塔战灵主动技能):
名称='煌龙乱舞'
所在等级=45
等级上限=60
基础等级=31
基础 = 1205.7027
成长 = 136.2972
攻击次数 = 5.0
基础2 = 9052.8918
成长2 = 1022.1081
攻击次数2 = 1.0
CD=45
TP成长=0.10
TP上限 = 5
是否有护石=1
演出时间 = 3
def 装备护石(self):
self.倍率*=1.255
class 伊斯塔战灵技能11(被动技能):
名称='斗神意志'
所在等级=48
等级上限=40
基础等级=20
def 加成倍率(self, 武器类型):
if self.等级==0:
return 1.0
else:
return round(1.05+0.02*self.等级,3)
class 伊斯塔战灵技能12(伊斯塔战灵主动技能):
名称='星纹陨爆'
所在等级=50
等级上限=40
基础等级=12
基础=40144.7058
成长=12119.2941
CD=145.0
演出时间 = 2
class 伊斯塔战灵技能13(伊斯塔战灵主动技能):
名称 = '变身贝亚娜'
备注 = '(一轮)'
所在等级=50
等级上限=1
基础等级=1
基础 = 294.9333
成长 = 90.0667
攻击次数 = 4.0
基础2 = 735.6
成长2 = 225.4
攻击次数2 = 1.0
CD=1
class 伊斯塔战灵技能14(伊斯塔战灵主动技能):
名称='变身贝亚娜苍天击'
所在等级=50
等级上限=1
基础等级=1
基础=1107.4
成长=338.6
CD=1
class 伊斯塔战灵技能15(伊斯塔战灵主动技能):
名称='变身贝亚娜天地碎霸'
所在等级=50
等级上限=1
基础等级=1
基础 = 509.5333
成长 = 187.4667
攻击次数 = 1.0
基础2 = 2245.2667
成长2 = 806.7333
攻击次数2 = 1.0
CD=7
class 伊斯塔战灵技能16(伊斯塔战灵主动技能):
名称='闪击碎霸'
所在等级=60
等级上限=40
基础等级=23
基础=14049.625
成长=1586.375
CD=30
TP成长=0.10
TP上限 = 5
是否有护石=1
演出时间 = 0.9
def 装备护石(self):
self.倍率*=1.15
self.CD *=0.90
class 伊斯塔战灵技能17(伊斯塔战灵主动技能):
名称='流星雷连击'
所在等级=70
等级上限=40
基础等级=18
基础=23187.8889
成长=2616.1111
CD=50
TP成长=0.10
TP上限 = 5
是否有护石=1
def 装备护石(self):
self.倍率*=1.10
class 伊斯塔战灵技能18(被动技能):
名称='战灵潜能'
所在等级=75
等级上限=40
基础等级=11
def 加成倍率(self, 武器类型):
if self.等级==0:
return 1.0
else:
return round(1.22+0.02*self.等级,3)
class 伊斯塔战灵技能19(伊斯塔战灵主动技能):
名称='炫纹簇'
所在等级=75
等级上限=40
基础等级=16
基础 = 4935.8125
成长 = 557.1875
攻击次数 = 7.0
CD=45
演出时间 = 1.3
class 伊斯塔战灵技能20(伊斯塔战灵主动技能):
名称='使徒之舞'
所在等级=80
等级上限=40
基础等级=13
基础 = 1449.333
成长 = 163.6923
攻击次数 = 3.0
基础2 = 2900.769
成长2 = 327.2307
攻击次数2 = 1.0
基础3 = 29006.3076
成长3 = 3272.6923
攻击次数3 = 1.0
CD=40
class 伊斯塔战灵技能21(伊斯塔战灵主动技能):
名称='使徒化身'
所在等级=85
等级上限=40
基础等级=5
基础 = 39871.1428
成长 = 12035.8571
攻击次数 = 1.0
基础2 = 26580.1428
成长2 = 8023.8571
攻击次数2 = 1.0
CD=180
class 伊斯塔战灵技能22(被动技能):
名称 = '卓越之力'
所在等级 = 95
等级上限 = 40
基础等级 = 4
def 加成倍率(self, 武器类型):
if self.等级 == 0:
return 1.0
else:
return round(1.18 + 0.02 * self.等级, 5)
class 伊斯塔战灵技能23(被动技能):
名称 = '超卓之心'
所在等级 = 95
等级上限 = 11
基础等级 = 1
def 加成倍率(self, 武器类型):
if self.等级 == 0:
return 1.0
else:
return round(1.045 + 0.005 * self.等级, 5)
class 伊斯塔战灵技能24(被动技能):
名称 = '觉醒之抉择'
所在等级 = 100
等级上限 = 40
基础等级 = 2
关联技能 = ['无']
def 加成倍率(self, 武器类型):
if self.等级 == 0:
return 1.0
else:
return round(1.10 + 0.05 * self.等级, 5)
class 伊斯塔战灵技能25(伊斯塔战灵主动技能):
名称='基本攻击'
备注 = '(一轮,TP为基础精通)'
所在等级=1
等级上限=1
基础等级=1
基础 = 225.2*2.662
基础2 = 1.16 * 225.2*2.662
基础3 = 1.8 * 225.2*2.662
CD=1
TP成长=0.10
TP上限 = 3
class 伊斯塔战灵技能26(被动技能):
名称 = '基础精通'
倍率 = 1.0
所在等级 = 1
等级上限 = 200
基础等级 = 100
关联技能 = ['基本攻击']
def 加成倍率(self, 武器类型):
if self.等级 == 0:
return 1.0
else:
return round(self.倍率 * (0.463 + 0.089 * self.等级), 5)
伊斯塔战灵技能列表 = []
i = 0
while i >= 0:
try:
exec('伊斯塔战灵技能列表.append(伊斯塔战灵技能'+str(i)+'())')
i += 1
except:
i = -1
伊斯塔战灵技能序号 = dict()
for i in range(len(伊斯塔战灵技能列表)):
伊斯塔战灵技能序号[伊斯塔战灵技能列表[i].名称] = i
伊斯塔战灵一觉序号 = 12
伊斯塔战灵二觉序号 = 0
伊斯塔战灵三觉序号 = 0
for i in 伊斯塔战灵技能列表:
if i.所在等级 == 85:
伊斯塔战灵二觉序号 = 伊斯塔战灵技能序号[i.名称]
if i.所在等级 == 100:
伊斯塔战灵三觉序号 = 伊斯塔战灵技能序号[i.名称]
伊斯塔战灵护石选项 = ['无']
for i in 伊斯塔战灵技能列表:
if i.是否有伤害 == 1 and i.是否有护石 == 1:
伊斯塔战灵护石选项.append(i.名称)
伊斯塔战灵符文选项 = ['无']
for i in 伊斯塔战灵技能列表:
if i.所在等级 >= 20 and i.所在等级 <= 80 and i.所在等级 != 50 and i.是否有伤害 == 1:
伊斯塔战灵符文选项.append(i.名称)
class 伊斯塔战灵角色属性(角色属性):
实际名称 = '伊斯塔战灵'
角色 = '魔法师(女)'
职业 = '战斗法师'
武器选项 = ['矛', '棍棒']
伤害类型选择 = ['物理百分比', '魔法百分比']
伤害类型 = '物理百分比'
防具类型 = '皮甲'
防具精通属性 = ['力量', '智力']
主BUFF = 1.790
远古记忆 = 0
def __init__(self):
基础属性输入(self)
self.技能栏= deepcopy(伊斯塔战灵技能列表)
self.技能序号= deepcopy(伊斯塔战灵技能序号)
def 被动倍率计算(self):
if self.武器类型 == '矛':
self.技能栏[self.技能序号['棍棒精通']].关联技能 = ['无']
elif self.武器类型 == '棍棒':
self.技能栏[self.技能序号['矛精通']].关联技能 = ['无']
for i in [13, 14, 15]:
self.技能栏[i].等级 = self.技能栏[12].等级
super().被动倍率计算()
def 站街力量(self):
return int(max(self.力量,self.智力))
def 站街智力(self):
return self.站街力量()
def 面板力量(self):
return max(super().面板力量(), super().面板智力())
def 面板智力(self):
return self.面板力量()
def 装备基础(self):
self.防具基础()
for i in [9,10]:
temp = 装备列表[装备序号[self.装备栏[i]]]
if temp.所属套装 != '智慧产物':
x = 左右计算(temp.等级,temp.品质,self.强化等级[i])
self.力量 += x
self.智力 += x
for i in range(0,12):
temp = 装备列表[装备序号[self.装备栏[i]]]
if self.是否增幅[i] and temp.所属套装 != '智慧产物':
x = 增幅计算(temp.等级,temp.品质,self.强化等级[i])
if '物理' in self.伤害类型 or '力量' in self.伤害类型:
self.力量 += x
else:
self.智力 += x
temp = 装备列表[装备序号[self.装备栏[11]]]
if temp.所属套装 != '智慧产物':
self.物理攻击力 += 武器计算(temp.等级,temp.品质,self.强化等级[11],self.武器类型,'魔法')
self.魔法攻击力 += 武器计算(temp.等级,temp.品质,self.强化等级[11],self.武器类型,'魔法')
self.独立攻击力 += 锻造计算(temp.等级,temp.品质,self.武器锻造等级)
temp = 装备列表[装备序号[self.装备栏[8]]]
if temp.所属套装 != '智慧产物':
x = 耳环计算(temp.等级,temp.品质,self.强化等级[8])
self.物理攻击力 += x
self.魔法攻击力 += x
self.独立攻击力 += x
for i in [5,6,7,8,9,10]:
temp = 装备列表[装备序号[self.装备栏[i]]]
self.力量 += temp.力量
self.智力 += temp.智力
self.物理攻击力 += temp.物理攻击力
self.魔法攻击力 += temp.魔法攻击力
self.独立攻击力 += temp.独立攻击力
temp = 装备列表[装备序号[self.装备栏[11]]]
self.力量 += temp.力量
self.智力 += temp.智力
self.物理攻击力 += temp.物理攻击力
self.魔法攻击力 += temp.物理攻击力
self.独立攻击力 += temp.独立攻击力
class 伊斯塔战灵(角色窗口):
def 窗口属性输入(self):
self.初始属性 = 伊斯塔战灵角色属性()
self.角色属性A = 伊斯塔战灵角色属性()
self.角色属性B = 伊斯塔战灵角色属性()
self.一觉序号 = 伊斯塔战灵一觉序号
self.二觉序号 = 伊斯塔战灵二觉序号
self.三觉序号 = 伊斯塔战灵三觉序号
self.护石选项 = deepcopy(伊斯塔战灵护石选项)
self.符文选项 = deepcopy(伊斯塔战灵符文选项)
def 界面(self):
super().界面()
self.碎霸概率=MyQComboBox(self.main_frame2)
self.碎霸概率.resize(130,20)
self.碎霸概率.move(320,450)
for i in range(11):
self.碎霸概率.addItem('歼灵灭魂矛:' + str(i * 10) + '%')
self.碎霸概率.setCurrentIndex(1)
def 输入属性(self, 属性, x = 0):
super().输入属性(属性, x)
属性.技能栏[属性.技能序号['碎霸']].触发概率 = round(self.碎霸概率.currentIndex() / 10, 2)
|
[
"[email protected]"
] | |
52ceffb3c9ec7ddad2e6056a9dde0fd42ae567a4
|
6fa81aea23e36b58c7d7788a2b6f3d98440a6891
|
/basic-manipulations/break.py
|
f25ad1b6a962e8dc3533cda83c3693da01fab903
|
[] |
no_license
|
grbalmeida/python3
|
673b0cbde3481350795d41fb6ebf06633a70b462
|
3a542cea13f4442dcf7703b843df8f2bd44e9065
|
refs/heads/master
| 2020-04-29T09:40:20.635795 | 2019-03-17T05:08:28 | 2019-03-17T05:08:28 | 176,033,385 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 291 |
py
|
# coding: utf-8
salary = int(input('Salário? '))
tax = 27
while tax > 0:
tax = input('Imposto ou (s) para sair: ')
if not tax:
tax = 27.
elif tax == 's':
break
else:
tax = float(tax)
print('Valor real: {0}'.format(salary - salary * tax * 0.01))
|
[
"[email protected]"
] | |
912d082a6dbe74f145802096419eb2c4ce1772a1
|
4cade98f144c81d98898de89763d4fcc7e6ae859
|
/tests/rendering/repeat_separate_callback.py
|
93e1614196d4f5d88f50767af65aca66f8754f88
|
[
"Apache-2.0"
] |
permissive
|
ndparker/tdi
|
be115c02721aa5829e60b9af820b4157ba24a394
|
65a93080281f9ce5c0379e9dbb111f14965a8613
|
refs/heads/master
| 2021-01-21T04:54:51.390643 | 2016-06-15T19:55:35 | 2016-06-15T19:55:35 | 13,570,597 | 4 | 1 | null | 2013-10-20T14:59:37 | 2013-10-14T19:14:14 |
Python
|
UTF-8
|
Python
| false | false | 630 |
py
|
#!/usr/bin/env python
import warnings as _warnings
_warnings.resetwarnings()
_warnings.filterwarnings('error')
from tdi import html
template = html.from_string("""
<node tdi="item">
<node tdi="nested">
<node tdi="subnested"></node>
</node><tdi tdi=":-nested">
</tdi>
</node>
""".lstrip())
class Model(object):
def render_item(self, node):
def sep(node):
node.hiddenelement = False
node.nested.repeat(self.repeat_nested, [1, 2, 3, 4], separate=sep)
return True
def repeat_nested(self, node, item):
node['j'] = item
model = Model()
template.render(model)
|
[
"[email protected]"
] | |
0b8646becbebeb2e60b26401ced6a214df15b8a5
|
d9d75e429261d3f2b1075e0f7b598c756cb53a56
|
/env/lib/python3.9/site-packages/django/contrib/admin/__init__.py
|
da396593162743eef0420c635f6044e7c811c764
|
[] |
no_license
|
elisarocha/django-tdd-course
|
f89ccff07c8fd5114ae10fcb9a400be562f088db
|
7333fb9b5a5f8ea0f8fe7367234de21df589be59
|
refs/heads/main
| 2023-02-25T11:22:23.737594 | 2021-02-01T19:53:42 | 2021-02-01T19:53:42 | 334,710,716 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 1,498 |
py
|
from django.contrib.admin.decorators import register
from django.contrib.admin.filters import (AllValuesFieldListFilter,
BooleanFieldListFilter,
ChoicesFieldListFilter,
DateFieldListFilter,
EmptyFieldListFilter,
FieldListFilter, ListFilter,
RelatedFieldListFilter,
RelatedOnlyFieldListFilter,
SimpleListFilter)
from django.contrib.admin.options import (HORIZONTAL, VERTICAL, ModelAdmin,
StackedInline, TabularInline)
from django.contrib.admin.sites import AdminSite, site
from django.utils.module_loading import autodiscover_modules
__all__ = [
"register",
"ModelAdmin",
"HORIZONTAL",
"VERTICAL",
"StackedInline",
"TabularInline",
"AdminSite",
"site",
"ListFilter",
"SimpleListFilter",
"FieldListFilter",
"BooleanFieldListFilter",
"RelatedFieldListFilter",
"ChoicesFieldListFilter",
"DateFieldListFilter",
"AllValuesFieldListFilter",
"EmptyFieldListFilter",
"RelatedOnlyFieldListFilter",
"autodiscover",
]
def autodiscover():
autodiscover_modules("admin", register_to=site)
default_app_config = "django.contrib.admin.apps.AdminConfig"
|
[
"[email protected]"
] | |
a9e1c39ac344a4077757def33a8fb95fab0757da
|
6a607ff93d136bf9b0c6d7760394e50dd4b3294e
|
/CodePython/python_file/SSPassword.py
|
0a00267cdf0932e971e83597190057c7c84a1732
|
[] |
no_license
|
n3n/CP2014
|
d70fad1031b9f764f11ecb7da607099688e7b1de
|
96a7cdd76f9e5d4fd8fb3afa8cd8e416d50b918c
|
refs/heads/master
| 2020-05-15T07:08:17.510719 | 2014-02-14T03:21:05 | 2014-02-14T03:21:05 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 416 |
py
|
txt1 = raw_input()
txt2 = raw_input()
start = 0
store = {}
for j in xrange(len(txt2)):
tmp = ''
for i in xrange(1,len(txt2)+1):
if txt2[j:i] in txt1:
tmp = txt2[j:i]
if len(tmp) > 0:
store[tmp] = len(tmp)
val = store.values()
val.sort()
if len(val) == 0:
print 'Error!'
else:
for x in store:
if store[x] == val[-1]:
print x
break
|
[
"[email protected]"
] | |
114f29441491d265e57420d9a1e9f0120e7f3ef9
|
447aadd08a07857c3bcf826d53448caa8b6a59ee
|
/bin/python-config
|
943b73297bb756dfe3e5f8227160dfde867f44aa
|
[] |
no_license
|
aydanaderi/Site1
|
57461e9a43ddc7b7372d2e1690c37b09f73cbdef
|
30dce3e5a52a221208b28bcaac51a57a35cd82c6
|
refs/heads/master
| 2021-06-03T11:30:54.317056 | 2020-05-01T13:43:07 | 2020-05-01T13:43:07 | 254,337,037 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 2,343 |
#!/home/ayda/Documents/Site/bin/python
import sys
import getopt
import sysconfig
valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
'ldflags', 'help']
if sys.version_info >= (3, 2):
valid_opts.insert(-1, 'extension-suffix')
valid_opts.append('abiflags')
if sys.version_info >= (3, 3):
valid_opts.append('configdir')
def exit_with_usage(code=1):
sys.stderr.write("Usage: {0} [{1}]\n".format(
sys.argv[0], '|'.join('--'+opt for opt in valid_opts)))
sys.exit(code)
try:
opts, args = getopt.getopt(sys.argv[1:], '', valid_opts)
except getopt.error:
exit_with_usage()
if not opts:
exit_with_usage()
pyver = sysconfig.get_config_var('VERSION')
getvar = sysconfig.get_config_var
opt_flags = [flag for (flag, val) in opts]
if '--help' in opt_flags:
exit_with_usage(code=0)
for opt in opt_flags:
if opt == '--prefix':
print(sysconfig.get_config_var('prefix'))
elif opt == '--exec-prefix':
print(sysconfig.get_config_var('exec_prefix'))
elif opt in ('--includes', '--cflags'):
flags = ['-I' + sysconfig.get_path('include'),
'-I' + sysconfig.get_path('platinclude')]
if opt == '--cflags':
flags.extend(getvar('CFLAGS').split())
print(' '.join(flags))
elif opt in ('--libs', '--ldflags'):
abiflags = getattr(sys, 'abiflags', '')
libs = ['-lpython' + pyver + abiflags]
libs += getvar('LIBS').split()
libs += getvar('SYSLIBS').split()
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
# shared library in prefix/lib/.
if opt == '--ldflags':
if not getvar('Py_ENABLE_SHARED'):
libs.insert(0, '-L' + getvar('LIBPL'))
if not getvar('PYTHONFRAMEWORK'):
libs.extend(getvar('LINKFORSHARED').split())
print(' '.join(libs))
elif opt == '--extension-suffix':
ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
if ext_suffix is None:
ext_suffix = sysconfig.get_config_var('SO')
print(ext_suffix)
elif opt == '--abiflags':
if not getattr(sys, 'abiflags', None):
exit_with_usage()
print(sys.abiflags)
elif opt == '--configdir':
print(sysconfig.get_config_var('LIBPL'))
|
[
"[email protected]"
] | ||
01ccdf77b9751e5d0b06610abd85dfec1a411893
|
a1615563bb9b124e16f4163f660d677f3224553c
|
/LI/lib/python3.8/site-packages/astropy/table/connect.py
|
20778cbcf66bf2fed8dc443a2322609ea7ab97d9
|
[
"MIT"
] |
permissive
|
honeybhardwaj/Language_Identification
|
2a247d98095bd56c1194a34a556ddfadf6f001e5
|
1b74f898be5402b0c1a13debf595736a3f57d7e7
|
refs/heads/main
| 2023-04-19T16:22:05.231818 | 2021-05-15T18:59:45 | 2021-05-15T18:59:45 | 351,470,447 | 5 | 4 |
MIT
| 2021-05-15T18:59:46 | 2021-03-25T14:42:26 |
Python
|
UTF-8
|
Python
| false | false | 4,446 |
py
|
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy.io import registry
from .info import serialize_method_as
__all__ = ['TableRead', 'TableWrite']
__doctest_skip__ = ['TableRead', 'TableWrite']
class TableRead(registry.UnifiedReadWrite):
"""Read and parse a data table and return as a Table.
This function provides the Table interface to the astropy unified I/O
layer. This allows easily reading a file in many supported data formats
using syntax such as::
>>> from astropy.table import Table
>>> dat = Table.read('table.dat', format='ascii')
>>> events = Table.read('events.fits', format='fits')
Get help on the available readers for ``Table`` using the``help()`` method::
>>> Table.read.help() # Get help reading Table and list supported formats
>>> Table.read.help('fits') # Get detailed help on Table FITS reader
>>> Table.read.list_formats() # Print list of available formats
See also: https://docs.astropy.org/en/stable/io/unified.html
Parameters
----------
*args : tuple, optional
Positional arguments passed through to data reader. If supplied the
first argument is typically the input filename.
format : str
File format specifier.
units : list, dict, optional
List or dict of units to apply to columns
descriptions : list, dict, optional
List or dict of descriptions to apply to columns
**kwargs : dict, optional
Keyword arguments passed through to data reader.
Returns
-------
out : `Table`
Table corresponding to file contents
Notes
-----
"""
def __init__(self, instance, cls):
super().__init__(instance, cls, 'read')
def __call__(self, *args, **kwargs):
cls = self._cls
units = kwargs.pop('units', None)
descriptions = kwargs.pop('descriptions', None)
out = registry.read(cls, *args, **kwargs)
# For some readers (e.g., ascii.ecsv), the returned `out` class is not
# guaranteed to be the same as the desired output `cls`. If so,
# try coercing to desired class without copying (io.registry.read
# would normally do a copy). The normal case here is swapping
# Table <=> QTable.
if cls is not out.__class__:
try:
out = cls(out, copy=False)
except Exception:
raise TypeError('could not convert reader output to {} '
'class.'.format(cls.__name__))
out._set_column_attribute('unit', units)
out._set_column_attribute('description', descriptions)
return out
class TableWrite(registry.UnifiedReadWrite):
"""
Write this Table object out in the specified format.
This function provides the Table interface to the astropy unified I/O
layer. This allows easily writing a file in many supported data formats
using syntax such as::
>>> from astropy.table import Table
>>> dat = Table([[1, 2], [3, 4]], names=('a', 'b'))
>>> dat.write('table.dat', format='ascii')
Get help on the available writers for ``Table`` using the``help()`` method::
>>> Table.write.help() # Get help writing Table and list supported formats
>>> Table.write.help('fits') # Get detailed help on Table FITS writer
>>> Table.write.list_formats() # Print list of available formats
The ``serialize_method`` argument is explained in the section on
`Table serialization methods
<https://docs.astropy.org/en/latest/io/unified.html#table-serialization-methods>`_.
See also: https://docs.astropy.org/en/stable/io/unified.html
Parameters
----------
*args : tuple, optional
Positional arguments passed through to data writer. If supplied the
first argument is the output filename.
format : str
File format specifier.
serialize_method : str, dict, optional
Serialization method specifier for columns.
**kwargs : dict, optional
Keyword arguments passed through to data writer.
Notes
-----
"""
def __init__(self, instance, cls):
super().__init__(instance, cls, 'write')
def __call__(self, *args, serialize_method=None, **kwargs):
instance = self._instance
with serialize_method_as(instance, serialize_method):
registry.write(instance, *args, **kwargs)
|
[
"[email protected]"
] | |
58364a12ae6bcd575ef90327f0483265e2a95353
|
36da6c5f553d4eb97cc2b6798d8017f313b2705e
|
/knowledgeCity0610/remoteio/remoteioMgr_old.py
|
6fcb05c017354391204d8f286d5bfe7a2b081e7c
|
[] |
no_license
|
MOZIJANE/jingxin
|
da10476edfc25ffbbe87eb8f127c600ce6ad30ce
|
01e7e419b15da1b6a7c127d1db1a042a24a12146
|
refs/heads/master
| 2023-06-06T05:05:11.953104 | 2021-06-23T04:27:22 | 2021-06-23T04:27:22 | 378,850,323 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 5,888 |
py
|
# coding=utf-8
# lzxs 2018-8-2 create
import sys, os
import threading
import json
import setup
if __name__ == '__main__':
setup.setCurPath(__file__)
import utility
# import remoteio.remoteioControl as remoteioControl
import modbusapi
import log
import time
import modbus_tk.defines as mdef
import lock as lockImp
g_remoteioList = None
import alarm.aliveApi
D0 = 0x0000
D1 = 0x0001
D2 = 0x0002
D3 = 0x0003
D4 = 0x0004
D5 = 0x0005
D6 = 0x0006
D7 = 0x0007
D10 = 0x0010 # 0 01/05 1 号 DO 值 读写
D11 = 0x0011 # 1 01/05 2 号 DO 值 读写
D12 = 0x0012 # 2 01/05 3 号 DO 值 读写
D13 = 0x0013 # 3 01/05 4 号 DO 值 读写
D14 = 0x0014 # 4 01/05 5 号 DO 值 读写
D15 = 0x0015 # 5 01/05 6 号 DO 值 读写
D16 = 0x0016 # 6 01/05 7 号 DO 值 读写
D17 = 0x0017 # 7 01/05 8 号 DO 值 读写
IO_LENTH = 8
def get(id):
return getList()[id]
def _loadRemoteioList():
file = "/remoteio.json"
with open(os.path.abspath(os.path.dirname(__file__)) + file, 'r') as f:
remoteioList = json.load(f)
ret = {}
for remoteioId in remoteioList:
if remoteioList[remoteioId]["enable"].lower() == "false":
continue
ip = remoteioList[remoteioId]["ip"]
port = remoteioList[remoteioId]["port"]
remoteio = remoteioInfo(remoteioId, ip, port)
ret[remoteioId] = remoteio
return ret
def getList():
global g_remoteioList
if g_remoteioList is None:
g_remoteioList = _loadRemoteioList()
return g_remoteioList
def writeDO(id, index, value):
remoteioInfo= get(id)
remoteioInfo.writeDO(index,value)
return {}
def writeDOList(id, values):
remoteioInfo = get(id)
remoteioInfo.writeDOList(values)
return {}
def readDI(id, index):
remoteioInfo = get(id)
result=remoteioInfo.readDI(index)
return {"status":result}
def readDO(id, index):
remoteioInfo = get(id)
result=remoteioInfo.readDO(index)
return {"status":result}
def readDIList(id):
remoteioInfo = get(id)
result=remoteioInfo.readDIList()
return {"status":result}
def readDOList(id):
remoteioInfo = get(id)
result=remoteioInfo.readDOList()
return {"status":result}
class remoteioInfo:
def __init__(self, remoteioId, ip, port,slaverId=1):
self.id = remoteioId
self.ip = ip
self.port = port
self.slaverId = 1
self.m_lock = threading.RLock()
self.master = modbusapi.tcpMaster(self.slaverId, self.ip)
# DO操作
def writeDO(self,index,value):
try:
ioAddr = getDoAddr(index)
self._write(ioAddr, value)
except Exception as ex:
self.master.close()
self.master = None
log.exception("%s writeDO fail"%self.id,ex)
raise
def writeDOList(self,value):
try:
l = list(map(lambda x: int(x), value.split(',')))
self._write(D10,l,IO_LENTH)
except Exception as ex:
self.master.close()
self.master = None
log.exception("%s writeDOList fail"%self.id,ex)
raise
def readDI(self,index):
try:
ioAddr = getDiAddr(index)
return self._read(ioAddr)
except Exception as ex:
self.master.close()
self.master = None
log.exception("%s readDI fail"%self.id,ex)
raise
def readDIList(self):
try:
return self._read(D0, IO_LENTH)
except Exception as ex:
self.master.close()
self.master = None
log.exception("%s readDIList fail"%self.id,ex)
raise
# DI操作
def readDO(self,index):
try:
ioAddr = getDoAddr(index)
return self._read(ioAddr)
except Exception as ex:
self.master.close()
self.master = None
log.exception("%s readDO fail"%self.id,ex)
raise
def readDOList(self):
try:
return self._read(D10, IO_LENTH)
except Exception as ex:
self.master.close()
self.master = None
log.exception("%s readDOList fail"%self.id,ex)
raise
@lockImp.lock(None)
def _read(self,addr,length=None):
if self.master is None:
self.master = modbusapi.tcpMaster(self.slaverId, self.ip)
self.master.open()
time.sleep(0.5)
if length:
s = self.master.read(mdef.READ_COILS,addr, length)
else:
s = self.master.read(mdef.READ_COILS,addr,1)[0]
return s
@lockImp.lock(None)
def _write(self,addr,value,length=None):
if self.master is None:
self.master = modbusapi.tcpMaster(self.slaverId, self.ip)
self.master.open()
time.sleep(0.5)
if length:
s = self.master.write(mdef.WRITE_MULTIPLE_COILS,addr, value, length)
else:
s = self.master.write(mdef.WRITE_SINGLE_COIL,addr,value)
return s
def getDiAddr(addr):
if addr == 1:
ioAddr = D10
elif addr == 2:
ioAddr = D11
elif addr == 3:
ioAddr = D12
elif addr == 4:
ioAddr = D13
elif addr == 5:
ioAddr = D14
elif addr == 6:
ioAddr = D15
elif addr == 7:
ioAddr = D16
elif addr == 8:
ioAddr = D17
else:
raise Exception("参数错误")
return ioAddr
def getDoAddr(addr):
if addr == 1:
ioAddr = D10
elif addr == 2:
ioAddr = D11
elif addr == 3:
ioAddr = D12
elif addr == 4:
ioAddr = D13
elif addr == 5:
ioAddr = D14
elif addr == 6:
ioAddr = D15
elif addr == 7:
ioAddr = D16
elif addr == 8:
ioAddr = D17
else:
raise Exception("参数错误")
return ioAddr
def remoteioCheck():
import shell
checkCount = 0
g_laststatus = {}
remoteiolistalarm = {}
remoteiolist = getList()
if not remoteiolistalarm:
for id in remoteiolist:
info = get(id)
g_laststatus.update({id:True})
larm =alarm.aliveApi.aliveObj(moid=id, typeId=39998, desc="远程控制IO离线异常", timeoutSecond=60, domain="agv")
remoteiolistalarm.update({id:larm})
# log.info("++++++++remoteiolistalarm",larm, id,info.ip)
while not utility.is_exited():
for id in remoteiolist:
info = get(id)
if shell.ping(info.ip, showLog=False):
remoteiolistalarm[id].check()
time.sleep(5)
checkThread = threading.Thread(target=remoteioCheck,name="remoteio.ping")
checkThread.start()
if __name__ == '__main__':
utility.run_tests()
|
[
"[email protected]"
] | |
49dcedfd70d8de54cf3d3d22aef12b1c668a5e73
|
f908adce7e25824f7daaffddfaacb2a18b3e721b
|
/feder/cases/migrations/0007_auto_20180325_2244.py
|
8f103956f10efc94fc5f727235b3590001bc9abe
|
[
"MIT"
] |
permissive
|
miklobit/feder
|
7c0cfdbcb0796f8eb66fd67fa4dabddb99370a7c
|
14a59e181a18af5b625ccdcbd892c3b886a8d97e
|
refs/heads/master
| 2023-01-13T23:03:51.266990 | 2020-11-12T14:31:52 | 2020-11-12T15:47:16 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 466 |
py
|
# Generated by Django 2.0.3 on 2018-03-25 22:44
import autoslug.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("cases", "0006_alias")]
operations = [
migrations.AlterField(
model_name="case",
name="slug",
field=autoslug.fields.AutoSlugField(
editable=False, populate_from="name", unique=True, verbose_name="Slug"
),
)
]
|
[
"[email protected]"
] | |
d20e0777f3c0ebd5733cb475ecb93204f0455628
|
37fdc797f0060a67c1e9318032bc7102d4fd9ecd
|
/spider/beautifulsoup_test/lib/python3.7/site-packages/twisted/web/resource.py
|
435414f906291ba7f20db17c3fd5e76aab7bd03e
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
Change0224/PycharmProjects
|
8fa3d23b399c5fb55661a79ca059f3da79847feb
|
818ba4fd5dd8bcdaacae490ed106ffda868b6ca4
|
refs/heads/master
| 2021-02-06T15:37:16.653849 | 2020-03-03T14:30:44 | 2020-03-03T14:30:44 | 243,927,023 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 13,630 |
py
|
# -*- threading_test-case-name: twisted.web.threading_test.test_web -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Implementation of the lowest-level Resource class.
"""
from __future__ import division, absolute_import
__all__ = [
'IResource', 'getChildForRequest',
'Resource', 'ErrorPage', 'NoResource', 'ForbiddenResource',
'EncodingResourceWrapper']
import warnings
from zope.interface import Attribute, Interface, implementer
from twisted.python.compat import nativeString, unicode
from twisted.python.reflect import prefixedMethodNames
from twisted.python.components import proxyForInterface
from twisted.web._responses import FORBIDDEN, NOT_FOUND
from twisted.web.error import UnsupportedMethod
class IResource(Interface):
"""
A web resource.
"""
isLeaf = Attribute(
"""
Signal if this IResource implementor is a "leaf node" or not. If True,
getChildWithDefault will not be called on this Resource.
""")
def getChildWithDefault(name, request):
"""
Return a child with the given name for the given request.
This is the external interface used by the Resource publishing
machinery. If implementing IResource without subclassing
Resource, it must be provided. However, if subclassing Resource,
getChild overridden instead.
@param name: A single path component from a requested URL. For example,
a request for I{http://example.com/foo/bar} will result in calls to
this method with C{b"foo"} and C{b"bar"} as values for this
argument.
@type name: C{bytes}
@param request: A representation of all of the information about the
request that is being made for this child.
@type request: L{twisted.web.server.Request}
"""
def putChild(path, child):
"""
Put a child IResource implementor at the given path.
@param path: A single path component, to be interpreted relative to the
path this resource is found at, at which to put the given child.
For example, if resource A can be found at I{http://example.com/foo}
then a call like C{A.putChild(b"bar", B)} will make resource B
available at I{http://example.com/foo/bar}.
@type path: C{bytes}
"""
def render(request):
"""
Render a request. This is called on the leaf resource for a request.
@return: Either C{server.NOT_DONE_YET} to indicate an asynchronous or a
C{bytes} instance to write as the response to the request. If
C{NOT_DONE_YET} is returned, at some point later (for example, in a
Deferred callback) call C{request.write(b"<html>")} to write data to
the request, and C{request.finish()} to send the data to the
browser.
@raise twisted.web.error.UnsupportedMethod: If the HTTP verb
requested is not supported by this resource.
"""
def getChildForRequest(resource, request):
"""
Traverse resource tree to find who will handle the request.
"""
while request.postpath and not resource.isLeaf:
pathElement = request.postpath.pop(0)
request.prepath.append(pathElement)
resource = resource.getChildWithDefault(pathElement, request)
return resource
@implementer(IResource)
class Resource:
"""
Define a web-accessible resource.
This serves 2 main purposes; one is to provide a standard representation
for what HTTP specification calls an 'entity', and the other is to provide
an abstract directory structure for URL retrieval.
"""
entityType = IResource
server = None
def __init__(self):
"""
Initialize.
"""
self.children = {}
isLeaf = 0
### Abstract Collection Interface
def listStaticNames(self):
return list(self.children.keys())
def listStaticEntities(self):
return list(self.children.items())
def listNames(self):
return list(self.listStaticNames()) + self.listDynamicNames()
def listEntities(self):
return list(self.listStaticEntities()) + self.listDynamicEntities()
def listDynamicNames(self):
return []
def listDynamicEntities(self, request=None):
return []
def getStaticEntity(self, name):
return self.children.get(name)
def getDynamicEntity(self, name, request):
if name not in self.children:
return self.getChild(name, request)
else:
return None
def delEntity(self, name):
del self.children[name]
def reallyPutEntity(self, name, entity):
self.children[name] = entity
# Concrete HTTP interface
def getChild(self, path, request):
"""
Retrieve a 'child' resource from me.
Implement this to create dynamic resource generation -- resources which
are always available may be registered with self.putChild().
This will not be called if the class-level variable 'isLeaf' is set in
your subclass; instead, the 'postpath' attribute of the request will be
left as a list of the remaining path elements.
For example, the URL /foo/bar/baz will normally be::
| site.resource.getChild('foo').getChild('bar').getChild('baz').
However, if the resource returned by 'bar' has isLeaf set to true, then
the getChild call will never be made on it.
Parameters and return value have the same meaning and requirements as
those defined by L{IResource.getChildWithDefault}.
"""
return NoResource("No such child resource.")
def getChildWithDefault(self, path, request):
"""
Retrieve a static or dynamically generated child resource from me.
First checks if a resource was added manually by putChild, and then
call getChild to check for dynamic resources. Only override if you want
to affect behaviour of all child lookups, rather than just dynamic
ones.
This will check to see if I have a pre-registered child resource of the
given name, and call getChild if I do not.
@see: L{IResource.getChildWithDefault}
"""
if path in self.children:
return self.children[path]
return self.getChild(path, request)
def getChildForRequest(self, request):
warnings.warn("Please use module level getChildForRequest.", DeprecationWarning, 2)
return getChildForRequest(self, request)
def putChild(self, path, child):
"""
Register a static child.
You almost certainly don't want '/' in your path. If you
intended to have the root of a folder, e.g. /foo/, you want
path to be ''.
@param path: A single path component.
@type path: L{bytes}
@param child: The child resource to register.
@type child: L{IResource}
@see: L{IResource.putChild}
"""
if not isinstance(path, bytes):
warnings.warn(
'Path segment must be bytes; '
'passing {0} has never worked, and '
'will raise an exception in the future.'
.format(type(path)),
category=DeprecationWarning,
stacklevel=2)
self.children[path] = child
child.server = self.server
def render(self, request):
"""
Render a given resource. See L{IResource}'s render method.
I delegate to methods of self with the form 'render_METHOD'
where METHOD is the HTTP that was used to make the
request. Examples: render_GET, render_HEAD, render_POST, and
so on. Generally you should implement those methods instead of
overriding this one.
render_METHOD methods are expected to return a byte string which will be
the rendered page, unless the return value is C{server.NOT_DONE_YET}, in
which case it is this class's responsibility to write the results using
C{request.write(data)} and then call C{request.finish()}.
Old code that overrides render() directly is likewise expected
to return a byte string or NOT_DONE_YET.
@see: L{IResource.render}
"""
m = getattr(self, 'render_' + nativeString(request.method), None)
if not m:
try:
allowedMethods = self.allowedMethods
except AttributeError:
allowedMethods = _computeAllowedMethods(self)
raise UnsupportedMethod(allowedMethods)
return m(request)
def render_HEAD(self, request):
"""
Default handling of HEAD method.
I just return self.render_GET(request). When method is HEAD,
the framework will handle this correctly.
"""
return self.render_GET(request)
def _computeAllowedMethods(resource):
"""
Compute the allowed methods on a C{Resource} based on defined render_FOO
methods. Used when raising C{UnsupportedMethod} but C{Resource} does
not define C{allowedMethods} attribute.
"""
allowedMethods = []
for name in prefixedMethodNames(resource.__class__, "render_"):
# Potentially there should be an API for encode('ascii') in this
# situation - an API for taking a Python native string (bytes on Python
# 2, text on Python 3) and returning a socket-compatible string type.
allowedMethods.append(name.encode('ascii'))
return allowedMethods
class ErrorPage(Resource):
"""
L{ErrorPage} is a resource which responds with a particular
(parameterized) status and a body consisting of HTML containing some
descriptive text. This is useful for rendering simple error pages.
@ivar template: A native string which will have a dictionary interpolated
into it to generate the response body. The dictionary has the following
keys:
- C{"code"}: The status code passed to L{ErrorPage.__init__}.
- C{"brief"}: The brief description passed to L{ErrorPage.__init__}.
- C{"detail"}: The detailed description passed to
L{ErrorPage.__init__}.
@ivar code: An integer status code which will be used for the response.
@type code: C{int}
@ivar brief: A short string which will be included in the response body as
the page title.
@type brief: C{str}
@ivar detail: A longer string which will be included in the response body.
@type detail: C{str}
"""
template = """
<html>
<head><title>%(code)s - %(brief)s</title></head>
<body>
<h1>%(brief)s</h1>
<p>%(detail)s</p>
</body>
</html>
"""
def __init__(self, status, brief, detail):
Resource.__init__(self)
self.code = status
self.brief = brief
self.detail = detail
def render(self, request):
request.setResponseCode(self.code)
request.setHeader(b"content-type", b"text/html; charset=utf-8")
interpolated = self.template % dict(
code=self.code, brief=self.brief, detail=self.detail)
if isinstance(interpolated, unicode):
return interpolated.encode('utf-8')
return interpolated
def getChild(self, chnam, request):
return self
class NoResource(ErrorPage):
"""
L{NoResource} is a specialization of L{ErrorPage} which returns the HTTP
response code I{NOT FOUND}.
"""
def __init__(self, message="Sorry. No luck finding that resource."):
ErrorPage.__init__(self, NOT_FOUND, "No Such Resource", message)
class ForbiddenResource(ErrorPage):
"""
L{ForbiddenResource} is a specialization of L{ErrorPage} which returns the
I{FORBIDDEN} HTTP response code.
"""
def __init__(self, message="Sorry, resource is forbidden."):
ErrorPage.__init__(self, FORBIDDEN, "Forbidden Resource", message)
class _IEncodingResource(Interface):
"""
A resource which knows about L{_IRequestEncoderFactory}.
@since: 12.3
"""
def getEncoder(request):
"""
Parse the request and return an encoder if applicable, using
L{_IRequestEncoderFactory.encoderForRequest}.
@return: A L{_IRequestEncoder}, or L{None}.
"""
@implementer(_IEncodingResource)
class EncodingResourceWrapper(proxyForInterface(IResource)):
"""
Wrap a L{IResource}, potentially applying an encoding to the response body
generated.
Note that the returned children resources won't be wrapped, so you have to
explicitly wrap them if you want the encoding to be applied.
@ivar encoders: A list of
L{_IRequestEncoderFactory<twisted.web.iweb._IRequestEncoderFactory>}
returning L{_IRequestEncoder<twisted.web.iweb._IRequestEncoder>} that
may transform the data passed to C{Request.write}. The list must be
sorted in order of priority: the first encoder factory handling the
request will prevent the others from doing the same.
@type encoders: C{list}.
@since: 12.3
"""
def __init__(self, original, encoders):
super(EncodingResourceWrapper, self).__init__(original)
self._encoders = encoders
def getEncoder(self, request):
"""
Browser the list of encoders looking for one applicable encoder.
"""
for encoderFactory in self._encoders:
encoder = encoderFactory.encoderForRequest(request)
if encoder is not None:
return encoder
|
[
"[email protected]"
] | |
d94b677ce6dd43d5692e58c6708009a845427944
|
0ee08728c17a7e10eea69d7b1608ae8f56a4fa08
|
/mapy/model/__init__.py
|
2953060887104a9e04445b638bcf9d527a983dab
|
[
"BSD-2-Clause"
] |
permissive
|
hossamragheb/mapy
|
a97f3742ecea5b808b9684b8dfb20c21abe285be
|
0594a575ff19a6fc12545d636275e4f646282ae7
|
refs/heads/master
| 2020-02-26T13:52:08.513806 | 2014-03-06T09:37:56 | 2014-03-06T09:37:56 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 11,420 |
py
|
import time
import os
import constraints
from mapy.constants import CSYSGLOBAL
def get_cons(grid, sub_id):
if sub_id in grid.cons.keys():
if len(grid.perm_cons) > 0:
cons = list(grid.perm_cons | grid.cons[sub_id])
else:
cons = list(grid.cons[sub_id])
else:
cons = list(grid.perm_cons)
cons.sort()
return cons
#TODO para encontrar elementos / nos mais proximos
#
#TODO
# cria classe cubos
# determinados em funcao das coordenadas min e max do modelos
# cada cubo leva a lista dos elementos que serao considerados nas varreduras
# cada cubo tem os atributos xmin xmax ymin ymax zmin zmax
#TODO
# varredura direcional obtendo-se os elementos adjacentes e escolhendo qual
# direcao e melhor no sentido de reduzir a distancia
#
class Model(object):
__slots__ = [ 'name','coorddict','griddict','elemdict','matdict',
'propdict','loaddict','loadcount','consdict','conscount',
'subcases','k_pos','k_offset','index_to_delete','k_coo',
'k_coo_sub','F','fv' ]
def __init__(self, name='default_name'):
self.name = name
self.coorddict = {}
self.griddict = {}
self.elemdict = {}
self.matdict = {}
self.propdict = {}
self.loaddict = {}
self.loadcount = 0
self.consdict = {}
self.conscount = 0
self.subcases = {}
self.k_pos = None
self.k_offset = None
self.index_to_delete = None
self.k_coo = None
self.k_coo_sub = {}
self.F = {}
self.fv = None
CSYSGLOBAL.model = self
self.coorddict[0] = CSYSGLOBAL
def add_subcase(self, id, loadid, consid):
import loads
self.subcases[int(id)] = loads.Subcase(id, loadid, consid)
self.subcases[int(id)].model = self
def rebuild(self):
"""
Add direct object references for all entries
Grids <--> CoordSys loops. They are processed in the following order:
- basic grids and the basic coord sys
- grids depending on the basic coord sys
loop:
- coord sys depending on these grids
- grids depending on these coord sys
until all grids and coordsys are processed
ERRORS:
- Grids that make reference to an unexisting coordsys
- CoordSys that make reference to an unexisting grid
DEFINITIONS:
- basic coord sys are those created from vectors which are
defined in the basic coordinate system (id=0),
or those which g1, g2 and g3 are basic grids
- basic grids are those making reference to the basic
coordinate system (id=0)
"""
import rebuild
rebuild.rebuild( self )
def build_k(self):
'''
Build the global stiffness matrix
'''
print time.ctime() + ' started - building grid positions in global stiffness matrix'
self.build_k_pos()
print time.ctime() + ' finished - building grid positions in global stiffness matrix'
print time.ctime() + ' started - building lists of constraints'
self.build_index_to_delete()
print time.ctime() + ' finished - building lists of constraints'
print time.ctime() + ' started - building global K stiffness matrix'
self.build_k_coo()
self.build_k_coo_sub()
print time.ctime() + ' finished - building global K stiffness matrix'
print time.ctime() + ' started - building global F load matrices'
self.build_F()
print time.ctime() + ' finished - building global F load matrices'
def build_k_pos(self):
pos = -1
k_pos = []
for elem in self.elemdict.values():
for grid in elem.grids:
if grid.pos == -1:
pos += 1
grid.pos = pos
k_pos.append( grid.id )
k_offset = {}
for sub in self.subcases.values():
k_offset[sub.id] = []
offset = 0
for i in xrange(len(k_pos)):
if i > 0:
gi_1_id = k_pos[ i-1 ]
gi_1 = self.griddict[ gi_1_id ],
'subcases'
cons = get_cons( gi_1 , sub.id )
offset += len( cons )
k_offset[sub.id].append( offset )
gi_id = k_pos[ i ]
gi = self.griddict[ gi_id ]
gi.k_offset[sub.id] = offset
self.k_pos = k_pos
self.k_offset = k_offset
def build_index_to_delete(self):
self.index_to_delete = {}
for sub in self.subcases.values():
index_to_delete = []
for gid in self.k_pos:
grid = self.griddict[gid]
pos = grid.pos
cons = get_cons(grid,sub.id)
for dof in cons:
index_to_delete.append( pos * 6 + (dof-1) )
index_to_delete.sort()
self.index_to_delete[sub.id] = index_to_delete
def build_k_coo(self):
import scipy
import scipy.sparse as ss
import alg3dpy.scipy_sparse as assparse
dim = 6 * len(self.k_pos)
data = scipy.zeros(shape=0, dtype='float64')
row = scipy.zeros(shape=0, dtype='int64')
col = scipy.zeros(shape=0, dtype='int64')
for elem in self.elemdict.values():
elem.build_k()
for i in xrange(len(elem.grids)):
gi = elem.grids[i]
for j in xrange(len(elem.grids)):
gj = elem.grids[j]
k_grid = assparse.in_sparse(elem.k,i*6,i*6+5,j*6,j*6+5)
#
for d, r, c, in zip(k_grid.data, k_grid.row, k_grid.col):
newr = r + gi.pos * 6
newc = c + gj.pos * 6
data = scipy.append(data, d )
row = scipy.append(row , newr)
col = scipy.append(col , newc)
k_coo = ss.coo_matrix(( data, (row,col) ), shape=(dim,dim))
self.k_coo = k_coo
def build_k_coo_sub(self):
#FIXME if this will be kept... optimize.. there are too many loops
#TOOOOOO SLOW
self.k_coo_sub = {}
for sub in self.subcases.values():
k = self.k_coo
count = -1
for row, col, in zip( k.row, k.col ):
count += 1
for grid_id in self.k_pos:
grid = self.griddict[grid_id]
pos = grid.pos
cons = get_cons( grid, sub.id )
for i in cons:
j = (i - 1) + pos*6
if row == j or col == j:
if row == col:
k.data[count] = 1.
else:
k.data[count] = 0.
self.k_coo_sub[sub.id] = k
def build_F(self):
self.F = {}
for sub in self.subcases.values():
dim = self.k_coo_sub[sub.id].shape[1]
self.F[sub.id] = scipy.zeros(shape=dim, dtype='float64')
itd = self.index_to_delete
for gid in self.k_pos:
grid = self.griddict[gid]
grid_load = grid.loads
for sub in self.subcases.values():
if sub.id in grid_load.keys():
loads = grid_load[sub.id]
k_offset = grid.k_offset[sub.id]
cons = get_cons(grid, sub.id)
sub_i = 0
for i in xrange(6):
index = i + grid.pos*6
self.F[sub.id][index] = loads[i]
# if not (i+1) in cons:
# index = i + grid.pos*6 - k_offset - sub_i
# self.F[sub.id][index] = loads[i]
# else:
# sub_i += 1
def print_displ(self, sub_id = 'all'):
if sub_id == 'all':
for sub in self.subcases.values():
for grid in self.griddict.values():
grid.print_displ(sub.id)
else:
for grid in self.griddict.values():
grid.print_displ(sub_id)
def elem_out_vecs(self):
for elem in self.elemdict.values():
elem.calc_displ()
elem.calc_out_vecs()
def createfemview(self):
import mapy
self.fv = mapy.renderer.FEMView(self)
def TOBEFIXED_build_k_coo_sub(self):
import scipy
import scipy.sparse as ss
import alg3dpy.scipy_sparse as assparse
#FIXME not considering pos to build the matrix!!!
self.k_coo_sub = {}
for sub in self.subcases.values():
dim = 6*len( self.k_pos ) - \
len( self.index_to_delete[ sub.id ] )
data = scipy.zeros(0, dtype='float64')
row = scipy.zeros(0, dtype='int64')
col = scipy.zeros(0, dtype='int64')
for elem in self.elemdict.values():
numg = len( elem.grids )
for i in xrange( numg ):
gi = elem.grids[ i ]
offseti = gi.k_offset[ sub.id ]
consi = set( [] )
if sub.id in gi.cons.keys():
consi = gi.cons[ sub.id ]
for j in xrange( numg ):
gj = elem.grids[ j ]
offsetj = gj.k_offset[ sub.id ]
consj = set( [] )
if sub.id in gj.cons.keys():
consj = gj.cons[ sub.id ]
cons = consi | consj
index_to_delete = [ (c-1) for c in cons ]
k_grid = assparse.in_sparse(elem.k,i*6,i*6+5,j*6,j*6+5)
if len(index_to_delete) < 6:
k = k_grid
for d, r, c, in zip( k.data , k.row, k.col ):
#FIXME remove the search below
if not r in index_to_delete:
sub_r = 0
for k in index_to_delete:
if r > k:
sub_r += 1
if not c in index_to_delete:
sub_c = 0
for m in index_to_delete:
if c > m:
sub_c += 1
newr = r + gi.pos * 6 - offseti - sub_r
newc = c + gj.pos * 6 - offsetj - sub_c
data = scipy.append( data , d )
row = scipy.append( row , newr )
col = scipy.append( col , newc )
k_coo = ss.coo_matrix(( data, (row,col) ), shape=(dim,dim))
self.k_coo_sub[sub.id] = k_coo
import grids
import elements
import constraints
import loads
import materials
import properties
|
[
"[email protected]"
] | |
5fb3a9efc2ea2479de46661403dc3c73482abc60
|
4e88ad4f7a14d4c1027d711ad19a70d616182cc4
|
/backend/task/api/v1/urls.py
|
b3f694c192411f08420616b0dac4bb7edb39b6c1
|
[] |
no_license
|
crowdbotics-apps/test-24834
|
11c153b1f3a409a183de97cd822568f471ab2629
|
33b0b0b6a1793da8d2970b29a6c23152b2e6ec4b
|
refs/heads/master
| 2023-03-15T15:47:38.489644 | 2021-03-05T18:28:00 | 2021-03-05T18:28:00 | 344,269,628 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 437 |
py
|
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .viewsets import MessageViewSet, RatingViewSet, TaskViewSet, TaskTransactionViewSet
router = DefaultRouter()
router.register("tasktransaction", TaskTransactionViewSet)
router.register("task", TaskViewSet)
router.register("message", MessageViewSet)
router.register("rating", RatingViewSet)
urlpatterns = [
path("", include(router.urls)),
]
|
[
"[email protected]"
] | |
52263aca0037892c333edd8b32660fb688936773
|
78f43f8bd07ae0fc91738a63cd7bbca08ae26066
|
/leetcode/bfs_dfs/android_unlock_patterns_dfs.py
|
c71381245a6537441a29e3c941330844a078db20
|
[] |
no_license
|
hanrick2000/LeetcodePy
|
2f3a841f696005e8f0bf4cd33fe586f97173731f
|
b24fb0e7403606127d26f91ff86ddf8d2b071318
|
refs/heads/master
| 2022-04-14T01:34:05.044542 | 2020-04-12T06:11:29 | 2020-04-12T06:11:29 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 1,073 |
py
|
from typing import List
class Solution:
"""
consist of minimum of m keys and maximum n keys
Runtime: 416 ms, faster than 78.53%
"""
def numberOfPatterns(self, m: int, n: int) -> int:
skip = {(1, 7): 4, (1, 3): 2, (1, 9): 5, (2, 8): 5, (3, 7): 5, (3, 9): 6, (4, 6): 5, (7, 9): 8}
res = 0
def dfs(visited: List[int], prev: int) -> None:
nonlocal res
if len(visited) >= m:
res += 1
if len(visited) == n:
return
for i in range(1, 10):
if i not in visited:
# sort the vertices of the edge before lookup `skip`
edge = (min(prev, i), max(prev, i))
if edge not in skip or skip[edge] in visited:
dfs(visited + [i], i)
# for i in range(1, 10): # Runtime: 1092 ms, faster than 45.76%
for i in [1, 2, 5]:
if i == 5:
res *= 4
dfs([i], i)
return res
print(Solution().numberOfPatterns(1, 1))
|
[
"[email protected]"
] | |
792f6de6a225614864c5e4c376444da1f50d4038
|
e5e0d729f082999a9bec142611365b00f7bfc684
|
/tensorflow/python/estimator/canned/dnn_linear_combined.py
|
e28499368f1687c4ab4972f04888da66a47b0f5a
|
[
"Apache-2.0"
] |
permissive
|
NVIDIA/tensorflow
|
ed6294098c7354dfc9f09631fc5ae22dbc278138
|
7cbba04a2ee16d21309eefad5be6585183a2d5a9
|
refs/heads/r1.15.5+nv23.03
| 2023-08-16T22:25:18.037979 | 2023-08-03T22:09:23 | 2023-08-03T22:09:23 | 263,748,045 | 763 | 117 |
Apache-2.0
| 2023-07-03T15:45:19 | 2020-05-13T21:34:32 |
C++
|
UTF-8
|
Python
| false | false | 1,349 |
py
|
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""dnn_linear_combined python module.
Importing from tensorflow.python.estimator is unsupported
and will soon break!
"""
# pylint: disable=unused-import,g-bad-import-order,g-import-not-at-top,wildcard-import
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow_estimator.python.estimator.canned import dnn_linear_combined
# Include attrs that start with single underscore.
_HAS_DYNAMIC_ATTRIBUTES = True
dnn_linear_combined.__all__ = [
s for s in dir(dnn_linear_combined) if not s.startswith('__')
]
from tensorflow_estimator.python.estimator.canned.dnn_linear_combined import *
|
[
"[email protected]"
] | |
b4d4ceaff1275f2eb8b9a5807035b802950627f8
|
9a2413b572c0f89b1f80899a10237657d9393bd6
|
/sdk/python/pulumi_keycloak/openid/client_optional_scopes.py
|
a52259f31c6be7621a5ada153c069d32b6118951
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
jaxxstorm/pulumi-keycloak
|
5c25363ece6af49dad40bd693ce07b1fa0dedd74
|
2fc7b1060b725a40d2ada745aa0d10130243a0b5
|
refs/heads/master
| 2022-10-10T13:11:04.290703 | 2020-06-05T19:11:19 | 2020-06-05T19:11:19 | 270,870,883 | 0 | 0 |
NOASSERTION
| 2020-06-09T01:08:56 | 2020-06-09T01:08:55 | null |
UTF-8
|
Python
| false | false | 3,482 |
py
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class ClientOptionalScopes(pulumi.CustomResource):
client_id: pulumi.Output[str]
optional_scopes: pulumi.Output[list]
realm_id: pulumi.Output[str]
def __init__(__self__, resource_name, opts=None, client_id=None, optional_scopes=None, realm_id=None, __props__=None, __name__=None, __opts__=None):
"""
Create a ClientOptionalScopes resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
if __name__ is not None:
warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
resource_name = __name__
if __opts__ is not None:
warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
opts = __opts__
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = dict()
if client_id is None:
raise TypeError("Missing required property 'client_id'")
__props__['client_id'] = client_id
if optional_scopes is None:
raise TypeError("Missing required property 'optional_scopes'")
__props__['optional_scopes'] = optional_scopes
if realm_id is None:
raise TypeError("Missing required property 'realm_id'")
__props__['realm_id'] = realm_id
super(ClientOptionalScopes, __self__).__init__(
'keycloak:openid/clientOptionalScopes:ClientOptionalScopes',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name, id, opts=None, client_id=None, optional_scopes=None, realm_id=None):
"""
Get an existing ClientOptionalScopes resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param str id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = dict()
__props__["client_id"] = client_id
__props__["optional_scopes"] = optional_scopes
__props__["realm_id"] = realm_id
return ClientOptionalScopes(resource_name, opts=opts, __props__=__props__)
def translate_output_property(self, prop):
return tables._CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop
def translate_input_property(self, prop):
return tables._SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop
|
[
"[email protected]"
] | |
2704e6f84e46c139529f9206e7c2166217968b5a
|
e61e664d95af3b93150cda5b92695be6551d2a7c
|
/vega/modules/tensformers/pooler.py
|
89b4fdf3207eb1794f0a6c40a086cfe87d580336
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] |
permissive
|
huawei-noah/vega
|
44aaf8bb28b45f707ed6cd4e871ba70fc0c04846
|
12e37a1991eb6771a2999fe0a46ddda920c47948
|
refs/heads/master
| 2023-09-01T20:16:28.746745 | 2023-02-15T09:36:59 | 2023-02-15T09:36:59 | 273,667,533 | 850 | 184 |
NOASSERTION
| 2023-02-15T09:37:01 | 2020-06-20T08:20:06 |
Python
|
UTF-8
|
Python
| false | false | 1,383 |
py
|
# -*- coding:utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""This is Pooler for Bert."""
from vega.modules.operators import ops
from vega.modules.module import Module
from vega.common.class_factory import ClassType, ClassFactory
@ClassFactory.register(ClassType.NETWORK)
class Pooler(Module):
"""Pooler layer to pooling first_token from encoder."""
def __init__(self, config):
super(Pooler, self).__init__()
self.dense = ops.Linear(config.hidden_size, config.hidden_size)
self.activation = ops.Tanh()
def call(self, hidden_states):
"""Get token and pooling."""
first_token_tensor = hidden_states[:, 0]
pooled_output = self.dense(first_token_tensor)
pooled_output = self.activation(pooled_output)
return pooled_output
|
[
"[email protected]"
] | |
13d7db7aaca6f9e6a63202ca06de69f98a608bf5
|
002c14cd622b4890cce1c243065cebe39e2302ec
|
/CodingInterview2/24_ReverseList/reverse_list.py
|
7299f43b46d7e486ee7a35d5b50c38ccae52c3da
|
[
"MIT"
] |
permissive
|
hscspring/The-DataStructure-and-Algorithms
|
6200eba031eac51b13e320e1fc9f204644933e00
|
e704a92e091f2fdf5f27ec433e0e516ccc787ebb
|
refs/heads/master
| 2022-08-29T18:47:52.378884 | 2022-08-25T16:22:44 | 2022-08-25T16:22:44 | 201,743,910 | 11 | 3 |
MIT
| 2021-04-20T18:28:47 | 2019-08-11T09:26:34 |
Python
|
UTF-8
|
Python
| false | false | 1,502 |
py
|
"""
面试题 24:反转链表
题目:定义一个函数,输入一个链表的头结点,反转该链表并输出反转后链表的
头结点。
"""
class Node:
def __init__(self, val):
self.val = val
self.next = None
def list2link(lst):
root = Node(None)
ptr = root
for i in lst:
ptr.next = Node(i)
ptr = ptr.next
return root.next
def link2list(root: Node) -> list:
res = []
while root:
res.append(root.val)
root = root.next
return res
def reverse(link: Node) -> Node:
"""
Reverse a linklist
Parameters
-----------
link: Node
the given linklist
Returns
---------
out: Node
the revsersed linklist
Notes
------
"""
if not link:
return None
pre = None
while link:
val = link.val
node = Node(val)
node.next = pre
pre = node
link = link.next
return node
def reverse2(link: Node) -> Node:
pre = None
cur = link
while cur:
nxt = cur.next
cur.next = pre
pre = cur
cur = nxt
return pre
def reverse3(head: Node) -> Node:
if not head or not head.next:
return head
p = reverse3(head.next)
head.next.next = head
head.next = None
return p
if __name__ == '__main__':
link = list2link([1, 2])
rlink = reverse3(link)
print(rlink.val)
print(rlink.next)
# res = link2list(rlink)
# print(res)
|
[
"[email protected]"
] | |
9d003c26a99d9d7036d763b8aadcaa977689f9bc
|
fc24e89a0127acd8dac7d9357268e446cea66f59
|
/app/__init__.py
|
884fc9c3145181a34af1532607449ac33502e9e9
|
[] |
no_license
|
JamesMusyoka/Watch-list
|
10e08d05a9ae5436629fcd8efcb320de8c943821
|
0070e66de152f77c828fc8eb08e25aa720cceac7
|
refs/heads/master
| 2022-12-24T02:04:02.825901 | 2020-10-06T20:17:55 | 2020-10-06T20:17:55 | 168,703,432 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 376 |
py
|
from flask import Flask
from flask_bootstrap import Bootstrap
from .config import DevConfig
# Initializing application
app = Flask(__name__,instance_relative_config = True)
# Setting up configuration
app.config.from_object(DevConfig)
app.config.from_pyfile("config.py")
# Initializing Flask Extensions
bootstrap = Bootstrap(app)
from app import views
from app import error
|
[
"[email protected]"
] | |
1a354b4773439ab02e2f24b309f7819104ba2030
|
795854ea2d73a5da0114694cd0a232d1f4589b5a
|
/users/migrations/0003_delete_profile.py
|
7d757713350d36a25ee1abccbecdb21f856c0a81
|
[] |
no_license
|
JEENUMINI/recipeclassbasedview
|
fe0ec63af261f53eb765064ab9ec82bb40d5a969
|
ced076d71e6a7cbe9790270b7efa1cbc4a5390a8
|
refs/heads/master
| 2023-02-02T09:52:02.702351 | 2020-12-24T18:51:59 | 2020-12-24T18:51:59 | 323,711,461 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 288 |
py
|
# Generated by Django 3.1.3 on 2020-12-24 18:45
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('users', '0002_profilemodel'),
]
operations = [
migrations.DeleteModel(
name='Profile',
),
]
|
[
"[email protected]"
] | |
65ebf528c07a7855bcfc0136dcc061fdaf19a5fc
|
fa841ab3564e0e0fd6065201846fb6f305c43719
|
/installation/utils.py
|
c4c988bcfdf3973234bec2b36d1090821a0aadb1
|
[] |
no_license
|
suipnice/Jalon
|
dc008232baba6c1295cb8a6d6001147e22e03c2a
|
bc003d10ed15d6ecc5f15fdb3809e9dd53b568bd
|
refs/heads/master
| 2021-01-08T05:46:55.757385 | 2016-06-13T11:58:31 | 2016-06-13T11:58:31 | 241,926,067 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 3,950 |
py
|
from datetime import datetime
from DateTime.DateTime import DateTime
from dateutil.parser import parse as dateparse
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone import PloneLocalesMessageFactory as _locales
from Products.CMFPlone import PloneMessageFactory as _plone
from Products.Ploneboard.interfaces import IComment
from Products.Ploneboard.interfaces import IConversation
from zope.i18n import translate
import time
class defer(object):
"""Defer function call until actually used.
Useful for date components in translations
"""
def __init__(self, func, *args, **kwargs):
self.func = func
self.args = args
self.kwargs = kwargs
def __str__(self):
return self.func(*self.args, **self.kwargs)
def toPloneboardTime(context, request, time_=None):
"""Return time formatted for Ploneboard"""
ploneboard_time = None
ts = getToolByName(context, 'translation_service')
format = '%Y;%m;%d;%w;%H;%M;%S'
# fallback formats, english
young_format_en = '%A %H:%M'
old_format_en = '%B %d. %Y'
if not time_:
return 'Unknown date'
if callable(time_):
time_ = time_()
try:
if isinstance(time_, DateTime):
time_ = datetime.fromtimestamp(time_.timeTime())
else:
time_ = dateparse(str(time_))
(year, month, day,
hours, minutes, seconds, wday, _, dst) = time_.timetuple()
translated_date_elements = {
'year': year,
'month': unicode(
defer(
translate,
_locales(ts.month_msgid(month)),
context=request
)
),
'day': day,
'wday': unicode(
defer(
translate,
_locales(ts.day_msgid((wday + 1) % 7)),
context=request
)
),
'hours': "%02i" % hours,
'minutes': "%02i" % minutes,
'seconds': "%02i" % seconds
}
if time.time() - time.mktime(time_.timetuple()) < 604800: # 60*60*24*7
ploneboard_time = translate(
'${wday} ${hours}:${minutes}',
mapping=translated_date_elements,
context=request
)
else:
try:
ploneboard_time = translate(
_plone(
'old_date_format: ${year} ${month} ${day} '
'${hours}:${minutes}',
default=unicode(
time_.strftime(old_format_en).decode('utf-8')
),
mapping=translated_date_elements
),
context=request
)
except:
ploneboard_time = translate(
_plone(
'old_date_format: ${year} ${month} ${day} '
'${hours}:${minutes}',
default=time_.strftime(old_format_en),
mapping=translated_date_elements
),
context=request
)
except IndexError:
pass
return ploneboard_time
def getNumberOfComments(node, catalog=None):
"""Returns the number of comments to this forum.
"""
if catalog is None:
catalog = getToolByName(node, 'portal_catalog')
return len(catalog(
object_provides=IComment.__identifier__,
path='/'.join(node.getPhysicalPath())))
def getNumberOfConversations(node, catalog=None):
"""Returns the number of conversations in this forum.
"""
if catalog is None:
catalog = getToolByName(node, 'portal_catalog')
return len(catalog(
object_provides=IConversation.__identifier__,
path='/'.join(node.getPhysicalPath())))
|
[
"[email protected]"
] | |
569a3d223c7cb6f6f0df86ab3966d52d3518a40a
|
159a2e75ff6cc7c0b58741c25636b83410e42bc7
|
/数据结构与算法/合并排序merge_sort.py
|
86619f34a4cd6b4984dd3097ff78ee7ec165ac3d
|
[] |
no_license
|
articuly/python_study
|
e32ba6827e649773e5ccd953e35635aec92c2c15
|
b7f23cdf3b74431f245fe30c9d73b4c6910b1067
|
refs/heads/master
| 2020-11-24T04:20:35.131925 | 2020-09-10T08:21:06 | 2020-09-10T08:21:06 | 227,961,859 | 3 | 1 | null | null | null | null |
UTF-8
|
Python
| false | false | 859 |
py
|
# coding:utf-8
import random
def merge_sort(lst):
if len(lst) <= 1:
return lst
middle = len(lst) // 2
left_lst = []
right_lst = []
for i in lst[:middle]:
if i <= lst[middle]:
left_lst.append(i)
else:
right_lst.append(i)
for i in lst[middle + 1:]:
if i <= lst[middle]:
left_lst.append(i)
else:
right_lst.append(i)
print(left_lst, [lst[middle]], right_lst)
return merge_sort(left_lst) + [lst[middle]] + merge_sort(right_lst)
lst = [random.randint(1, 100) for i in range(10)]
print('random list:', lst)
print('sorted list:', merge_sort(lst))
'''
每次分割成2部分,大概log2n次可以得到一个元素
合并次是O(n)
平均水平是O(nlog2n)
由于使用了递归和两个列表,所以以空间复杂度增大O(n)+O(logn)
'''
|
[
"[email protected]"
] | |
6a44cc3eece0be757f14a78b85ad67a7506e8ed1
|
e53ed2cc0babec5c52ad4b8691ff32c74a57f019
|
/prototype/wsgi/django.wsgi
|
959df017cf49fb95052a0e46d17db55149fdfbb8
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
NYPL/gazetteer
|
bf28f12c53b896acc1f805175106ccb42a71cbe1
|
708035e8d2299e70a6d3cecce40970242673426c
|
refs/heads/master
| 2016-09-05T18:21:15.027147 | 2015-02-03T19:54:32 | 2015-02-03T19:54:32 | 18,560,844 | 5 | 1 | null | null | null | null |
UTF-8
|
Python
| false | false | 768 |
wsgi
|
# django.wsgi for gazetteer
import os
import sys
import site
project_module = 'prototype'
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')))
#using virtualenv's activate_this.py to reorder sys.path
activate_this = os.path.join(root_dir, 'bin', 'activate_this.py')
execfile(activate_this, dict(__file__=activate_this))
sys.path.append(root_dir)
sys.path.append(os.path.join(root_dir, project_module))
#reload if this django.wsgi gets touched
from ox.django import monitor
monitor.start(interval=1.0)
monitor.track(os.path.abspath(os.path.dirname(__file__)))
os.environ['DJANGO_SETTINGS_MODULE'] = project_module + '.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
|
[
"[email protected]"
] | |
aac399dfe61d229b6de4908ee1f89bcd05344f94
|
ad4299d34d75f4cf346c08d1971fff0555923b7a
|
/nodeum_sdk/models/user_configuration.py
|
9afab5d61a8e220cf16ed32b05c0b63bd8c40d79
|
[
"MIT"
] |
permissive
|
nodeum-io/nodeum-sdk-python
|
16ab0b4e6dcff05c4a06829d263d27f3b66a41be
|
205536491bff507dea7be44af46202c17e7121d9
|
refs/heads/master
| 2021-07-13T19:38:24.863671 | 2020-09-01T09:56:30 | 2020-09-01T09:56:30 | 201,425,025 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 7,244 |
py
|
# coding: utf-8
"""
Nodeum API
The Nodeum API makes it easy to tap into the digital data mesh that runs across your organisation. Make requests to our API endpoints and we’ll give you everything you need to interconnect your business workflows with your storage. All production API requests are made to: http://nodeumhostname/api/ The current production version of the API is v1. **REST** The Nodeum API is a RESTful API. This means that the API is designed to allow you to get, create, update, & delete objects with the HTTP verbs GET, POST, PUT, PATCH, & DELETE. **JSON** The Nodeum API speaks exclusively in JSON. This means that you should always set the Content-Type header to application/json to ensure that your requests are properly accepted and processed by the API. **Authentication** All API calls require user-password authentication. **Cross-Origin Resource Sharing** The Nodeum API supports CORS for communicating from Javascript for these endpoints. You will need to specify an Origin URI when creating your application to allow for CORS to be whitelisted for your domain. **Pagination** Some endpoints such as File Listing return a potentially lengthy array of objects. In order to keep the response sizes manageable the API will take advantage of pagination. Pagination is a mechanism for returning a subset of the results for a request and allowing for subsequent requests to “page” through the rest of the results until the end is reached. Paginated endpoints follow a standard interface that accepts two query parameters, limit and offset, and return a payload that follows a standard form. These parameters names and their behavior are borrowed from SQL LIMIT and OFFSET keywords. **Versioning** The Nodeum API is constantly being worked on to add features, make improvements, and fix bugs. This means that you should expect changes to be introduced and documented. However, there are some changes or additions that are considered backwards-compatible and your applications should be flexible enough to handle them. These include: - Adding new endpoints to the API - Adding new attributes to the response of an existing endpoint - Changing the order of attributes of responses (JSON by definition is an object of unordered key/value pairs) **Filter parameters** When browsing a list of items, multiple filter parameters may be applied. Some operators can be added to the value as a prefix: - `=` value is equal. Default operator, may be omitted - `!=` value is different - `>` greater than - `>=` greater than or equal - `<` lower than - `>=` lower than or equal - `><` included in list, items should be separated by `|` - `!><` not included in list, items should be separated by `|` - `~` pattern matching, may include `%` (any characters) and `_` (one character) - `!~` pattern not matching, may include `%` (any characters) and `_` (one character) # noqa: E501
The version of the OpenAPI document: 2.1.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from nodeum_sdk.configuration import Configuration
class UserConfiguration(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
'id': 'int',
'key': 'str',
'value': 'str'
}
attribute_map = {
'id': 'id',
'key': 'key',
'value': 'value'
}
def __init__(self, id=None, key=None, value=None, local_vars_configuration=None): # noqa: E501
"""UserConfiguration - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._id = None
self._key = None
self._value = None
self.discriminator = None
if id is not None:
self.id = id
if key is not None:
self.key = key
if value is not None:
self.value = value
@property
def id(self):
"""Gets the id of this UserConfiguration. # noqa: E501
:return: The id of this UserConfiguration. # noqa: E501
:rtype: int
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this UserConfiguration.
:param id: The id of this UserConfiguration. # noqa: E501
:type: int
"""
self._id = id
@property
def key(self):
"""Gets the key of this UserConfiguration. # noqa: E501
:return: The key of this UserConfiguration. # noqa: E501
:rtype: str
"""
return self._key
@key.setter
def key(self, key):
"""Sets the key of this UserConfiguration.
:param key: The key of this UserConfiguration. # noqa: E501
:type: str
"""
self._key = key
@property
def value(self):
"""Gets the value of this UserConfiguration. # noqa: E501
:return: The value of this UserConfiguration. # noqa: E501
:rtype: str
"""
return self._value
@value.setter
def value(self, value):
"""Sets the value of this UserConfiguration.
:param value: The value of this UserConfiguration. # noqa: E501
:type: str
"""
self._value = value
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, UserConfiguration):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, UserConfiguration):
return True
return self.to_dict() != other.to_dict()
|
[
"[email protected]"
] | |
f2a7b25271e5666777304dc9ae8ea519aeea7e14
|
64ed77abebb2ebab52ac0668c1639bfd79ec05d1
|
/uploads/urls.py
|
00c90287a6fc76f22881bbffa111853e3ef6032e
|
[
"MIT"
] |
permissive
|
tiagocordeiro/estudio-abc
|
731058582ee8d76366b9208687bbb906dcbca680
|
1f48d785063717ddc3b17b32df342b9eec7dbd32
|
refs/heads/master
| 2023-09-01T17:51:12.449297 | 2021-05-07T00:06:21 | 2021-05-13T17:16:15 | 140,905,450 | 0 | 0 |
MIT
| 2023-09-11T17:53:56 | 2018-07-14T01:08:22 |
HTML
|
UTF-8
|
Python
| false | false | 191 |
py
|
from django.urls import path
from . import views
urlpatterns = [
path('upload/', views.model_form_upload, name='uploads'),
path('list-files/', views.arquivos, name='list_files'),
]
|
[
"[email protected]"
] | |
78e7cd590afac746961274a42957f2802356d876
|
9b2eb0d6b673ac4945f9698c31840b847f790a58
|
/pkg/apteco_api/models/version_details.py
|
1d091491980802ad0a985957a993b65b589cc0e1
|
[
"Apache-2.0"
] |
permissive
|
Apteco/apteco-api
|
6d21c9f16e58357da9ce64bac52f1d2403b36b7c
|
e8cf50a9cb01b044897025c74d88c37ad1612d31
|
refs/heads/master
| 2023-07-10T23:25:59.000038 | 2023-07-07T14:52:29 | 2023-07-07T14:52:29 | 225,371,142 | 2 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 3,558 |
py
|
# coding: utf-8
"""
Apteco API
An API to allow access to Apteco Marketing Suite resources # noqa: E501
The version of the OpenAPI document: v2
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from apteco_api.configuration import Configuration
class VersionDetails(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
'version': 'str'
}
attribute_map = {
'version': 'version'
}
def __init__(self, version=None, local_vars_configuration=None): # noqa: E501
"""VersionDetails - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._version = None
self.discriminator = None
self.version = version
@property
def version(self):
"""Gets the version of this VersionDetails. # noqa: E501
The version of the API # noqa: E501
:return: The version of this VersionDetails. # noqa: E501
:rtype: str
"""
return self._version
@version.setter
def version(self, version):
"""Sets the version of this VersionDetails.
The version of the API # noqa: E501
:param version: The version of this VersionDetails. # noqa: E501
:type: str
"""
if self.local_vars_configuration.client_side_validation and version is None: # noqa: E501
raise ValueError("Invalid value for `version`, must not be `None`") # noqa: E501
self._version = version
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, VersionDetails):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, VersionDetails):
return True
return self.to_dict() != other.to_dict()
|
[
"[email protected]"
] | |
1096fbb40ce7281904a478a2bcb479fc5484ec59
|
00c6ded41b84008489a126a36657a8dc773626a5
|
/.history/Sizing_Method/ConstrainsAnalysis/ConstrainsAnalysisPD_20210714165137.py
|
8c75903609d9661e393de46350cd454da372e89d
|
[] |
no_license
|
12libao/DEA
|
85f5f4274edf72c7f030a356bae9c499e3afc2ed
|
1c6f8109bbc18c4451a50eacad9b4dedd29682bd
|
refs/heads/master
| 2023-06-17T02:10:40.184423 | 2021-07-16T19:05:18 | 2021-07-16T19:05:18 | 346,111,158 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 12,992 |
py
|
# author: Bao Li #
# Georgia Institute of Technology #
import sys
import os
sys.path.insert(0, os.getcwd())
import numpy as np
import matplotlib.pylab as plt
import Sizing_Method.Other.US_Standard_Atmosphere_1976 as atm
import Sizing_Method.Aerodynamics.ThrustLapse as thrust_lapse
import Sizing_Method.Aerodynamics.Aerodynamics as ad
import Sizing_Method.ConstrainsAnalysis.ConstrainsAnalysis as ca
from scipy.optimize import curve_fit
"""
The unit use is IS standard
"""
class ConstrainsAnalysis_Mattingly_Method_with_DP:
"""This is a power-based master constraints analysis"""
def __init__(self, altitude, velocity, beta, wing_load, Hp=0.2, number_of_motor=12, C_DR=0):
"""
:param beta: weight fraction
:param Hp: P_motor/P_total
:param n: number of motor
:param K1: drag polar coefficient for 2nd order term
:param K2: drag polar coefficient for 1st order term
:param C_D0: the drag coefficient at zero lift
:param C_DR: additional drag caused, for example, by external stores,
braking parachutes or flaps, or temporary external hardware
:return:
power load: P_WTO
"""
self.h = altitude
self.v = velocity
self.rho = atm.atmosphere(geometric_altitude=self.h).density()
self.beta = beta
self.hp = Hp
self.n = number_of_motor
# power lapse ratio
self.alpha = thrust_lapse.thrust_lapse_calculation(altitude=self.h,
velocity=self.v).high_bypass_ratio_turbofan()
self.k1 = ad.aerodynamics_without_pd(self.h, self.v).K1()
self.k2 = ad.aerodynamics_without_pd(self.h, self.v).K2()
self.cd0 = ad.aerodynamics_without_pd(self.h, self.v).CD_0()
self.cdr = C_DR
self.w_s = wing_load
self.g0 = 9.80665
self.coefficient = (1 - self.hp) * self.beta * self.v / self.alpha
# Estimation of ΔCL and ΔCD
pd = ad.aerodynamics_with_pd(self.h, self.v, Hp=self.hp, n=self.n, W_S=self.w_s)
self.q = 0.5 * self.rho * self.v ** 2
self.cl = self.beta * self.w_s / self.q
# print(self.cl)
self.delta_cl = pd.delta_lift_coefficient(self.cl)
self.delta_cd0 = pd.delta_CD_0()
def master_equation(self, n, dh_dt, dV_dt):
cl = self.cl * n + self.delta_cl
cd = self.k1 * cl ** 2 + self.k2 * cl + self.cd0 + self.cdr + self.delta_cd0
p_w = self.coefficient * (self.q / (self.beta * self.w_s) * cd + dh_dt / self.v + dV_dt / self.g0)
return p_w
def cruise(self):
p_w = ConstrainsAnalysis_Mattingly_Method_with_DP.master_equation(self, n=1, dh_dt=0, dV_dt=0)
return p_w
def climb(self, roc):
p_w = ConstrainsAnalysis_Mattingly_Method_with_DP.master_equation(self, n=1, dh_dt=roc, dV_dt=0)
return p_w
def level_turn(self, turn_rate=3, v=100):
"""
assume 2 min for 360 degree turn, which is 3 degree/seconds
assume turn at 300 knots, which is about 150 m/s
"""
load_factor = (1 + ((turn_rate * np.pi / 180) * v / self.g0) ** 2) ** 0.5
p_w = ConstrainsAnalysis_Mattingly_Method_with_DP.master_equation(self, n=load_factor, dh_dt=0, dV_dt=0)
return p_w
def take_off(self):
"""
A320neo take-off speed is about 150 knots, which is about 75 m/s
required runway length is about 2000 m
K_TO is a constant greater than one set to 1.2 (generally specified by appropriate flying regulations)
"""
Cl_max_to = 2.3 # 2.3
K_TO = 1.2 # V_TO / V_stall
s_G = 1266
p_w = 2 / 3 * self.coefficient / self.v * self.beta * K_TO ** 2 / (
s_G * self.rho * self.g0 * Cl_max_to) * self.w_s ** (
3 / 2)
return p_w
def stall_speed(self, V_stall_to=65, Cl_max_to=2.32):
V_stall_ld = 62
Cl_max_ld = 2.87
a = 10
w_s = 6000
while a >= 1:
cl = self.beta * w_s / self.q
delta_cl = ad.aerodynamics_with_pd(self.h, self.v, Hp=self.hp, n=self.n, W_S=w_s).delta_lift_coefficient(cl)
W_S_1 = 1 / 2 * self.rho * V_stall_to ** 2 * (Cl_max_to + delta_cl)
W_S_2 = 1 / 2 * self.rho * V_stall_ld ** 2 * (Cl_max_ld + delta_cl)
W_S = min(W_S_1, W_S_2)
a = abs(w_s-W_S)
w_s = W_S
return W_S
def service_ceiling(self, roc=0.5):
p_w = ConstrainsAnalysis_Mattingly_Method_with_DP.master_equation(self, n=1, dh_dt=roc, dV_dt=0)
return p_w
allFuncs = [stall_speed, take_off, cruise,
service_ceiling, level_turn, climb]
class ConstrainsAnalysis_Gudmundsson_Method_with_DP:
"""This is a power-based master constraints analysis based on Gudmundsson_method"""
def __init__(self, altitude, velocity, beta, wing_load, Hp=0.2, number_of_motor=12, e=0.75, AR=10.3):
"""
:param tau: power fraction of i_th power path
:param beta: weight fraction
:param e: wing planform efficiency factor is between 0.75 and 0.85, no more than 1
:param AR: wing aspect ratio, normally between 7 and 10
:return:
power load: P_WTO
"""
self.h = altitude
self.v = velocity
self.beta = beta
self.w_s = wing_load
self.g0 = 9.80665
self.hp = Hp
self.n = number_of_motor
self.rho = atm.atmosphere(geometric_altitude=self.h).density()
# power lapse ratio
self.alpha = thrust_lapse.thrust_lapse_calculation(altitude=self.h,
velocity=self.v).high_bypass_ratio_turbofan()
h = 2.43 # height of winglets
b = 35.8
ar_corr = AR * (1 + 1.9 * h / b) # equation 9-88, If the wing has winglets the aspect ratio should be corrected
self.k = 1 / (np.pi * ar_corr * e)
self.coefficient = (1-self.hp) * self.beta * self.v / self.alpha
# Estimation of ΔCL and ΔCD
pd = ad.aerodynamics_with_pd(self.h, self.v, Hp=self.hp, n=self.n, W_S=self.w_s)
self.q = 0.5 * self.rho * self.v ** 2
cl = self.beta * self.w_s / self.q
self.delta_cl = pd.delta_lift_coefficient(cl)
self.delta_cd0 = pd.delta_CD_0()
# TABLE 3-1 Typical Aerodynamic Characteristics of Selected Classes of Aircraft
cd_min = 0.02
cd_to = 0.03
cl_to = 0.8
self.v_to = 68
self.s_g = 1480
self.mu = 0.04
self.cd_min = cd_min + self.delta_cd0
self.cl = cl + self.delta_cl
self.cd_to = cd_to + self.delta_cd0
self.cl_to = cl_to + self.delta_cl
def cruise(self):
p_w = self.q / self.w_s * (self.cd_min + self.k * self.cl ** 2)
return p_w * self.coefficient
def climb(self, roc):
p_w = roc / self.v + self.q * self.cd_min / self.w_s + self.k * self.cl
return p_w * self.coefficient
def level_turn(self, turn_rate=3, v=100):
"""
assume 2 min for 360 degree turn, which is 3 degree/seconds
assume turn at 100 m/s
"""
load_factor = (1 + ((turn_rate * np.pi / 180) * v / self.g0) ** 2) ** 0.5
q = 0.5 * self.rho * v ** 2
p_w = q / self.w_s * (self.cd_min + self.k * (load_factor / q * self.w_s + self.delta_cl) ** 2)
return p_w * self.coefficient
def take_off(self):
q = self.q / 2
p_w = self.v_to ** 2 / (2 * self.g0 * self.s_g) + q * self.cd_to / self.w_s + self.mu * (
1 - q * self.cl_to / self.w_s)
return p_w * self.coefficient
def service_ceiling(self, roc=0.5):
vy = (2 / self.rho * self.w_s * (self.k / (3 * self.cd_min)) ** 0.5) ** 0.5
q = 0.5 * self.rho * vy ** 2
p_w = roc / vy + q / self.w_s * (self.cd_min + self.k * (self.w_s / q + self.delta_cl) ** 2)
# p_w = roc / (2 / self.rho * self.w_s * (self.k / (3 * self.cd_min)) ** 0.5) ** 0.5 + 4 * (
# self.k * self.cd_min / 3) ** 0.5
return p_w * self.coefficient
def stall_speed(self, V_stall_to=65, Cl_max_to=2.32):
V_stall_ld = 62
Cl_max_ld = 2.87
a = 10
w_s = 6000
while a >= 1:
cl = self.beta * w_s / self.q
delta_cl = ad.aerodynamics_with_pd(
self.h, self.v, Hp=self.hp, n=self.n, W_S=w_s).delta_lift_coefficient(cl)
W_S_1 = 1 / 2 * self.rho * V_stall_to ** 2 * (Cl_max_to + delta_cl)
W_S_2 = 1 / 2 * self.rho * V_stall_ld ** 2 * (Cl_max_ld + delta_cl)
W_S = min(W_S_1, W_S_2)
a = abs(w_s-W_S)
w_s = W_S
return W_S
allFuncs = [stall_speed, take_off, cruise,
service_ceiling, level_turn, climb]
if __name__ == "__main__":
n = 200
constrains_name = ['stall speed', 'take off', 'cruise', 'service ceiling', 'level turn @3000m',
'climb @S-L', 'climb @3000m', 'climb @7000m']
constrains = np.array([[0, 80, 1], [0, 68, 0.988], [11300, 230, 0.948],
[11900, 230, 0.8], [3000, 100, 0.984], [0, 100, 0.984],
[3000, 200, 0.975], [7000, 230, 0.96]])
color = ['k', 'c', 'b', 'g', 'y', 'plum', 'violet', 'm']
label = ['feasible region with PD', 'feasible region with PD', 'feasible region Gudmundsson',
'feasible region without PD', 'feasible region without PD', 'feasible region Mattingly']
m = constrains.shape[0]
for k in range(3):
w_s = np.linspace(100, 9000, n)
p_w = np.zeros([2 * m, n])
plt.figure(figsize=(12, 8))
for i in range(m):
for j in range(n):
h = constrains[i, 0]
v = constrains[i, 1]
beta = constrains[i, 2]
if k == 0:
problem1 = ConstrainsAnalysis_Gudmundsson_Method_with_DP(h, v, beta, w_s[j])
problem2 = ca.ConstrainsAnalysis_Gudmundsson_Method(h, v, beta, w_s[j])
plt.title(r'Constraint Analysis: $\bf{Gudmundsson-Method}$ - Normalized to Sea Level')
elif k == 1:
problem1 = ConstrainsAnalysis_Mattingly_Method_with_DP(h, v, beta, w_s[j])
problem2 = ca.ConstrainsAnalysis_Mattingly_Method(h, v, beta, w_s[j])
plt.title(r'Constraint Analysis: $\bf{Mattingly-Method}$ - Normalized to Sea Level')
else:
problem1 = ConstrainsAnalysis_Gudmundsson_Method_with_DP(h, v, beta, w_s[j])
problem2 = ConstrainsAnalysis_Mattingly_Method_with_DP(h, v, beta, w_s[j])
plt.title(r'Constraint Analysis: $\bf{with}$ $\bf{DP}$ - Normalized to Sea Level')
if i >= 5:
p_w[i, j] = problem1.allFuncs[-1](problem1, roc=15 - 5 * (i - 5))
p_w[i + m, j] = problem2.allFuncs[-1](problem2, roc=15 - 5 * (i - 5))
else:
p_w[i, j] = problem1.allFuncs[i](problem1)
p_w[i + m, j] = problem2.allFuncs[i](problem2)
if i == 0:
l1a, = plt.plot(p_w[i, :], np.linspace(0, 250, n), color=color[i], label=constrains_name[i])
l1b, = plt.plot(p_w[i + m, :], np.linspace(0, 250, n), color=color[i], linestyle='--')
if k != 2:
l1 = plt.legend([l1a, l1b], ['with DP', 'without DP'], loc="upper right")
else:
l1 = plt.legend([l1a, l1b], ['Gudmundsson method', 'Mattingly method'], loc="upper right")
else:
plt.plot(w_s, p_w[i, :], color=color[i], label=constrains_name[i])
plt.plot(w_s, p_w[i + m, :], color=color[i], linestyle='--')
# w_s = np.linspace(100, p_w[0, 1], n)
plt.fill_between(np.linspace([]100, p_w[0, 1], n), np.amax(
p_w[1:m-1, :], axis=0), 200, color='b', alpha=0.25, label=label[k])
# w_s = np.linspace(100, p_w[m, 1], n)
plt.fill_between(w_s, np.amax(p_w[m+1:2 * m-1, :], axis=0), 200, color='r', alpha=0.25, label=label[k + 3])
plt.plot(6012, 72, 'r*', markersize=10, label='True Conventional')
plt.xlabel('Wing Load: $W_{TO}$/S (N/${m^2}$)')
plt.ylabel('Power-to-Load: $P_{SL}$/$W_{TO}$ (W/N)')
plt.legend(bbox_to_anchor=(1.002, 1), loc="upper left")
plt.gca().add_artist(l1)
plt.xlim(100, 9000)
plt.ylim(0, 200)
plt.tight_layout()
plt.grid()
plt.show()
|
[
"[email protected]"
] | |
d0effd8a6732f9e7257665ad5ac55ee41da609ef
|
951a84f6fafa763ba74dc0ad6847aaf90f76023c
|
/P3/Solu5062__1167.py
|
edc270ced15fa3f1fbe7a74d67cd402e0023caf4
|
[] |
no_license
|
SakuraGo/leetcodepython3
|
37258531f1994336151f8b5c8aec5139f1ba79f8
|
8cedddb997f4fb6048b53384ac014d933b6967ac
|
refs/heads/master
| 2020-09-27T15:55:28.353433 | 2020-02-15T12:00:02 | 2020-02-15T12:00:02 | 226,550,406 | 1 | 1 | null | null | null | null |
UTF-8
|
Python
| false | false | 657 |
py
|
from typing import List
import heapq
class Solution:
def connectSticks(self, sticks: List[int]) -> int:
if len(sticks) == 1:
return sticks[0]
sum = 0
heapq.heapify(sticks)
while len(sticks)>1:
#
num0 = heapq.heappop(sticks)
num1 = heapq.heappop(sticks)
sum += (num0+num1)
heapq.heappush(sticks,(num0+num1))
heapq._siftup(sticks,len(sticks)-1)
# print(sticks)
return sum
#
# lis = [5,1,2,3,3,3,5]
# heapq.heapify(lis)
# print(lis)
res = Solution().connectSticks([8,1,3,5])
print(res)
# print(1397754 - 1363767)
|
[
"[email protected]"
] | |
898ea912e08beebbcf08292bac0f109b453fb21a
|
90ec137d760e2c5f094e82f0f4456c04f5ac98dc
|
/tests/plugins/test_tk_functional.py
|
3e53d24b4694809cf8bac71ad7e84d09c25e7f95
|
[] |
no_license
|
d0nin380/big-brother-bot
|
8adc5d35e37e6eb9f6b67e431072e596a24211ef
|
949aa0b0c82658795eea43474d220bfbaaba861f
|
refs/heads/master
| 2021-01-18T04:33:19.093850 | 2013-03-25T02:34:59 | 2013-03-25T02:34:59 | 8,996,188 | 1 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 11,694 |
py
|
#
# BigBrotherBot(B3) (www.bigbrotherbot.net)
# Copyright (C) 2011 Courgette
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
import os
from mock import Mock, patch
import unittest2 as unittest
from mockito import when
import b3
from b3.plugins.admin import AdminPlugin
from b3.plugins.tk import TkPlugin
from b3.config import XmlConfigParser
from b3.fake import FakeClient
from tests import B3TestCase
from b3 import __file__ as b3_module__file__
ADMIN_CONFIG_FILE = os.path.normpath(os.path.join(os.path.dirname(b3_module__file__), "conf/plugin_admin.xml"))
@unittest.skipUnless(os.path.exists(ADMIN_CONFIG_FILE), reason="cannot get default plugin config file at %s" % ADMIN_CONFIG_FILE)
@patch("threading.Timer")
class Tk_functional_test(B3TestCase):
def setUp(self):
B3TestCase.setUp(self)
self.console.gameName = 'f00'
self.adminPlugin = AdminPlugin(self.console, ADMIN_CONFIG_FILE)
when(self.console).getPlugin("admin").thenReturn(self.adminPlugin)
self.adminPlugin.onLoadConfig()
self.adminPlugin.onStartup()
self.conf = XmlConfigParser()
self.conf.setXml(r"""
<configuration plugin="tk">
<settings name="settings">
<set name="max_points">400</set>
<set name="levels">0,1,2,20,40</set>
<set name="round_grace">7</set>
<set name="issue_warning">sfire</set>
<set name="grudge_enable">True</set>
<set name="private_messages">True</set>
</settings>
<settings name="messages">
<set name="ban">^7team damage over limit</set>
<set name="forgive">^7$vname^7 has forgiven $aname [^3$points^7]</set>
<set name="grudged">^7$vname^7 has a ^1grudge ^7against $aname [^3$points^7]</set>
<set name="forgive_many">^7$vname^7 has forgiven $attackers</set>
<set name="forgive_warning">^1ALERT^7: $name^7 auto-kick if not forgiven. Type ^3!forgive $cid ^7to forgive. [^3damage: $points^7]</set>
<set name="no_forgive">^7no one to forgive</set>
<set name="no_punish">^7no one to punish</set>
<set name="players">^7Forgive who? %s</set>
<set name="forgive_info">^7$name^7 has ^3$points^7 TK points</set>
<set name="grudge_info">^7$name^7 is ^1grudged ^3$points^7 TK points</set>
<set name="forgive_clear">^7$name^7 cleared of ^3$points^7 TK points</set>
</settings>
<settings name="level_0">
<set name="kill_multiplier">2</set>
<set name="damage_multiplier">1</set>
<set name="ban_length">2</set>
</settings>
<settings name="level_1">
<set name="kill_multiplier">2</set>
<set name="damage_multiplier">1</set>
<set name="ban_length">2</set>
</settings>
<settings name="level_2">
<set name="kill_multiplier">1</set>
<set name="damage_multiplier">0.5</set>
<set name="ban_length">1</set>
</settings>
<settings name="level_20">
<set name="kill_multiplier">1</set>
<set name="damage_multiplier">0.5</set>
<set name="ban_length">0</set>
</settings>
<settings name="level_40">
<set name="kill_multiplier">0.75</set>
<set name="damage_multiplier">0.5</set>
<set name="ban_length">0</set>
</settings>
</configuration>
""")
self.p = TkPlugin(self.console, self.conf)
self.p.onLoadConfig()
self.p.onStartup()
self.joe = FakeClient(self.console, name="Joe", guid="joeguid", groupBits=1, team=b3.TEAM_RED)
self.mike = FakeClient(self.console, name="Mike", guid="mikeguid", groupBits=1, team=b3.TEAM_RED)
self.bill = FakeClient(self.console, name="Bill", guid="billguid", groupBits=1, team=b3.TEAM_RED)
self.superadmin = FakeClient(self.console, name="superadmin",guid="superadminguid", groupBits=128, team=b3.TEAM_RED)
def test_dammage_different_teams(self, timer_patch):
self.joe.warn = Mock()
self.joe.connects(0)
self.mike.connects(1)
self.mike.team = b3.TEAM_BLUE
self.joe.damages(self.mike)
self.assertEqual(0, self.joe.warn.call_count)
def test_kill_different_teams(self, timer_patch):
self.joe.warn = Mock()
self.joe.connects(0)
self.mike.connects(1)
self.mike.team = b3.TEAM_BLUE
self.joe.kills(self.mike)
self.assertEqual(0, self.joe.warn.call_count)
def test_kill_within_10s(self, timer_patch):
self.p._round_grace = 10
self.joe.warn = Mock()
self.joe.connects(0)
self.mike.connects(1)
self.joe.kills(self.mike)
self.assertEqual(1, self.joe.warn.call_count)
def test_dammage(self, timer_patch):
self.p._round_grace = 0
self.joe.warn = Mock()
self.joe.connects(0)
self.mike.connects(1)
self.joe.damages(self.mike)
self.joe.damages(self.mike)
self.joe.damages(self.mike)
self.joe.damages(self.mike)
self.joe.damages(self.mike)
self.assertEqual(0, self.joe.warn.call_count)
def test_kill(self, timer_patch):
self.p._round_grace = 0
self.joe.warn = Mock()
self.joe.connects(0)
self.mike.connects(1)
self.joe.kills(self.mike)
self.assertEqual(1, self.joe.warn.call_count)
self.assertIsNotNone(self.mike.getMessageHistoryLike("^7type ^3!fp ^7 to forgive"))
def test_multikill(self, timer_patch):
self.p._round_grace = 0
with patch.object(self.console, "say") as patched_say:
self.joe.warn = Mock()
self.joe.tempban = Mock()
self.joe.connects(0)
self.mike.connects(1)
self.mike.clearMessageHistory()
self.joe.kills(self.mike)
self.assertEqual(1, self.joe.warn.call_count)
self.assertEquals(1, len(self.mike.getAllMessageHistoryLike("^7type ^3!fp ^7 to forgive")))
self.joe.kills(self.mike)
self.assertEqual(1, len([call_args[0][0] for call_args in patched_say.call_args_list if "auto-kick if not forgiven" in call_args[0][0]]))
self.joe.kills(self.mike)
self.assertEqual(1, self.joe.tempban.call_count)
def test_forgiveinfo(self, timer_patch):
self.superadmin.connects(99)
self.p._round_grace = 0
self.joe.warn = Mock()
self.joe.connects(0)
self.mike.connects(1)
self.bill.connects(2)
self.joe.kills(self.mike)
self.superadmin.clearMessageHistory()
self.superadmin.says("!forgiveinfo joe")
self.assertEqual(['Joe has 200 TK points, Attacked: Mike (200)'], self.superadmin.message_history)
self.joe.damages(self.bill, points=6)
self.superadmin.clearMessageHistory()
self.superadmin.says("!forgiveinfo joe")
self.assertEqual(['Joe has 206 TK points, Attacked: Mike (200), Bill (6)'], self.superadmin.message_history)
self.mike.damages(self.joe, points=27)
self.superadmin.clearMessageHistory()
self.superadmin.says("!forgiveinfo joe")
self.assertEqual(['Joe has 206 TK points, Attacked: Mike (200), Bill (6), Attacked By: Mike [27]'], self.superadmin.message_history)
def test_forgive(self, timer_patch):
self.superadmin.connects(99)
self.p._round_grace = 0
self.joe.warn = Mock()
self.joe.connects(0)
self.mike.connects(1)
self.joe.kills(self.mike)
self.superadmin.clearMessageHistory()
self.superadmin.says("!forgiveinfo joe")
self.assertEqual(['Joe has 200 TK points, Attacked: Mike (200)'], self.superadmin.message_history)
self.mike.says("!forgive")
self.superadmin.clearMessageHistory()
self.superadmin.says("!forgiveinfo joe")
self.assertEqual(["Joe has 0 TK points"], self.superadmin.message_history)
def test_forgiveclear(self, timer_patch):
self.superadmin.connects(99)
self.p._round_grace = 0
self.joe.warn = Mock()
self.joe.connects(0)
self.mike.connects(1)
self.joe.kills(self.mike)
self.superadmin.clearMessageHistory()
self.superadmin.says("!forgiveinfo joe")
self.assertEqual(['Joe has 200 TK points, Attacked: Mike (200)'], self.superadmin.message_history)
self.superadmin.says("!forgiveclear joe")
self.superadmin.clearMessageHistory()
self.superadmin.says("!forgiveinfo joe")
self.assertEqual(["Joe has 0 TK points"], self.superadmin.message_history)
def test_forgivelist(self, timer_patcher):
self.p._round_grace = 0
self.joe.connects(0)
self.mike.connects(1)
self.bill.connects(2)
self.joe.clearMessageHistory()
self.joe.says("!forgivelist")
self.assertEqual(["no one to forgive"], self.joe.message_history)
self.mike.damages(self.joe, points=14)
self.joe.clearMessageHistory()
self.joe.says("!forgivelist")
self.assertEqual(['Forgive who? [1] Mike [14]'], self.joe.message_history)
self.bill.damages(self.joe, points=84)
self.joe.clearMessageHistory()
self.joe.says("!forgivelist")
self.assertEqual(['Forgive who? [1] Mike [14], [2] Bill [84]'], self.joe.message_history)
def test_forgiveall(self, timer_patcher):
self.p._round_grace = 0
self.joe.connects(0)
self.mike.connects(1)
self.bill.connects(2)
self.mike.damages(self.joe, points=14)
self.bill.damages(self.joe, points=84)
self.joe.clearMessageHistory()
self.joe.says("!forgivelist")
self.assertEqual(['Forgive who? [1] Mike [14], [2] Bill [84]'], self.joe.message_history)
self.joe.says("!forgiveall")
self.joe.clearMessageHistory()
self.joe.says("!forgivelist")
self.assertNotIn("Mike", self.joe.message_history[0])
self.assertNotIn("Bill", self.joe.message_history[0])
def test_forgiveprev(self, timer_patcher):
self.p._round_grace = 0
self.joe.connects(0)
self.mike.connects(1)
self.bill.connects(2)
self.mike.damages(self.joe, points=14)
self.bill.damages(self.joe, points=84)
self.joe.clearMessageHistory()
self.joe.says("!forgivelist")
self.assertEqual(['Forgive who? [1] Mike [14], [2] Bill [84]'], self.joe.message_history)
self.joe.says("!forgiveprev")
self.joe.clearMessageHistory()
self.joe.says("!forgivelist")
self.assertEqual(['Forgive who? [1] Mike [14]'], self.joe.message_history)
|
[
"[email protected]"
] | |
200149fc700af681ce4032c94b0096ff55e49246
|
649255f0d9b6d90be3d3f68263680081f893a089
|
/test/test_remediation_resource.py
|
aaed0017e9bcee4530f5e6c0b4a5e24bb3c3475d
|
[] |
no_license
|
khantext/r7ivm3
|
611e1bbc988d9eb8fbb53294d3ed488130e46818
|
bd9b25f511f9e7479ea7069d71929700bed09e87
|
refs/heads/master
| 2023-05-01T10:01:16.336656 | 2021-05-03T18:16:12 | 2021-05-03T18:16:12 | 237,514,737 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 49,252 |
py
|
# coding: utf-8
"""
InsightVM API
# Overview This guide documents the InsightVM Application Programming Interface (API) Version 3. This API supports the Representation State Transfer (REST) design pattern. Unless noted otherwise this API accepts and produces the `application/json` media type. This API uses Hypermedia as the Engine of Application State (HATEOAS) and is hypermedia friendly. All API connections must be made to the security console using HTTPS. ## Versioning Versioning is specified in the URL and the base path of this API is: `https://<host>:<port>/api/3/`. ## Specification An <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md\">OpenAPI v2</a> specification (also known as Swagger 2) of this API is available. Tools such as <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/swagger-api/swagger-codegen\">swagger-codegen</a> can be used to generate an API client in the language of your choosing using this specification document. <p class=\"openapi\">Download the specification: <a class=\"openapi-button\" target=\"_blank\" rel=\"noopener noreferrer\" download=\"\" href=\"/api/3/json\"> Download </a></p> ## Authentication Authorization to the API uses HTTP Basic Authorization (see <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.ietf.org/rfc/rfc2617.txt\">RFC 2617</a> for more information). Requests must supply authorization credentials in the `Authorization` header using a Base64 encoded hash of `\"username:password\"`. <!-- ReDoc-Inject: <security-definitions> --> ### 2FA This API supports two-factor authentication (2FA) by supplying an authentication token in addition to the Basic Authorization. The token is specified using the `Token` request header. To leverage two-factor authentication, this must be enabled on the console and be configured for the account accessing the API. ## Resources ### Naming Resource names represent nouns and identify the entity being manipulated or accessed. All collection resources are pluralized to indicate to the client they are interacting with a collection of multiple resources of the same type. Singular resource names are used when there exists only one resource available to interact with. The following naming conventions are used by this API: | Type | Case | | --------------------------------------------- | ------------------------ | | Resource names | `lower_snake_case` | | Header, body, and query parameters parameters | `camelCase` | | JSON fields and property names | `camelCase` | #### Collections A collection resource is a parent resource for instance resources, but can itself be retrieved and operated on independently. Collection resources use a pluralized resource name. The resource path for collection resources follow the convention: ``` /api/3/{resource_name} ``` #### Instances An instance resource is a \"leaf\" level resource that may be retrieved, optionally nested within a collection resource. Instance resources are usually retrievable with opaque identifiers. The resource path for instance resources follows the convention: ``` /api/3/{resource_name}/{instance_id}... ``` ## Verbs The following HTTP operations are supported throughout this API. The general usage of the operation and both its failure and success status codes are outlined below. | Verb | Usage | Success | Failure | | --------- | ------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------- | | `GET` | Used to retrieve a resource by identifier, or a collection of resources by type. | `200` | `400`, `401`, `402`, `404`, `405`, `408`, `410`, `415`, `500` | | `POST` | Creates a resource with an application-specified identifier. | `201` | `400`, `401`, `404`, `405`, `408`, `413`, `415`, `500` | | `POST` | Performs a request to queue an asynchronous job. | `202` | `400`, `401`, `405`, `408`, `410`, `413`, `415`, `500` | | `PUT` | Creates a resource with a client-specified identifier. | `200` | `400`, `401`, `403`, `405`, `408`, `410`, `413`, `415`, `500` | | `PUT` | Performs a full update of a resource with a specified identifier. | `201` | `400`, `401`, `403`, `405`, `408`, `410`, `413`, `415`, `500` | | `DELETE` | Deletes a resource by identifier or an entire collection of resources. | `204` | `400`, `401`, `405`, `408`, `410`, `413`, `415`, `500` | | `OPTIONS` | Requests what operations are available on a resource. | `200` | `401`, `404`, `405`, `408`, `500` | ### Common Operations #### OPTIONS All resources respond to the `OPTIONS` request, which allows discoverability of available operations that are supported. The `OPTIONS` response returns the acceptable HTTP operations on that resource within the `Allow` header. The response is always a `200 OK` status. ### Collection Resources Collection resources can support the `GET`, `POST`, `PUT`, and `DELETE` operations. #### GET The `GET` operation invoked on a collection resource indicates a request to retrieve all, or some, of the entities contained within the collection. This also includes the optional capability to filter or search resources during the request. The response from a collection listing is a paginated document. See [hypermedia links](#section/Overview/Paging) for more information. #### POST The `POST` is a non-idempotent operation that allows for the creation of a new resource when the resource identifier is not provided by the system during the creation operation (i.e. the Security Console generates the identifier). The content of the `POST` request is sent in the request body. The response to a successful `POST` request should be a `201 CREATED` with a valid `Location` header field set to the URI that can be used to access to the newly created resource. The `POST` to a collection resource can also be used to interact with asynchronous resources. In this situation, instead of a `201 CREATED` response, the `202 ACCEPTED` response indicates that processing of the request is not fully complete but has been accepted for future processing. This request will respond similarly with a `Location` header with link to the job-oriented asynchronous resource that was created and/or queued. #### PUT The `PUT` is an idempotent operation that either performs a create with user-supplied identity, or a full replace or update of a resource by a known identifier. The response to a `PUT` operation to create an entity is a `201 Created` with a valid `Location` header field set to the URI that can be used to access to the newly created resource. `PUT` on a collection resource replaces all values in the collection. The typical response to a `PUT` operation that updates an entity is hypermedia links, which may link to related resources caused by the side-effects of the changes performed. #### DELETE The `DELETE` is an idempotent operation that physically deletes a resource, or removes an association between resources. The typical response to a `DELETE` operation is hypermedia links, which may link to related resources caused by the side-effects of the changes performed. ### Instance Resources Instance resources can support the `GET`, `PUT`, `POST`, `PATCH` and `DELETE` operations. #### GET Retrieves the details of a specific resource by its identifier. The details retrieved can be controlled through property selection and property views. The content of the resource is returned within the body of the response in the acceptable media type. #### PUT Allows for and idempotent \"full update\" (complete replacement) on a specific resource. If the resource does not exist, it will be created; if it does exist, it is completely overwritten. Any omitted properties in the request are assumed to be undefined/null. For \"partial updates\" use `POST` or `PATCH` instead. The content of the `PUT` request is sent in the request body. The identifier of the resource is specified within the URL (not the request body). The response to a successful `PUT` request is a `201 CREATED` to represent the created status, with a valid `Location` header field set to the URI that can be used to access to the newly created (or fully replaced) resource. #### POST Performs a non-idempotent creation of a new resource. The `POST` of an instance resource most commonly occurs with the use of nested resources (e.g. searching on a parent collection resource). The response to a `POST` of an instance resource is typically a `200 OK` if the resource is non-persistent, and a `201 CREATED` if there is a resource created/persisted as a result of the operation. This varies by endpoint. #### PATCH The `PATCH` operation is used to perform a partial update of a resource. `PATCH` is a non-idempotent operation that enforces an atomic mutation of a resource. Only the properties specified in the request are to be overwritten on the resource it is applied to. If a property is missing, it is assumed to not have changed. #### DELETE Permanently removes the individual resource from the system. If the resource is an association between resources, only the association is removed, not the resources themselves. A successful deletion of the resource should return `204 NO CONTENT` with no response body. This operation is not fully idempotent, as follow-up requests to delete a non-existent resource should return a `404 NOT FOUND`. ## Requests Unless otherwise indicated, the default request body media type is `application/json`. ### Headers Commonly used request headers include: | Header | Example | Purpose | | ------------------ | --------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `Accept` | `application/json` | Defines what acceptable content types are allowed by the client. For all types, use `*/*`. | | `Accept-Encoding` | `deflate, gzip` | Allows for the encoding to be specified (such as gzip). | | `Accept-Language` | `en-US` | Indicates to the server the client's locale (defaults `en-US`). | | `Authorization ` | `Basic Base64(\"username:password\")` | Basic authentication | | `Token ` | `123456` | Two-factor authentication token (if enabled) | ### Dates & Times Dates and/or times are specified as strings in the ISO 8601 format(s). The following formats are supported as input: | Value | Format | Notes | | --------------------------- | ------------------------------------------------------ | ----------------------------------------------------- | | Date | YYYY-MM-DD | Defaults to 12 am UTC (if used for a date & time | | Date & time only | YYYY-MM-DD'T'hh:mm:ss[.nnn] | Defaults to UTC | | Date & time in UTC | YYYY-MM-DD'T'hh:mm:ss[.nnn]Z | | | Date & time w/ offset | YYYY-MM-DD'T'hh:mm:ss[.nnn][+|-]hh:mm | | | Date & time w/ zone-offset | YYYY-MM-DD'T'hh:mm:ss[.nnn][+|-]hh:mm[<zone-id>] | | ### Timezones Timezones are specified in the regional zone format, such as `\"America/Los_Angeles\"`, `\"Asia/Tokyo\"`, or `\"GMT\"`. ### Paging Pagination is supported on certain collection resources using a combination of two query parameters, `page` and `size`. As these are control parameters, they are prefixed with the underscore character. The page parameter dictates the zero-based index of the page to retrieve, and the `size` indicates the size of the page. For example, `/resources?page=2&size=10` will return page 3, with 10 records per page, giving results 21-30. The maximum page size for a request is 500. ### Sorting Sorting is supported on paginated resources with the `sort` query parameter(s). The sort query parameter(s) supports identifying a single or multi-property sort with a single or multi-direction output. The format of the parameter is: ``` sort=property[,ASC|DESC]... ``` Therefore, the request `/resources?sort=name,title,DESC` would return the results sorted by the name and title descending, in that order. The sort directions are either ascending `ASC` or descending `DESC`. With single-order sorting, all properties are sorted in the same direction. To sort the results with varying orders by property, multiple sort parameters are passed. For example, the request `/resources?sort=name,ASC&sort=title,DESC` would sort by name ascending and title descending, in that order. ## Responses The following response statuses may be returned by this API. | Status | Meaning | Usage | | ------ | ------------------------ |------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `200` | OK | The operation performed without error according to the specification of the request, and no more specific 2xx code is suitable. | | `201` | Created | A create request has been fulfilled and a resource has been created. The resource is available as the URI specified in the response, including the `Location` header. | | `202` | Accepted | An asynchronous task has been accepted, but not guaranteed, to be processed in the future. | | `400` | Bad Request | The request was invalid or cannot be otherwise served. The request is not likely to succeed in the future without modifications. | | `401` | Unauthorized | The user is unauthorized to perform the operation requested, or does not maintain permissions to perform the operation on the resource specified. | | `403` | Forbidden | The resource exists to which the user has access, but the operating requested is not permitted. | | `404` | Not Found | The resource specified could not be located, does not exist, or an unauthenticated client does not have permissions to a resource. | | `405` | Method Not Allowed | The operations may not be performed on the specific resource. Allowed operations are returned and may be performed on the resource. | | `408` | Request Timeout | The client has failed to complete a request in a timely manner and the request has been discarded. | | `413` | Request Entity Too Large | The request being provided is too large for the server to accept processing. | | `415` | Unsupported Media Type | The media type is not supported for the requested resource. | | `500` | Internal Server Error | An internal and unexpected error has occurred on the server at no fault of the client. | ### Security The response statuses 401, 403 and 404 need special consideration for security purposes. As necessary, error statuses and messages may be obscured to strengthen security and prevent information exposure. The following is a guideline for privileged resource response statuses: | Use Case | Access | Resource | Permission | Status | | ------------------------------------------------------------------ | ------------------ |------------------- | ------------ | ------------ | | Unauthenticated access to an unauthenticated resource. | Unauthenticated | Unauthenticated | Yes | `20x` | | Unauthenticated access to an authenticated resource. | Unauthenticated | Authenticated | No | `401` | | Unauthenticated access to an authenticated resource. | Unauthenticated | Non-existent | No | `401` | | Authenticated access to a unauthenticated resource. | Authenticated | Unauthenticated | Yes | `20x` | | Authenticated access to an authenticated, unprivileged resource. | Authenticated | Authenticated | No | `404` | | Authenticated access to an authenticated, privileged resource. | Authenticated | Authenticated | Yes | `20x` | | Authenticated access to an authenticated, non-existent resource | Authenticated | Non-existent | Yes | `404` | ### Headers Commonly used response headers include: | Header | Example | Purpose | | -------------------------- | --------------------------------- | --------------------------------------------------------------- | | `Allow` | `OPTIONS, GET` | Defines the allowable HTTP operations on a resource. | | `Cache-Control` | `no-store, must-revalidate` | Disables caching of resources (as they are all dynamic). | | `Content-Encoding` | `gzip` | The encoding of the response body (if any). | | `Location` | | Refers to the URI of the resource created by a request. | | `Transfer-Encoding` | `chunked` | Specified the encoding used to transform response. | | `Retry-After` | 5000 | Indicates the time to wait before retrying a request. | | `X-Content-Type-Options` | `nosniff` | Disables MIME type sniffing. | | `X-XSS-Protection` | `1; mode=block` | Enables XSS filter protection. | | `X-Frame-Options` | `SAMEORIGIN` | Prevents rendering in a frame from a different origin. | | `X-UA-Compatible` | `IE=edge,chrome=1` | Specifies the browser mode to render in. | ### Format When `application/json` is returned in the response body it is always pretty-printed (indented, human readable output). Additionally, gzip compression/encoding is supported on all responses. #### Dates & Times Dates or times are returned as strings in the ISO 8601 'extended' format. When a date and time is returned (instant) the value is converted to UTC. For example: | Value | Format | Example | | --------------- | ------------------------------ | --------------------- | | Date | `YYYY-MM-DD` | 2017-12-03 | | Date & Time | `YYYY-MM-DD'T'hh:mm:ss[.nnn]Z` | 2017-12-03T10:15:30Z | #### Content In some resources a Content data type is used. This allows for multiple formats of representation to be returned within resource, specifically `\"html\"` and `\"text\"`. The `\"text\"` property returns a flattened representation suitable for output in textual displays. The `\"html\"` property returns an HTML fragment suitable for display within an HTML element. Note, the HTML returned is not a valid stand-alone HTML document. #### Paging The response to a paginated request follows the format: ```json { resources\": [ ... ], \"page\": { \"number\" : ..., \"size\" : ..., \"totalResources\" : ..., \"totalPages\" : ... }, \"links\": [ \"first\" : { \"href\" : \"...\" }, \"prev\" : { \"href\" : \"...\" }, \"self\" : { \"href\" : \"...\" }, \"next\" : { \"href\" : \"...\" }, \"last\" : { \"href\" : \"...\" } ] } ``` The `resources` property is an array of the resources being retrieved from the endpoint, each which should contain at minimum a \"self\" relation hypermedia link. The `page` property outlines the details of the current page and total possible pages. The object for the page includes the following properties: - number - The page number (zero-based) of the page returned. - size - The size of the pages, which is less than or equal to the maximum page size. - totalResources - The total amount of resources available across all pages. - totalPages - The total amount of pages. The last property of the paged response is the `links` array, which contains all available hypermedia links. For paginated responses, the \"self\", \"next\", \"previous\", \"first\", and \"last\" links are returned. The \"self\" link must always be returned and should contain a link to allow the client to replicate the original request against the collection resource in an identical manner to that in which it was invoked. The \"next\" and \"previous\" links are present if either or both there exists a previous or next page, respectively. The \"next\" and \"previous\" links have hrefs that allow \"natural movement\" to the next page, that is all parameters required to move the next page are provided in the link. The \"first\" and \"last\" links provide references to the first and last pages respectively. Requests outside the boundaries of the pageable will result in a `404 NOT FOUND`. Paginated requests do not provide a \"stateful cursor\" to the client, nor does it need to provide a read consistent view. Records in adjacent pages may change while pagination is being traversed, and the total number of pages and resources may change between requests within the same filtered/queries resource collection. #### Property Views The \"depth\" of the response of a resource can be configured using a \"view\". All endpoints supports two views that can tune the extent of the information returned in the resource. The supported views are `summary` and `details` (the default). View are specified using a query parameter, in this format: ```bash /<resource>?view={viewName} ``` #### Error Any error responses can provide a response body with a message to the client indicating more information (if applicable) to aid debugging of the error. All 40x and 50x responses will return an error response in the body. The format of the response is as follows: ```json { \"status\": <statusCode>, \"message\": <message>, \"links\" : [ { \"rel\" : \"...\", \"href\" : \"...\" } ] } ``` The `status` property is the same as the HTTP status returned in the response, to ease client parsing. The message property is a localized message in the request client's locale (if applicable) that articulates the nature of the error. The last property is the `links` property. This may contain additional [hypermedia links](#section/Overview/Authentication) to troubleshoot. #### Search Criteria <a section=\"section/Responses/SearchCriteria\"></a> Multiple resources make use of search criteria to match assets. Search criteria is an array of search filters. Each search filter has a generic format of: ```json { \"field\": \"<field-name>\", \"operator\": \"<operator>\", [\"value\": <value>,] [\"lower\": <value>,] [\"upper\": <value>] } ``` Every filter defines two required properties `field` and `operator`. The field is the name of an asset property that is being filtered on. The operator is a type and property-specific operating performed on the filtered property. The valid values for fields and operators are outlined in the table below. Depending on the data type of the operator the value may be a numeric or string format. Every filter also defines one or more values that are supplied to the operator. The valid values vary by operator and are outlined below. ##### Fields The following table outlines the search criteria fields and the available operators: | Field | Operators | | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | `alternate-address-type` | `in` | | `container-image` | `is` `is-not` `starts-with` `ends-with` `contains` `does-not-contain` `is-like` `not-like` | | `container-status` | `is` `is-not` | | `containers` | `are` | | `criticality-tag` | `is` `is-not` `is-greater-than` `is-less-than` `is-applied` ` is-not-applied` | | `custom-tag` | `is` `is-not` `starts-with` `ends-with` `contains` `does-not-contain` `is-applied` `is-not-applied` | | `cve` | `is` `is-not` `contains` `does-not-contain` | | `cvss-access-complexity` | `is` `is-not` | | `cvss-authentication-required` | `is` `is-not` | | `cvss-access-vector` | `is` `is-not` | | `cvss-availability-impact` | `is` `is-not` | | `cvss-confidentiality-impact` | `is` `is-not` | | `cvss-integrity-impact` | `is` `is-not` | | `cvss-v3-confidentiality-impact` | `is` `is-not` | | `cvss-v3-integrity-impact` | `is` `is-not` | | `cvss-v3-availability-impact` | `is` `is-not` | | `cvss-v3-attack-vector` | `is` `is-not` | | `cvss-v3-attack-complexity` | `is` `is-not` | | `cvss-v3-user-interaction` | `is` `is-not` | | `cvss-v3-privileges-required` | `is` `is-not` | | `host-name` | `is` `is-not` `starts-with` `ends-with` `contains` `does-not-contain` `is-empty` `is-not-empty` `is-like` `not-like` | | `host-type` | `in` `not-in` | | `ip-address` | `is` `is-not` `in-range` `not-in-range` `is-like` `not-like` | | `ip-address-type` | `in` `not-in` | | `last-scan-date` | `is-on-or-before` `is-on-or-after` `is-between` `is-earlier-than` `is-within-the-last` | | `location-tag` | `is` `is-not` `starts-with` `ends-with` `contains` `does-not-contain` `is-applied` `is-not-applied` | | `mobile-device-last-sync-time` | `is-within-the-last` `is-earlier-than` | | `open-ports` | `is` `is-not` ` in-range` | | `operating-system` | `contains` ` does-not-contain` ` is-empty` ` is-not-empty` | | `owner-tag` | `is` `is-not` `starts-with` `ends-with` `contains` `does-not-contain` `is-applied` `is-not-applied` | | `pci-compliance` | `is` | | `risk-score` | `is` `is-not` `is-greater-than` `is-less-than` `in-range` | | `service-name` | `contains` `does-not-contain` | | `site-id` | `in` `not-in` | | `software` | `contains` `does-not-contain` | | `vAsset-cluster` | `is` `is-not` `contains` `does-not-contain` `starts-with` | | `vAsset-datacenter` | `is` `is-not` | | `vAsset-host-name` | `is` `is-not` `contains` `does-not-contain` `starts-with` | | `vAsset-power-state` | `in` `not-in` | | `vAsset-resource-pool-path` | `contains` `does-not-contain` | | `vulnerability-assessed` | `is-on-or-before` `is-on-or-after` `is-between` `is-earlier-than` `is-within-the-last` | | `vulnerability-category` | `is` `is-not` `starts-with` `ends-with` `contains` `does-not-contain` | | `vulnerability-cvss-v3-score` | `is` `is-not` | | `vulnerability-cvss-score` | `is` `is-not` `in-range` `is-greater-than` `is-less-than` | | `vulnerability-exposures` | `includes` `does-not-include` | | `vulnerability-title` | `contains` `does-not-contain` `is` `is-not` `starts-with` `ends-with` | | `vulnerability-validated-status` | `are` | ##### Enumerated Properties The following fields have enumerated values: | Field | Acceptable Values | | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------- | | `alternate-address-type` | 0=IPv4, 1=IPv6 | | `containers` | 0=present, 1=not present | | `container-status` | `created` `running` `paused` `restarting` `exited` `dead` `unknown` | | `cvss-access-complexity` | <ul><li><code>L</code> = Low</li><li><code>M</code> = Medium</li><li><code>H</code> = High</li></ul> | | `cvss-integrity-impact` | <ul><li><code>N</code> = None</li><li><code>P</code> = Partial</li><li><code>C</code> = Complete</li></ul> | | `cvss-confidentiality-impact` | <ul><li><code>N</code> = None</li><li><code>P</code> = Partial</li><li><code>C</code> = Complete</li></ul> | | `cvss-availability-impact` | <ul><li><code>N</code> = None</li><li><code>P</code> = Partial</li><li><code>C</code> = Complete</li></ul> | | `cvss-access-vector` | <ul><li><code>L</code> = Local</li><li><code>A</code> = Adjacent</li><li><code>N</code> = Network</li></ul> | | `cvss-authentication-required` | <ul><li><code>N</code> = None</li><li><code>S</code> = Single</li><li><code>M</code> = Multiple</li></ul> | | `cvss-v3-confidentiality-impact` | <ul><li><code>L</code> = Local</li><li><code>L</code> = Low</li><li><code>N</code> = None</li><li><code>H</code> = High</li></ul> | | `cvss-v3-integrity-impact` | <ul><li><code>L</code> = Local</li><li><code>L</code> = Low</li><li><code>N</code> = None</li><li><code>H</code> = High</li></ul> | | `cvss-v3-availability-impact` | <ul><li><code>N</code> = None</li><li><code>L</code> = Low</li><li><code>H</code> = High</li></ul> | | `cvss-v3-attack-vector` | <ul><li><code>N</code> = Network</li><li><code>A</code> = Adjacent</li><li><code>L</code> = Local</li><li><code>P</code> = Physical</li></ul> | | `cvss-v3-attack-complexity` | <ul><li><code>L</code> = Low</li><li><code>H</code> = High</li></ul> | | `cvss-v3-user-interaction` | <ul><li><code>N</code> = None</li><li><code>R</code> = Required</li></ul> | | `cvss-v3-privileges-required` | <ul><li><code>N</code> = None</li><li><code>L</code> = Low</li><li><code>H</code> = High</li></ul> | | `host-type` | 0=Unknown, 1=Guest, 2=Hypervisor, 3=Physical, 4=Mobile | | `ip-address-type` | 0=IPv4, 1=IPv6 | | `pci-compliance` | 0=fail, 1=pass | | `vulnerability-validated-status` | 0=present, 1=not present | ##### Operator Properties <a section=\"section/Responses/SearchCriteria/OperatorProperties\"></a> The following table outlines which properties are required for each operator and the appropriate data type(s): | Operator | `value` | `lower` | `upper` | | ----------------------|-----------------------|-----------------------|------------------------| | `are` | `string` | | | | `contains` | `string` | | | | `does-not-contain` | `string` | | | | `ends with` | `string` | | | | `in` | `Array[ string ]` | | | | `in-range` | | `numeric` | `numeric` | | `includes` | `Array[ string ]` | | | | `is` | `string` | | | | `is-applied` | | | | | `is-between` | | `string` (yyyy-MM-dd) | `numeric` (yyyy-MM-dd) | | `is-earlier-than` | `numeric` (days) | | | | `is-empty` | | | | | `is-greater-than` | `numeric` | | | | `is-on-or-after` | `string` (yyyy-MM-dd) | | | | `is-on-or-before` | `string` (yyyy-MM-dd) | | | | `is-not` | `string` | | | | `is-not-applied` | | | | | `is-not-empty` | | | | | `is-within-the-last` | `numeric` (days) | | | | `less-than` | `string` | | | | `like` | `string` | | | | `not-contains` | `string` | | | | `not-in` | `Array[ string ]` | | | | `not-in-range` | | `numeric` | `numeric` | | `not-like` | `string` | | | | `starts-with` | `string` | | | #### Discovery Connection Search Criteria <a section=\"section/Responses/DiscoverySearchCriteria\"></a> Dynamic sites make use of search criteria to match assets from a discovery connection. Search criteria is an array of search filters. Each search filter has a generic format of: ```json { \"field\": \"<field-name>\", \"operator\": \"<operator>\", [\"value\": \"<value>\",] [\"lower\": \"<value>\",] [\"upper\": \"<value>\"] } ``` Every filter defines two required properties `field` and `operator`. The field is the name of an asset property that is being filtered on. The list of supported fields vary depending on the type of discovery connection configured for the dynamic site (e.g vSphere, ActiveSync, etc.). The operator is a type and property-specific operating performed on the filtered property. The valid values for fields outlined in the tables below and are grouped by the type of connection. Every filter also defines one or more values that are supplied to the operator. See <a href=\"#section/Responses/SearchCriteria/OperatorProperties\">Search Criteria Operator Properties</a> for more information on the valid values for each operator. ##### Fields (ActiveSync) This section documents search criteria information for ActiveSync discovery connections. The discovery connections must be one of the following types: `\"activesync-ldap\"`, `\"activesync-office365\"`, or `\"activesync-powershell\"`. The following table outlines the search criteria fields and the available operators for ActiveSync connections: | Field | Operators | | --------------------------------- | ------------------------------------------------------------- | | `last-sync-time` | `is-within-the-last` ` is-earlier-than` | | `operating-system` | `contains` ` does-not-contain` | | `user` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | ##### Fields (AWS) This section documents search criteria information for AWS discovery connections. The discovery connections must be the type `\"aws\"`. The following table outlines the search criteria fields and the available operators for AWS connections: | Field | Operators | | ----------------------- | ------------------------------------------------------------- | | `availability-zone` | `contains` ` does-not-contain` | | `guest-os-family` | `contains` ` does-not-contain` | | `instance-id` | `contains` ` does-not-contain` | | `instance-name` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | | `instance-state` | `in` ` not-in` | | `instance-type` | `in` ` not-in` | | `ip-address` | `in-range` ` not-in-range` ` is` ` is-not` | | `region` | `in` ` not-in` | | `vpc-id` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | ##### Fields (DHCP) This section documents search criteria information for DHCP discovery connections. The discovery connections must be the type `\"dhcp\"`. The following table outlines the search criteria fields and the available operators for DHCP connections: | Field | Operators | | --------------- | ------------------------------------------------------------- | | `host-name` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | | `ip-address` | `in-range` ` not-in-range` ` is` ` is-not` | | `mac-address` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | ##### Fields (Sonar) This section documents search criteria information for Sonar discovery connections. The discovery connections must be the type `\"sonar\"`. The following table outlines the search criteria fields and the available operators for Sonar connections: | Field | Operators | | ------------------- | -------------------- | | `search-domain` | `contains` ` is` | | `ip-address` | `in-range` ` is` | | `sonar-scan-date` | `is-within-the-last` | ##### Fields (vSphere) This section documents search criteria information for vSphere discovery connections. The discovery connections must be the type `\"vsphere\"`. The following table outlines the search criteria fields and the available operators for vSphere connections: | Field | Operators | | -------------------- | ------------------------------------------------------------------------------------------ | | `cluster` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | | `data-center` | `is` ` is-not` | | `discovered-time` | `is-on-or-before` ` is-on-or-after` ` is-between` ` is-earlier-than` ` is-within-the-last` | | `guest-os-family` | `contains` ` does-not-contain` | | `host-name` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | | `ip-address` | `in-range` ` not-in-range` ` is` ` is-not` | | `power-state` | `in` ` not-in` | | `resource-pool-path` | `contains` ` does-not-contain` | | `last-time-seen` | `is-on-or-before` ` is-on-or-after` ` is-between` ` is-earlier-than` ` is-within-the-last` | | `vm` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | ##### Enumerated Properties (vSphere) The following fields have enumerated values: | Field | Acceptable Values | | ------------- | ------------------------------------ | | `power-state` | `poweredOn` `poweredOff` `suspended` | ## HATEOAS This API follows Hypermedia as the Engine of Application State (HATEOAS) principals and is therefore hypermedia friendly. Hyperlinks are returned in the `links` property of any given resource and contain a fully-qualified hyperlink to the corresponding resource. The format of the hypermedia link adheres to both the <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"http://jsonapi.org\">{json:api} v1</a> <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"http://jsonapi.org/format/#document-links\">\"Link Object\"</a> and <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"http://json-schema.org/latest/json-schema-hypermedia.html\">JSON Hyper-Schema</a> <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"http://json-schema.org/latest/json-schema-hypermedia.html#rfc.section.5.2\">\"Link Description Object\"</a> formats. For example: ```json \"links\": [{ \"rel\": \"<relation>\", \"href\": \"<href>\" ... }] ``` Where appropriate link objects may also contain additional properties than the `rel` and `href` properties, such as `id`, `type`, etc. See the [Root](#tag/Root) resources for the entry points into API discovery. # noqa: E501
OpenAPI spec version: 3
Contact: [email protected]
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from swagger_client.models.remediation_resource import RemediationResource # noqa: E501
from swagger_client.rest import ApiException
class TestRemediationResource(unittest.TestCase):
"""RemediationResource unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testRemediationResource(self):
"""Test RemediationResource"""
# FIXME: construct object with mandatory attributes with example values
# model = swagger_client.models.remediation_resource.RemediationResource() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()
|
[
"[email protected]"
] | |
d6f91349bb015a11529371ae324702cfc09d2b32
|
9cd180fc7594eb018c41f0bf0b54548741fd33ba
|
/sdk/python/pulumi_azure_nextgen/network/v20180201/subnet.py
|
cf253b4aaead64c95d263d56a3af56d3665154a2
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
MisinformedDNA/pulumi-azure-nextgen
|
c71971359450d03f13a53645171f621e200fe82d
|
f0022686b655c2b0744a9f47915aadaa183eed3b
|
refs/heads/master
| 2022-12-17T22:27:37.916546 | 2020-09-28T16:03:59 | 2020-09-28T16:03:59 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 11,024 |
py
|
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from . import outputs
from ._inputs import *
__all__ = ['Subnet']
class Subnet(pulumi.CustomResource):
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
address_prefix: Optional[pulumi.Input[str]] = None,
etag: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
network_security_group: Optional[pulumi.Input[pulumi.InputType['NetworkSecurityGroupArgs']]] = None,
provisioning_state: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
resource_navigation_links: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ResourceNavigationLinkArgs']]]]] = None,
route_table: Optional[pulumi.Input[pulumi.InputType['RouteTableArgs']]] = None,
service_endpoints: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServiceEndpointPropertiesFormatArgs']]]]] = None,
subnet_name: Optional[pulumi.Input[str]] = None,
virtual_network_name: Optional[pulumi.Input[str]] = None,
__props__=None,
__name__=None,
__opts__=None):
"""
Subnet in a virtual network resource.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] address_prefix: The address prefix for the subnet.
:param pulumi.Input[str] etag: A unique read-only string that changes whenever the resource is updated.
:param pulumi.Input[str] id: Resource ID.
:param pulumi.Input[str] name: The name of the resource that is unique within a resource group. This name can be used to access the resource.
:param pulumi.Input[pulumi.InputType['NetworkSecurityGroupArgs']] network_security_group: The reference of the NetworkSecurityGroup resource.
:param pulumi.Input[str] provisioning_state: The provisioning state of the resource.
:param pulumi.Input[str] resource_group_name: The name of the resource group.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ResourceNavigationLinkArgs']]]] resource_navigation_links: Gets an array of references to the external resources using subnet.
:param pulumi.Input[pulumi.InputType['RouteTableArgs']] route_table: The reference of the RouteTable resource.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ServiceEndpointPropertiesFormatArgs']]]] service_endpoints: An array of service endpoints.
:param pulumi.Input[str] subnet_name: The name of the subnet.
:param pulumi.Input[str] virtual_network_name: The name of the virtual network.
"""
if __name__ is not None:
warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
resource_name = __name__
if __opts__ is not None:
warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
opts = __opts__
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = dict()
__props__['address_prefix'] = address_prefix
__props__['etag'] = etag
__props__['id'] = id
__props__['name'] = name
__props__['network_security_group'] = network_security_group
__props__['provisioning_state'] = provisioning_state
if resource_group_name is None:
raise TypeError("Missing required property 'resource_group_name'")
__props__['resource_group_name'] = resource_group_name
__props__['resource_navigation_links'] = resource_navigation_links
__props__['route_table'] = route_table
__props__['service_endpoints'] = service_endpoints
if subnet_name is None:
raise TypeError("Missing required property 'subnet_name'")
__props__['subnet_name'] = subnet_name
if virtual_network_name is None:
raise TypeError("Missing required property 'virtual_network_name'")
__props__['virtual_network_name'] = virtual_network_name
__props__['ip_configurations'] = None
alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azure-nextgen:network/latest:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20150501preview:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20150615:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20160330:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20160601:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20160901:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20161201:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20170301:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20170601:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20170801:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20170901:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20171001:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20171101:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20180101:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20180401:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20180601:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20180701:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20180801:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20181001:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20181101:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20181201:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20190201:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20190401:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20190601:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20190701:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20190801:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20190901:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20191101:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20191201:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20200301:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20200401:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20200501:Subnet"), pulumi.Alias(type_="azure-nextgen:network/v20200601:Subnet")])
opts = pulumi.ResourceOptions.merge(opts, alias_opts)
super(Subnet, __self__).__init__(
'azure-nextgen:network/v20180201:Subnet',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None) -> 'Subnet':
"""
Get an existing Subnet resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = dict()
return Subnet(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="addressPrefix")
def address_prefix(self) -> pulumi.Output[Optional[str]]:
"""
The address prefix for the subnet.
"""
return pulumi.get(self, "address_prefix")
@property
@pulumi.getter
def etag(self) -> pulumi.Output[Optional[str]]:
"""
A unique read-only string that changes whenever the resource is updated.
"""
return pulumi.get(self, "etag")
@property
@pulumi.getter(name="ipConfigurations")
def ip_configurations(self) -> pulumi.Output[Sequence['outputs.IPConfigurationResponse']]:
"""
Gets an array of references to the network interface IP configurations using subnet.
"""
return pulumi.get(self, "ip_configurations")
@property
@pulumi.getter
def name(self) -> pulumi.Output[Optional[str]]:
"""
The name of the resource that is unique within a resource group. This name can be used to access the resource.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="networkSecurityGroup")
def network_security_group(self) -> pulumi.Output[Optional['outputs.NetworkSecurityGroupResponse']]:
"""
The reference of the NetworkSecurityGroup resource.
"""
return pulumi.get(self, "network_security_group")
@property
@pulumi.getter(name="provisioningState")
def provisioning_state(self) -> pulumi.Output[Optional[str]]:
"""
The provisioning state of the resource.
"""
return pulumi.get(self, "provisioning_state")
@property
@pulumi.getter(name="resourceNavigationLinks")
def resource_navigation_links(self) -> pulumi.Output[Optional[Sequence['outputs.ResourceNavigationLinkResponse']]]:
"""
Gets an array of references to the external resources using subnet.
"""
return pulumi.get(self, "resource_navigation_links")
@property
@pulumi.getter(name="routeTable")
def route_table(self) -> pulumi.Output[Optional['outputs.RouteTableResponse']]:
"""
The reference of the RouteTable resource.
"""
return pulumi.get(self, "route_table")
@property
@pulumi.getter(name="serviceEndpoints")
def service_endpoints(self) -> pulumi.Output[Optional[Sequence['outputs.ServiceEndpointPropertiesFormatResponse']]]:
"""
An array of service endpoints.
"""
return pulumi.get(self, "service_endpoints")
def translate_output_property(self, prop):
return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop
def translate_input_property(self, prop):
return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop
|
[
"[email protected]"
] | |
a6f2869dde01b317767cd8871554c14f5a4bf8a1
|
e0045eec29aab56212c00f9293a21eb3b4b9fe53
|
/web/controllers/pivot.py
|
5ad07b67ca58fc54e4afa78116fb11a33198b10d
|
[] |
no_license
|
tamam001/ALWAFI_P1
|
a3a9268081b9befc668a5f51c29ce5119434cc21
|
402ea8687c607fbcb5ba762c2020ebc4ee98e705
|
refs/heads/master
| 2020-05-18T08:16:50.583264 | 2019-04-30T14:43:46 | 2019-04-30T14:43:46 | 184,268,686 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 3,577 |
py
|
# -*- coding: utf-8 -*-
# Part of ALWAFI. See LICENSE file for full copyright and licensing details.
from collections import deque
import json
from odoo import http
from odoo.http import request
from odoo.tools import ustr
from odoo.tools.misc import xlwt
class TableExporter(http.Controller):
@http.route('/web/pivot/check_xlwt', type='json', auth='none')
def check_xlwt(self):
return xlwt is not None
@http.route('/web/pivot/export_xls', type='http', auth="user")
def export_xls(self, data, token):
jdata = json.loads(data)
nbr_measures = jdata['nbr_measures']
workbook = xlwt.Workbook()
worksheet = workbook.add_sheet(jdata['title'])
header_bold = xlwt.easyxf("font: bold on; pattern: pattern solid, fore_colour gray25;")
header_plain = xlwt.easyxf("pattern: pattern solid, fore_colour gray25;")
bold = xlwt.easyxf("font: bold on;")
# Step 1: writing headers
headers = jdata['headers']
# x,y: current coordinates
# carry: queue containing cell information when a cell has a >= 2 height
# and the drawing code needs to add empty cells below
x, y, carry = 1, 0, deque()
for i, header_row in enumerate(headers):
worksheet.write(i, 0, '', header_plain)
for header in header_row:
while (carry and carry[0]['x'] == x):
cell = carry.popleft()
for i in range(nbr_measures):
worksheet.write(y, x+i, '', header_plain)
if cell['height'] > 1:
carry.append({'x': x, 'height': cell['height'] - 1})
x = x + nbr_measures
style = header_plain if 'expanded' in header else header_bold
for i in range(header['width']):
worksheet.write(y, x + i, header['title'] if i == 0 else '', style)
if header['height'] > 1:
carry.append({'x': x, 'height': header['height'] - 1})
x = x + header['width']
while (carry and carry[0]['x'] == x):
cell = carry.popleft()
for i in range(nbr_measures):
worksheet.write(y, x+i, '', header_plain)
if cell['height'] > 1:
carry.append({'x': x, 'height': cell['height'] - 1})
x = x + nbr_measures
x, y = 1, y + 1
# Step 2: measure row
if nbr_measures > 1:
worksheet.write(y, 0, '', header_plain)
for measure in jdata['measure_row']:
style = header_bold if measure['is_bold'] else header_plain
worksheet.write(y, x, measure['measure'], style)
x = x + 1
y = y + 1
# Step 3: writing data
x = 0
for row in jdata['rows']:
worksheet.write(y, x, row['indent'] * ' ' + ustr(row['title']), header_plain)
for cell in row['values']:
x = x + 1
if cell.get('is_bold', False):
worksheet.write(y, x, cell['value'], bold)
else:
worksheet.write(y, x, cell['value'])
x, y = 0, y + 1
response = request.make_response(None,
headers=[('Content-Type', 'application/vnd.ms-excel'),
('Content-Disposition', 'attachment; filename=table.xls')],
cookies={'fileToken': token})
workbook.save(response.stream)
return response
|
[
"[email protected]"
] | |
9a2c8288066e8396de41672a53e666d43d65a8bf
|
791da33d91836572ab0ffb9042468586d28527ef
|
/initiatives/migrations/0017_auto_20200308_1231.py
|
f32b1c902cb93516f84d32db058c20f3c1fee847
|
[] |
no_license
|
Akash12740/nirmaan_bits
|
1de8a9b478e99c09c74f5f0b54d6b3b143a79800
|
95054e03e56a3a8a60fa3178c8cf4383df4611a2
|
refs/heads/master
| 2023-06-15T21:13:51.874238 | 2021-07-06T13:48:32 | 2021-07-06T13:48:32 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 952 |
py
|
# Generated by Django 2.2 on 2020-03-08 07:01
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('initiatives', '0016_auto_20200308_1157'),
]
operations = [
migrations.AlterField(
model_name='initiative',
name='date_started',
field=models.DateField(default=datetime.datetime(2020, 3, 8, 7, 1, 16, 289299, tzinfo=utc), verbose_name='Start Date'),
),
migrations.AlterField(
model_name='initiativecomment',
name='message',
field=models.CharField(default='', max_length=255, verbose_name=''),
),
migrations.AlterField(
model_name='initiativecomment',
name='published_on',
field=models.DateField(default=datetime.datetime(2020, 3, 8, 7, 1, 16, 320315, tzinfo=utc)),
),
]
|
[
"[email protected]"
] | |
b300aeadf3c9fa85e1db1e5b8c130ba3ae345d0d
|
974c5a4f101d0e6f4dfa5fc2f7c641c9d2bd8184
|
/sdk/cosmos/azure-cosmos/samples/access_cosmos_with_aad_async.py
|
a24498996df52805eec1b9b4ef8693957c9656bb
|
[
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] |
permissive
|
gaoyp830/azure-sdk-for-python
|
4816f04c554dcffb7510a6b7044b0c86a2dd32e1
|
1c66defa502b754abcc9e5afa444ca03c609342f
|
refs/heads/master
| 2022-10-20T21:33:44.281041 | 2022-09-29T17:03:13 | 2022-09-29T17:03:13 | 250,355,505 | 0 | 0 |
MIT
| 2020-03-26T19:42:13 | 2020-03-26T19:42:12 | null |
UTF-8
|
Python
| false | false | 5,282 |
py
|
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE.txt in the project root for
# license information.
# -------------------------------------------------------------------------
from azure.cosmos.aio import CosmosClient
import azure.cosmos.exceptions as exceptions
from azure.cosmos.partition_key import PartitionKey
from azure.identity.aio import ClientSecretCredential, DefaultAzureCredential
import config
import asyncio
# ----------------------------------------------------------------------------------------------------------
# Prerequisites -
#
# 1. An Azure Cosmos account -
# https://docs.microsoft.com/azure/cosmos-db/create-sql-api-python#create-a-database-account
#
# 2. Microsoft Azure Cosmos
# pip install azure-cosmos>=4.3.0b4
# ----------------------------------------------------------------------------------------------------------
# Sample - demonstrates how to authenticate and use your database account using AAD credentials
# Read more about operations allowed for this authorization method: https://aka.ms/cosmos-native-rbac
# ----------------------------------------------------------------------------------------------------------
# Note:
# This sample creates a Container to your database account.
# Each time a Container is created the account will be billed for 1 hour of usage based on
# the provisioned throughput (RU/s) of that account.
# ----------------------------------------------------------------------------------------------------------
# <configureConnectivity>
HOST = config.settings["host"]
MASTER_KEY = config.settings["master_key"]
TENANT_ID = config.settings["tenant_id"]
CLIENT_ID = config.settings["client_id"]
CLIENT_SECRET = config.settings["client_secret"]
DATABASE_ID = config.settings["database_id"]
CONTAINER_ID = config.settings["container_id"]
PARTITION_KEY = PartitionKey(path="/id")
def get_test_item(num):
test_item = {
'id': 'Item_' + str(num),
'test_object': True,
'lastName': 'Smith'
}
return test_item
async def create_sample_resources():
print("creating sample resources")
async with CosmosClient(HOST, MASTER_KEY) as client:
db = await client.create_database(DATABASE_ID)
await db.create_container(id=CONTAINER_ID, partition_key=PARTITION_KEY)
async def delete_sample_resources():
print("deleting sample resources")
async with CosmosClient(HOST, MASTER_KEY) as client:
await client.delete_database(DATABASE_ID)
async def run_sample():
# Since Azure Cosmos DB data plane SDK does not cover management operations, we have to create our resources
# with a master key authenticated client for this sample.
await create_sample_resources()
# With this done, you can use your AAD service principal id and secret to create your ClientSecretCredential.
# The async ClientSecretCredentials, like the async client, also have a context manager,
# and as such should be used with the `async with` keywords.
async with ClientSecretCredential(
tenant_id=TENANT_ID,
client_id=CLIENT_ID,
client_secret=CLIENT_SECRET) as aad_credentials:
# Use your credentials to authenticate your client.
async with CosmosClient(HOST, aad_credentials) as aad_client:
print("Showed ClientSecretCredential, now showing DefaultAzureCredential")
# You can also utilize DefaultAzureCredential rather than directly passing in the id's and secrets.
# This is the recommended method of authentication, and uses environment variables rather than in-code strings.
async with DefaultAzureCredential() as aad_credentials:
# Use your credentials to authenticate your client.
async with CosmosClient(HOST, aad_credentials) as aad_client:
# Do any R/W data operations with your authorized AAD client.
db = aad_client.get_database_client(DATABASE_ID)
container = db.get_container_client(CONTAINER_ID)
print("Container info: " + str(container.read()))
await container.create_item(get_test_item(879))
print("Point read result: " + str(container.read_item(item='Item_0', partition_key='Item_0')))
query_results = [item async for item in
container.query_items(query='select * from c', partition_key='Item_0')]
assert len(query_results) == 1
print("Query result: " + str(query_results[0]))
await container.delete_item(item='Item_0', partition_key='Item_0')
# Attempting to do management operations will return a 403 Forbidden exception.
try:
await aad_client.delete_database(DATABASE_ID)
except exceptions.CosmosHttpResponseError as e:
assert e.status_code == 403
print("403 error assertion success")
# To clean up the sample, we use a master key client again to get access to deleting containers/ databases.
await delete_sample_resources()
print("end of sample")
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(run_sample())
|
[
"[email protected]"
] | |
4c9919c44d46a3e676ed56ba016ce0d743f80c2d
|
bc87bfe38516877dcd2113281a39e2b3fad00229
|
/site/05.level2_lane_detection/to_inverse_perspective_mapping.py
|
f6718365efd0f6fe180b4b52b76e17d15a2b50d2
|
[
"Apache-2.0"
] |
permissive
|
FaBoPlatform/RobotCarAI
|
7e8f9cf017e5380c1825f7397ee3de933efbc3f2
|
c89d3330a2beda0f253733d3252b2b035b153b6b
|
refs/heads/master
| 2021-07-05T06:49:33.414606 | 2020-07-07T05:04:31 | 2020-07-07T05:04:31 | 91,663,056 | 10 | 3 |
Apache-2.0
| 2019-04-02T06:54:24 | 2017-05-18T07:34:19 |
Python
|
UTF-8
|
Python
| false | false | 2,076 |
py
|
# coding: utf-8
# Inverse Perspective Mappingを確認する
#%matplotlib inline
import cv2
from matplotlib import pyplot as plt
import numpy as np
import time
import os
import sys
import math
from lib.functions import *
def main():
FILE_DIR = './test_images'
FILENAME = "frame_1"
OUTPUT_DIR ='./output'
mkdir(OUTPUT_DIR)
print("OpenCV Version : %s " % cv2.__version__)
try:
IMAGE_FORMAT = 1
cv_bgr = cv2.imread(os.path.join(FILE_DIR, FILENAME)+".jpg", IMAGE_FORMAT)
########################################
# Inverse Perspective Mapping Coordinates
########################################
# robocar camera demo_lane
ipm_vertices = calc_ipm_vertices(cv_bgr,
top_width_rate=0.80,top_height_position=0.65,
bottom_width_rate=2.0,bottom_height_position=1)
########################################
# IPM座標を確認する
########################################
cv_bgr_ipm_before_preview = draw_vertices(cv_bgr,ipm_vertices)
plt.title('Before IPM')
plt.imshow(to_rgb(cv_bgr_ipm_before_preview))
plt.show()
cv_bgr_ipm_after_preview = to_ipm(cv_bgr_ipm_before_preview,ipm_vertices)
plt.title('After IPM')
plt.imshow(to_rgb(cv_bgr_ipm_after_preview))
plt.show()
cv2.imwrite(OUTPUT_DIR+"/result_"+FILENAME+"_before_ipm.jpg",cv_bgr_ipm_before_preview)
cv2.imwrite(OUTPUT_DIR+"/result_"+FILENAME+"_after_ipm.jpg",cv_bgr_ipm_after_preview)
########################################
# Inverse Perspective Mapping
########################################
cv_bgr = to_ipm(cv_bgr,ipm_vertices)
plt.title('IPM')
plt.imshow(to_rgb(cv_bgr))
plt.show()
cv2.imwrite(OUTPUT_DIR+"/result_"+FILENAME+"_ipm.jpg",cv_bgr)
except:
import traceback
traceback.print_exc()
finally:
pass
return
if __name__ == '__main__':
main()
|
[
"[email protected]"
] | |
ac6f275a64a93d3e16e4f17b0470b886fc2e22e6
|
a8d68074db5c2b2697650ed0281979d3e00cf5a8
|
/Nyspider/www.tjcn.org/patent.py
|
6e44e6e48df999043441310950c7f0bf89893d78
|
[] |
no_license
|
15807857476/bogdata-2
|
9595609ea2ae5ae0a48c511f911df2498456467e
|
1934cdfa234b77ca91e349b84688db113ff39e8c
|
refs/heads/master
| 2023-05-26T19:10:18.439269 | 2019-05-24T02:50:41 | 2019-05-24T02:50:41 | 188,327,526 | 3 | 1 | null | 2023-05-22T21:37:27 | 2019-05-24T00:53:28 |
Python
|
UTF-8
|
Python
| false | false | 3,575 |
py
|
import requests
from bs4 import BeautifulSoup
import time
import openpyxl
headers = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "en-US,en;q=0.5",
"Connection": "keep-alive",
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"}
def get_citys(url):
html=requests.get(url,headers=headers).text.encode('iso-8859-1').decode('gbk','ignore')
table=BeautifulSoup(html,'lxml').find('div',{'class':'content'}).find('table',{'class':'sy'}).find_all('tr')
citys=[]
for item in table:
try:
for i in item.find_all('td')[1].find_all('a'):
try:
name=i.get_text()
url=i.get('href')
citys.append([name,url])
except:
continue
except:
continue
return citys
def get_text(url):
html=requests.get(url,headers=headers,timeout=30).text.encode('iso-8859-1').decode('gbk','ignore')
text=BeautifulSoup(html,'lxml').find('div',{'class':'viewbox'}).get_text().replace('\r','').replace('\n','').split('。')
result=''
page=2
while True:
page_url=url.replace('.html','_%s.html'%page)
html=requests.get(page_url,headers=headers,timeout=30).text.encode('iso-8859-1').decode('gbk','ignore')
if '您正在搜索的页面可能已经删除、更名或暂时不可用。' in html:
break
text+=BeautifulSoup(html,'lxml').find('div',{'class':'viewbox'}).get_text().replace('\r','').replace('\n','').split('。')
page+=1
for item in text:
if '专利' in item:
result+=item+'\n'
return result
def get_failed():
failed=[eval(line) for line in open('./failed.txt','r')]
for item in failed:
try:
text=get_text('http://www.tjcn.org'+item[-1])
except:
failed=open('failed_1.txt','a')
failed.write(str(item)+'\n')
failed.close()
continue
f=open('result.txt','a')
f.write(str([item[0],item[1:],text])+'\n')
f.close()
print(item)
def main():
years={'2009':'http://www.tjcn.org/tjgbsy/nd/3595.html','2010':'http://www.tjcn.org/tjgbsy/nd/17848.html','2011':'http://www.tjcn.org/tjgbsy/nd/23306.html'}
for key in years:
citys=get_citys(years[key])
for city in citys:
try:
text=get_text('http://www.tjcn.org'+city[1])
except:
failed=open('failed.txt','a')
failed.write(str([key]+city)+'\n')
failed.close()
continue
f=open('result.txt','a')
f.write(str([key,city,text])+'\n')
f.close()
print(city,key)
def write_to_excel():
data=[eval(line) for line in open('result.txt','r')]
result={}
for item in data:
try:
result[item[1][0]][item[0]]=item[-1]
except:
result[item[1][0]]={}
result[item[1][0]][item[0]]=item[-1]
excel=openpyxl.Workbook(write_only=True)
sheet=excel.create_sheet()
keys=['2009','2010','2011','2012','2013','2014','2015']
for key in result:
line=[]
for year in keys:
try:
line.append(result[key][year])
except:
line.append('')
print(year,key)
sheet.append([key]+line)
excel.save('result.xlsx')
write_to_excel()
|
[
"[email protected]"
] | |
98580de3e9f491636334ad285359f2716c1b9e93
|
56b39e46dfd2a54c72728974c13e8ea1f1486f04
|
/social_rss/tw.py
|
4d2fd31d786618d4ad0cea8841612dbe744530e6
|
[] |
no_license
|
vlevit/social-rss
|
1f74e4c8306fb6fad75bbd84cb258d4e4321610c
|
65df4947c490f13ed6fe3c059883b00625e2ef04
|
refs/heads/master
| 2020-07-02T21:50:32.367241 | 2018-05-31T19:48:19 | 2018-05-31T19:48:19 | 201,677,586 | 1 | 0 | null | 2019-08-10T20:06:21 | 2019-08-10T20:06:21 | null |
UTF-8
|
Python
| false | false | 6,081 |
py
|
"""Twitter module."""
# Note: Twitter HTML-escapes all the data it sends by API.
import calendar
import json
import logging
import os
import pprint
from urllib.parse import urlencode
import dateutil.parser
from twitter import OAuth, Twitter
from social_rss import config
from social_rss.render import block as _block
from social_rss.render import image as _image
from social_rss.render import image_block as _image_block
from social_rss.render import link as _link
from social_rss.request import BaseRequestHandler
LOG = logging.getLogger(__name__)
_TWITTER_URL = "https://twitter.com/"
"""Twitter URL."""
class RequestHandler(BaseRequestHandler):
"""Twitter RSS request handler."""
def initialize(self, credentials=None):
self.__credentials = credentials
def get(self):
"""Handles the request."""
if self.__credentials is None and not self.__get_credentials():
return
if config.OFFLINE_DEBUG_MODE or config.WRITE_OFFLINE_DEBUG:
debug_path = os.path.join(config.OFFLINE_DEBUG_PATH, "twitter")
if config.OFFLINE_DEBUG_MODE:
with open(debug_path, "rb") as debug_response:
timeline = json.loads(debug_response.read().decode())
else:
api = Twitter(auth=OAuth(self.__credentials["access_token_key"], self.__credentials["access_token_secret"],
self.__credentials["consumer_key"], self.__credentials["consumer_secret"]))
timeline = api.statuses.home_timeline(tweet_mode="extended", _timeout=config.API_TIMEOUT)
if config.WRITE_OFFLINE_DEBUG:
with open(debug_path, "wb") as debug_response:
debug_response.write(json.dumps(timeline).encode())
try:
feed = _get_feed(timeline)
except Exception:
LOG.exception("Failed to process Twitter timeline:%s", pprint.pformat(timeline))
raise
self._write_rss(feed)
def __get_credentials(self):
separator = "_"
credentials = self._get_credentials()
if (
credentials is None or
separator not in credentials[0] or separator not in credentials[1]
):
self._unauthorized(
"Please enter your Twitter credentials: "
"user=$consumer_key{0}$consumer_secret, "
"password=$access_token_key{0}$access_token_secret.".format(separator))
return False
consumer, access_token = credentials
consumer_key, consumer_secret = consumer.split(separator, 1)
access_token_key, access_token_secret = access_token.split(separator, 1)
self.__credentials = {
"consumer_key": consumer_key,
"consumer_secret": consumer_secret,
"access_token_key": access_token_key,
"access_token_secret": access_token_secret,
}
return True
def _get_feed(timeline):
"""Generates a feed from timeline."""
items = []
for tweet in timeline:
item = { "id": tweet["id_str"] }
try:
item["time"] = int(calendar.timegm(dateutil.parser.parse(tweet["created_at"]).utctimetuple()))
if tweet.get("retweeted_status") is None:
real_tweet = tweet
item["title"] = tweet["user"]["name"]
else:
real_tweet = tweet["retweeted_status"]
item["title"] = "{} (retweeted by {})".format(
real_tweet["user"]["name"], tweet["user"]["name"])
item["url"] = _twitter_user_url(real_tweet["user"]["screen_name"]) + "/status/" + real_tweet["id_str"]
item["text"] = _image_block(
_twitter_user_url(real_tweet["user"]["screen_name"]),
real_tweet["user"]["profile_image_url_https"],
_parse_text(real_tweet["full_text"], real_tweet["entities"]))
except Exception:
LOG.exception("Failed to process the following tweet:\n%s",
pprint.pformat(tweet))
item.setdefault("title", "Internal server error")
item.setdefault("text", "Internal server error has occurred during processing this tweet")
items.append(item)
return {
"title": "Twitter",
"url": _TWITTER_URL,
"image": _TWITTER_URL + "images/resources/twitter-bird-light-bgs.png",
"description": "Twitter timeline",
"items": items,
}
def _parse_text(text, tweet_entities):
"""Parses a tweet text."""
sorted_entities = []
for entity_type, entities in tweet_entities.items():
for entity in entities:
sorted_entities.append(( entity_type, entity ))
sorted_entities.sort(
key=lambda entity_tuple: entity_tuple[1]["indices"][0], reverse=True)
html = ""
media_html = ""
pos = len(text)
for entity_type, entity in sorted_entities:
start, end = entity["indices"]
if end < pos:
html = text[end:pos] + html
if entity_type == "urls":
html = _link(entity["expanded_url"], entity["display_url"]) + html
elif entity_type == "user_mentions":
html = _link(_twitter_user_url(entity["screen_name"]), entity["name"]) + html
elif entity_type == "hashtags":
html = _link(_TWITTER_URL + "search?" + urlencode({ "q": "#" + entity["full_text"] }), text[start:end]) + html
elif entity_type == "media":
html = _link(entity["expanded_url"], entity["display_url"]) + html
media_html += _block(_link(entity["expanded_url"], _image(entity["media_url_https"])))
else:
LOG.error("Unknown tweet entity:\n%s", pprint.pformat(entity))
html = text[start:end] + html
pos = start
if pos:
html = text[:pos] + html
return _block(html) + media_html
def _twitter_user_url(screen_name):
"""Returns URL of the specified user profile."""
return _TWITTER_URL + screen_name
|
[
"[email protected]"
] | |
b8b4235644dd1246cd1a8963b60d826eba72dec9
|
f138be1e8e382c404cfe1ff6a35e90fc77fa9bff
|
/ABC/python/101/A.py
|
f945008b581214b3b341d4b92e8d9345a1f9a3df
|
[] |
no_license
|
jackfrostwillbeking/atcoder_sample
|
8547d59ca2f66b34905f292191df6c474010fded
|
d5b2fe8f628fd56eaf23ee7e92938e8ac1b1fef9
|
refs/heads/master
| 2023-07-25T19:16:14.340414 | 2021-08-26T15:26:08 | 2021-08-26T15:26:08 | 273,857,286 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 181 |
py
|
import sys
S = list(input())
if len(S) != 4:
sys.exit()
result = 0
for I in range(len(S)):
if S[I] == '+':
result += 1
else:
result -= 1
print(result)
|
[
"[email protected]"
] | |
d91be1f01e5ef10aed2a7827f0ddced4fa214eb1
|
1b46da70028b6fd491df59381884c2acf35b20f4
|
/parcalar/WordCounter.py
|
fb29e174a9188d1f9ad7184972a5cd49838f7009
|
[] |
no_license
|
ybgirgin3/beautifulSoup
|
28788e07eee7686129da82f529aa00cbf59bf3be
|
f65ca058c1178d41c1ccb799b9e765c01836bd14
|
refs/heads/main
| 2023-05-08T02:23:48.767751 | 2021-06-05T07:19:19 | 2021-06-05T07:19:19 | 374,047,699 | 1 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 530 |
py
|
# bir url al onun içindeki kelimelerin sayılarını bul
import requests
from pprint import pprint
from collections import Counter
url = "https://ybgirgin3.github.io/"
r = requests.get(url)
# ret = r.content
kaynak_kodu = r.text
#print(ret)
kelime_listesi = kaynak_kodu.split()
kelime_freq = []
for kelime in kelime_listesi:
kelime_freq.append(kelime_listesi.count(kelime))
# kelimeler ve sayıları
#ret = str(list(zip(kelime_listesi, kelime_freq)))
ret = list(zip(kelime_listesi, kelime_freq))
pprint(Counter(ret))
|
[
"[email protected]"
] | |
e13d5d8ca3e21ebe719a683ad5697b738451b274
|
73770ddb5441f589742dd600545c555dd9922ae8
|
/training/routes.py
|
66903cda1404b04fffee6619145157a5ce612665
|
[] |
no_license
|
annndrey/trainingsite
|
c200a203c7a5fe832de70e9497a93df3745d63ef
|
6dce55dc25b2a6f5285a8cfba1fbd7d83dbbe96b
|
refs/heads/master
| 2020-03-29T16:11:06.336532 | 2018-09-24T12:53:55 | 2018-09-24T12:53:55 | 150,102,082 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 1,222 |
py
|
def includeme(config):
config.add_static_view('static', 'static', cache_max_age=3600)
config.add_route('home', '/')
config.add_route('login', '/login')
config.add_route('register', '/register')
config.add_route('logout', '/logout')
config.add_route('dashboard', '/dashboard')
config.add_route('settings', '/settings')
config.add_route('resetpassword', '/resetpassword')
config.add_route('showone', '/view/{what}/{id:\d+}')
config.add_route('showall', '/view/{what}')
config.add_route('new', '/new/{what}')
config.add_route('edit', '/edit/{what}/{id:\d+}')
config.add_route('delete', '/delete/{what}/{id:\d+}')
config.add_route('about', '/about')
#for course modification
config.add_route('modifycourse', '/modify/{courseid:\d+}')
config.add_route('courseaction', '/mod/{courseid:\d+}/*args')
#subscriptions
config.add_route('subscradd', '/subscribe/{courseid:\d+}')
config.add_route('subscrpause', '/sub/{action}/{subscrid:\d+}')
config.add_route('payment', '/payment/{action}/{courseid:\d+}/{userid:\d+}')
config.add_route('paymentcheck', '/check')
#workouts
config.add_route('workout', '/wkt/{wktid:\d+}')
|
[
"[email protected]"
] | |
995ec97bd13cb19bd5a5629c8ea7678f771f6b95
|
2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae
|
/python/python_25508.py
|
156459636628d599fa8bca3d345d88685047bbaa
|
[] |
no_license
|
AK-1121/code_extraction
|
cc812b6832b112e3ffcc2bb7eb4237fd85c88c01
|
5297a4a3aab3bb37efa24a89636935da04a1f8b6
|
refs/heads/master
| 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 155 |
py
|
# how do you read a pytables table into a pandas dataframe
a = tb.open_file("FGBS.h5")
table = a.root.quote.z4
c = pd.DataFrame.from_records(table.read())
|
[
"[email protected]"
] | |
69789791fe27d985d5b3a31c5fe6a5288951fcca
|
9a91dde7f08d081cdf1a9ed1b7357a49a9fec9d0
|
/erp/migrations/0084_auto_20160414_0411.py
|
c4aad3fb74f3418a16d69e3daf22fb1efcf65992
|
[] |
no_license
|
fengxia41103/fashion
|
a8c812ae0534ed632c1d821b83817d2a830c9fc3
|
6834dcc523dcb1f1f8de0aa3e8779e6cac2ae126
|
refs/heads/master
| 2022-12-17T00:25:48.600435 | 2019-10-10T18:56:10 | 2019-10-10T18:56:10 | 52,611,714 | 0 | 0 | null | 2022-12-07T23:24:17 | 2016-02-26T14:59:48 |
Python
|
UTF-8
|
Python
| false | false | 766 |
py
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('erp', '0083_auto_20160402_0821'),
]
operations = [
migrations.AddField(
model_name='attachment',
name='file_base64',
field=models.TextField(default=None, help_text='Based64 encoded file data', null=True, blank=True),
preserve_default=True,
),
migrations.AddField(
model_name='attachment',
name='thumbnail_base64',
field=models.TextField(default=None, help_text='Base64 encoded thumbnail data', null=True, blank=True),
preserve_default=True,
),
]
|
[
"[email protected]"
] | |
002f3acca24ddb7e607e9823a55f8c48a276f86e
|
9bc006e71393c5338bd77bbf12c2946dbfaf2d5b
|
/delete_node_in_a_linked_list.py
|
811b0304d54bfae9698560e40708caf6088c4c6b
|
[] |
no_license
|
aroraakshit/coding_prep
|
2d883058ef81317fba0c101fac3da37cd6ecd9ca
|
aac41ddd2ec5f6e5c0f46659696ed5b67769bde2
|
refs/heads/master
| 2021-07-09T18:28:26.706576 | 2020-07-08T03:07:26 | 2020-07-08T03:07:26 | 163,704,385 | 8 | 7 | null | null | null | null |
UTF-8
|
Python
| false | false | 385 |
py
|
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution: # 44ms
def deleteNode(self, node):
"""
:type node: ListNode
:rtype: void Do not return anything, modify node in-place instead.
"""
node.val = node.next.val
node.next = node.next.next
|
[
"[email protected]"
] | |
dd1e9efcdbcd7e8dc8920c3a218397a4710e5004
|
60a831fb3c92a9d2a2b52ff7f5a0f665d4692a24
|
/IronPythonStubs/release/stubs.min/System/Diagnostics/__init___parts/InstanceData.py
|
e24830b8c778ede635342a22197cdebfd64feeef
|
[
"MIT"
] |
permissive
|
shnlmn/Rhino-Grasshopper-Scripts
|
a9411098c5d1bbc55feb782def565d535b27b709
|
0e43c3c1d09fb12cdbd86a3c4e2ba49982e0f823
|
refs/heads/master
| 2020-04-10T18:59:43.518140 | 2020-04-08T02:49:07 | 2020-04-08T02:49:07 | 161,219,695 | 11 | 2 | null | null | null | null |
UTF-8
|
Python
| false | false | 913 |
py
|
class InstanceData(object):
"""
Holds instance data associated with a performance counter sample.
InstanceData(instanceName: str,sample: CounterSample)
"""
@staticmethod
def __new__(self,instanceName,sample):
""" __new__(cls: type,instanceName: str,sample: CounterSample) """
pass
InstanceName=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets the instance name associated with this instance data.
Get: InstanceName(self: InstanceData) -> str
"""
RawValue=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets the raw data value associated with the performance counter sample.
Get: RawValue(self: InstanceData) -> Int64
"""
Sample=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets the performance counter sample that generated this data.
Get: Sample(self: InstanceData) -> CounterSample
"""
|
[
"[email protected]"
] | |
3d0745040c59f150abe1510398a3005cbf6de8d4
|
aa54fd5cafc65d18ceac52097237482cec27f674
|
/planetary_system_stacker/Test_programs/argparser.py
|
34046c6c3c2e4e620b81b650a89b095fbc9e1b82
|
[] |
no_license
|
Rolf-Hempel/PlanetarySystemStacker
|
84f6934e6748177fb1aca20b54392dee5c3f2e3c
|
304952a8ac8e991e111e3fe2dba95a6ca4304b4e
|
refs/heads/master
| 2023-07-20T04:11:06.663774 | 2023-07-17T15:20:15 | 2023-07-17T15:20:15 | 148,365,620 | 228 | 34 | null | 2023-09-01T16:33:05 | 2018-09-11T19:00:13 |
Python
|
UTF-8
|
Python
| false | false | 7,639 |
py
|
import argparse
import sys
print("The command was called with " + str(len(sys.argv)) + " arguments")
if len(sys.argv) <= 1:
print ("Running PSS in interactive mode, starting GUI.")
exit()
def noise_type(x):
x = int(x)
if not 0 <= x <= 11:
raise argparse.ArgumentTypeError("Noise level must be between 0 and 11")
return x
def stab_size_type(x):
x = int(x)
if not 5 <= x <= 80:
raise argparse.ArgumentTypeError("Stabilization patch size must be between 5% and 80%")
return x
def stab_sw_type(x):
x = int(x)
if not 5 <= x <= 150:
raise argparse.ArgumentTypeError(
"Stabilization search width must be between 5 and 150 pixels")
return x
def rf_percent_type(x):
x = int(x)
if not 3 <= x <= 30:
raise argparse.ArgumentTypeError(
"Percentage of best frames for reference frame computation must be between 3% and 30%")
return x
def align_box_width_type(x):
x = int(x)
if not 20 <= x <= 140:
raise argparse.ArgumentTypeError(
"Alignment point box width must be between 20 and 140 pixels")
return x
def align_search_width_type(x):
x = int(x)
if not 6 <= x <= 30:
raise argparse.ArgumentTypeError(
"Alignment point search width must be between 6 and 30 pixels")
return x
def align_min_struct_type(x):
x = float(x)
if not 0.01 <= x <= 0.30:
raise argparse.ArgumentTypeError(
"Alignment point minimum structure must be between 0.01 and 0.30")
return x
def align_min_bright_type(x):
x = int(x)
if not 2 <= x <= 50:
raise argparse.ArgumentTypeError(
"Alignment point minimum brightness must be between 2 and 50")
return x
def stack_percent_type(x):
x = int(x)
if not 1 <= x <= 100:
raise argparse.ArgumentTypeError(
"Percentage of best frames to be stacked must be between 1 and 100")
return x
def stack_number_type(x):
x = int(x)
if not 1 <= x:
raise argparse.ArgumentTypeError(
"Number of best frames to be stacked must be greater or equal 1")
return x
def normalize_bco_type(x):
x = int(x)
if not 0 <= x <= 40:
raise argparse.ArgumentTypeError(
"Normalization black cut-off must be between 0 and 40")
return x
parser = argparse.ArgumentParser()
parser.add_argument("job_input", nargs='+', help="input video files or still image folders")
parser.add_argument("-p", "--protocol", action="store_true",
help="Store protocol with results")
parser.add_argument("--protocol_detail", type=int, choices=[0, 1, 2], default=1,
help="Protocol detail level")
parser.add_argument("-b", "--buffering_level", type=int, choices=[0, 1, 2, 3, 4], default=2,
help="Buffering level")
parser.add_argument("--out_format", choices=["png", "tiff", "fits"], default="png",
help="Image format for output")
parser.add_argument("--name_add_f", action="store_true",
help="Add number of stacked frames to output file name")
parser.add_argument("--name_add_p", action="store_true",
help="Add percentage of stacked frames to output file name")
parser.add_argument("--name_add_apb", action="store_true",
help="Add alignment point box size (pixels) to output file name")
parser.add_argument("--name_add_apn", action="store_true",
help="Add number of alignment points to output file name")
parser.add_argument("--debayering", choices=["Auto detect color", "Grayscale", "RGB", "RGB", "BGR",
"Force Bayer RGGB", "Force Bayer GRBG",
"Force Bayer GBRG", "Force Bayer BGGR"],
default="Auto detect color", help="Debayering option")
parser.add_argument("--noise", type=noise_type, default=7, help="Noise level (add Gaussian blur)")
parser.add_argument("-m", "--stab_mode", choices=["Surface", "Planet"], default="Surface",
help="Frame stabilization mode")
parser.add_argument("--stab_size", type=stab_size_type, default=33,
help="Stabilization patch size (% of frame)")
parser.add_argument("--stab_sw", type=stab_sw_type, default=34,
help="Stabilization search width (pixels)")
parser.add_argument("--rf_percent", type=rf_percent_type, default=5,
help="Percentage of best frames for reference frame computation")
parser.add_argument("-d", "--dark", help="Image file for dark frame correction")
parser.add_argument("-f", "--flat", help="Image file for flat frame correction")
parser.add_argument("-a", "--align_box_width", type=align_box_width_type, default=48,
help="Alignment point box width (pixels)")
parser.add_argument("-w", "--align_search_width", type=align_search_width_type, default=14,
help="Alignment point search width (pixels)")
parser.add_argument("--align_min_struct", type=align_min_struct_type, default=0.04,
help="Alignment point minimum structure")
parser.add_argument("--align_min_bright", type=align_min_bright_type, default=10,
help="Alignment point minimum brightness")
parser.add_argument("-s", "--stack_percent", type=stack_percent_type, default=10,
help="Percentage of best frames to be stacked")
parser.add_argument("--stack_number", type=stack_number_type,
help="Number of best frames to be stacked")
parser.add_argument("-n", "--normalize_bright", action="store_true",
help="Normalize frame brightness")
parser.add_argument("--normalize_bco", type=normalize_bco_type, default=15,
help="Normalization black cut-off")
args = parser.parse_args()
print(str(args.job_input))
print("Store protocol with results: " + str(args.protocol))
print("Protocol detail level: " + str(args.protocol_detail))
print("Buffering level: " + str(args.buffering_level))
print("Image format for output: " + args.out_format)
print("Add number of stacked frames to output file name: " + str(args.name_add_f))
print("Add percentage of stacked frames to output file name: " + str(args.name_add_p))
print("Add alignment point box size (pixels) to output file name: " + str(args.name_add_apb))
print("Add number of alignment points to output file name: " + str(args.name_add_apn))
print("")
print("Debayering option: " + args.debayering)
print("Noise level: " + str(args.noise))
print("Frame stabilization mode: " + args.stab_mode)
print("Stabilization patch size (% of frame): " + str(args.stab_size))
print("Stabilization search width (pixels): " + str(args.stab_sw))
print("Percentage of best frames for reference frame computation: " + str(args.rf_percent))
if args.dark:
print("Image file for dark frame correction: " + args.dark)
if args.flat:
print("Image file for flat frame correction: " + args.flat)
print("")
print("Alignment point box width (pixels): " + str(args.align_box_width))
print("Alignment point search width (pixels): " + str(args.align_search_width))
print("Alignment point minimum structure: " + str(args.align_min_struct))
print("Alignment point minimum brightness: " + str(args.align_min_bright))
print("")
print("Percentage of best frames to be stacked: " + str(args.stack_percent))
print("Number of best frames to be stacked: " + str(args.stack_number))
print("Normalize frame brightness: " + str(args.normalize_bright))
print("Normalization black cut-off: " + str(args.normalize_bco))
|
[
"[email protected]"
] | |
1c8ab1dfbea664ba773fc25381cb7b6812ce63c6
|
53fab060fa262e5d5026e0807d93c75fb81e67b9
|
/backup/user_208/ch169_2020_06_22_16_29_40_113842.py
|
e3756cd075be6633bac009e64f5161497ba54e75
|
[] |
no_license
|
gabriellaec/desoft-analise-exercicios
|
b77c6999424c5ce7e44086a12589a0ad43d6adca
|
01940ab0897aa6005764fc220b900e4d6161d36b
|
refs/heads/main
| 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 567 |
py
|
def login_disponivel (login,lista):
if login not in lista:
return login
else:
for login1 in range(len(lista)):
i = 1
while login in lista:
login = login + str(i)
if login in lista:
login = login [:-1]
i+=1
return login
lista1 = []
while True:
x = str(input("Digite o login: "))
if x != "fim":
login_ = login_disponivel(x,lista1)
lista1.append(x)
if x == "fim":
print(lista1)
break
|
[
"[email protected]"
] | |
4b69f6d838ad7f89786e05b2358d7efdeee75012
|
81b20a9c51779c21b779ac0b1c5bf669359521ef
|
/py_object_detection/tf_api/object_detection/builders/losses_builder.py
|
6fea798572ee953d00fab78f2b82f3e9215c3c72
|
[] |
no_license
|
thekindler/py-object-detection
|
bae1401f025458605c9244f9a763e17a0138d2ec
|
a8d13c496bab392ef5c8ad91a20fbfa9af1899bb
|
refs/heads/master
| 2023-06-23T02:42:08.180311 | 2021-07-17T18:40:46 | 2021-07-17T18:40:46 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 7,985 |
py
|
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""A function to build localization and classification losses from config."""
from py_object_detection.tf_api.object_detection.core import balanced_positive_negative_sampler as sampler
from py_object_detection.tf_api.object_detection.core import losses
from py_object_detection.tf_api.object_detection.protos import losses_pb2
def build(loss_config):
"""Build losses based on the config.
Builds classification, localization losses and optionally a hard example miner
based on the config.
Args:
loss_config: A losses_pb2.Loss object.
Returns:
classification_loss: Classification loss object.
localization_loss: Localization loss object.
classification_weight: Classification loss weight.
localization_weight: Localization loss weight.
hard_example_miner: Hard example miner object.
random_example_sampler: BalancedPositiveNegativeSampler object.
Raises:
ValueError: If hard_example_miner is used with sigmoid_focal_loss.
ValueError: If random_example_sampler is getting non-positive value as
desired positive example fraction.
"""
classification_loss = _build_classification_loss(
loss_config.classification_loss)
localization_loss = _build_localization_loss(
loss_config.localization_loss)
classification_weight = loss_config.classification_weight
localization_weight = loss_config.localization_weight
hard_example_miner = None
if loss_config.HasField('hard_example_miner'):
if (loss_config.classification_loss.WhichOneof('classification_loss') ==
'weighted_sigmoid_focal'):
raise ValueError('HardExampleMiner should not be used with sigmoid focal '
'loss')
hard_example_miner = build_hard_example_miner(
loss_config.hard_example_miner,
classification_weight,
localization_weight)
random_example_sampler = None
if loss_config.HasField('random_example_sampler'):
if loss_config.random_example_sampler.positive_sample_fraction <= 0:
raise ValueError('RandomExampleSampler should not use non-positive'
'value as positive sample fraction.')
random_example_sampler = sampler.BalancedPositiveNegativeSampler(
positive_fraction=loss_config.random_example_sampler.
positive_sample_fraction)
return (classification_loss, localization_loss, classification_weight,
localization_weight, hard_example_miner, random_example_sampler)
def build_hard_example_miner(config,
classification_weight,
localization_weight):
"""Builds hard example miner based on the config.
Args:
config: A losses_pb2.HardExampleMiner object.
classification_weight: Classification loss weight.
localization_weight: Localization loss weight.
Returns:
Hard example miner.
"""
loss_type = None
if config.loss_type == losses_pb2.HardExampleMiner.BOTH:
loss_type = 'both'
if config.loss_type == losses_pb2.HardExampleMiner.CLASSIFICATION:
loss_type = 'cls'
if config.loss_type == losses_pb2.HardExampleMiner.LOCALIZATION:
loss_type = 'loc'
max_negatives_per_positive = None
num_hard_examples = None
if config.max_negatives_per_positive > 0:
max_negatives_per_positive = config.max_negatives_per_positive
if config.num_hard_examples > 0:
num_hard_examples = config.num_hard_examples
hard_example_miner = losses.HardExampleMiner(
num_hard_examples=num_hard_examples,
iou_threshold=config.iou_threshold,
loss_type=loss_type,
cls_loss_weight=classification_weight,
loc_loss_weight=localization_weight,
max_negatives_per_positive=max_negatives_per_positive,
min_negatives_per_image=config.min_negatives_per_image)
return hard_example_miner
def build_faster_rcnn_classification_loss(loss_config):
"""Builds a classification loss for Faster RCNN based on the loss config.
Args:
loss_config: A losses_pb2.ClassificationLoss object.
Returns:
Loss based on the config.
Raises:
ValueError: On invalid loss_config.
"""
if not isinstance(loss_config, losses_pb2.ClassificationLoss):
raise ValueError('loss_config not of type losses_pb2.ClassificationLoss.')
loss_type = loss_config.WhichOneof('classification_loss')
if loss_type == 'weighted_sigmoid':
return losses.WeightedSigmoidClassificationLoss()
if loss_type == 'weighted_softmax':
config = loss_config.weighted_softmax
return losses.WeightedSoftmaxClassificationLoss(
logit_scale=config.logit_scale)
if loss_type == 'weighted_logits_softmax':
config = loss_config.weighted_logits_softmax
return losses.WeightedSoftmaxClassificationAgainstLogitsLoss(
logit_scale=config.logit_scale)
# By default, Faster RCNN second stage classifier uses Softmax loss
# with anchor-wise outputs.
config = loss_config.weighted_softmax
return losses.WeightedSoftmaxClassificationLoss(
logit_scale=config.logit_scale)
def _build_localization_loss(loss_config):
"""Builds a localization loss based on the loss config.
Args:
loss_config: A losses_pb2.LocalizationLoss object.
Returns:
Loss based on the config.
Raises:
ValueError: On invalid loss_config.
"""
if not isinstance(loss_config, losses_pb2.LocalizationLoss):
raise ValueError('loss_config not of type losses_pb2.LocalizationLoss.')
loss_type = loss_config.WhichOneof('localization_loss')
if loss_type == 'weighted_l2':
return losses.WeightedL2LocalizationLoss()
if loss_type == 'weighted_smooth_l1':
return losses.WeightedSmoothL1LocalizationLoss(
loss_config.weighted_smooth_l1.delta)
if loss_type == 'weighted_iou':
return losses.WeightedIOULocalizationLoss()
raise ValueError('Empty loss config.')
def _build_classification_loss(loss_config):
"""Builds a classification loss based on the loss config.
Args:
loss_config: A losses_pb2.ClassificationLoss object.
Returns:
Loss based on the config.
Raises:
ValueError: On invalid loss_config.
"""
if not isinstance(loss_config, losses_pb2.ClassificationLoss):
raise ValueError('loss_config not of type losses_pb2.ClassificationLoss.')
loss_type = loss_config.WhichOneof('classification_loss')
if loss_type == 'weighted_sigmoid':
return losses.WeightedSigmoidClassificationLoss()
if loss_type == 'weighted_sigmoid_focal':
config = loss_config.weighted_sigmoid_focal
alpha = None
if config.HasField('alpha'):
alpha = config.alpha
return losses.SigmoidFocalClassificationLoss(
gamma=config.gamma,
alpha=alpha)
if loss_type == 'weighted_softmax':
config = loss_config.weighted_softmax
return losses.WeightedSoftmaxClassificationLoss(
logit_scale=config.logit_scale)
if loss_type == 'weighted_logits_softmax':
config = loss_config.weighted_logits_softmax
return losses.WeightedSoftmaxClassificationAgainstLogitsLoss(
logit_scale=config.logit_scale)
if loss_type == 'bootstrapped_sigmoid':
config = loss_config.bootstrapped_sigmoid
return losses.BootstrappedSigmoidClassificationLoss(
alpha=config.alpha,
bootstrap_type=('hard' if config.hard_bootstrap else 'soft'))
raise ValueError('Empty loss config.')
|
[
"[email protected]"
] | |
be390c51485737ba9e51dee2214009c0164ac720
|
f9d564f1aa83eca45872dab7fbaa26dd48210d08
|
/huaweicloud-sdk-frs/huaweicloudsdkfrs/v2/model/face_search_url_req.py
|
6c39c06bb85452440414a1f7bef28b5bc0a0d6f8
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-python-v3
|
cde6d849ce5b1de05ac5ebfd6153f27803837d84
|
f69344c1dadb79067746ddf9bfde4bddc18d5ecf
|
refs/heads/master
| 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 |
NOASSERTION
| 2023-06-22T14:50:48 | 2020-05-08T02:28:43 |
Python
|
UTF-8
|
Python
| false | false | 10,095 |
py
|
# coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class FaceSearchUrlReq:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'filter': 'str',
'top_n': 'int',
'image_url': 'str',
'return_fields': 'list[str]',
'threshold': 'float',
'sort': 'list[dict(str, str)]'
}
attribute_map = {
'filter': 'filter',
'top_n': 'top_n',
'image_url': 'image_url',
'return_fields': 'return_fields',
'threshold': 'threshold',
'sort': 'sort'
}
def __init__(self, filter=None, top_n=None, image_url=None, return_fields=None, threshold=None, sort=None):
"""FaceSearchUrlReq
The model defined in huaweicloud sdk
:param filter: [过滤条件,参考[filter语法](https://support.huaweicloud.com/api-face/face_02_0014.html)。](tag:hc) [过滤条件,参考[filter语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0014.html)。](tag:hk)
:type filter: str
:param top_n: 返回查询到的最相似的N张人脸,N默认为10。
:type top_n: int
:param image_url: [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/api-face/face_02_0006.html)。](tag:hc) [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0006.html)。](tag:hk)
:type image_url: str
:param return_fields: 指定返回的自定义字段。
:type return_fields: list[str]
:param threshold: 人脸相似度阈值,低于这个阈值则不返回,取值范围0~1,一般情况下建议取值0.93,默认为0。
:type threshold: float
:param sort: [支持字段排序,参考[sort语法](https://support.huaweicloud.com/api-face/face_02_0013.html)。](tag:hc) [支持字段排序,参考[sort语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0013.html)。](tag:hk)
:type sort: list[dict(str, str)]
"""
self._filter = None
self._top_n = None
self._image_url = None
self._return_fields = None
self._threshold = None
self._sort = None
self.discriminator = None
if filter is not None:
self.filter = filter
if top_n is not None:
self.top_n = top_n
self.image_url = image_url
if return_fields is not None:
self.return_fields = return_fields
if threshold is not None:
self.threshold = threshold
if sort is not None:
self.sort = sort
@property
def filter(self):
"""Gets the filter of this FaceSearchUrlReq.
[过滤条件,参考[filter语法](https://support.huaweicloud.com/api-face/face_02_0014.html)。](tag:hc) [过滤条件,参考[filter语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0014.html)。](tag:hk)
:return: The filter of this FaceSearchUrlReq.
:rtype: str
"""
return self._filter
@filter.setter
def filter(self, filter):
"""Sets the filter of this FaceSearchUrlReq.
[过滤条件,参考[filter语法](https://support.huaweicloud.com/api-face/face_02_0014.html)。](tag:hc) [过滤条件,参考[filter语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0014.html)。](tag:hk)
:param filter: The filter of this FaceSearchUrlReq.
:type filter: str
"""
self._filter = filter
@property
def top_n(self):
"""Gets the top_n of this FaceSearchUrlReq.
返回查询到的最相似的N张人脸,N默认为10。
:return: The top_n of this FaceSearchUrlReq.
:rtype: int
"""
return self._top_n
@top_n.setter
def top_n(self, top_n):
"""Sets the top_n of this FaceSearchUrlReq.
返回查询到的最相似的N张人脸,N默认为10。
:param top_n: The top_n of this FaceSearchUrlReq.
:type top_n: int
"""
self._top_n = top_n
@property
def image_url(self):
"""Gets the image_url of this FaceSearchUrlReq.
[图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/api-face/face_02_0006.html)。](tag:hc) [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0006.html)。](tag:hk)
:return: The image_url of this FaceSearchUrlReq.
:rtype: str
"""
return self._image_url
@image_url.setter
def image_url(self, image_url):
"""Sets the image_url of this FaceSearchUrlReq.
[图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/api-face/face_02_0006.html)。](tag:hc) [图片的URL路径,目前仅支持华为云上OBS的URL,且人脸识别服务有权限读取该OBS桶的数据。开通读取权限的操作请参见[服务授权](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0006.html)。](tag:hk)
:param image_url: The image_url of this FaceSearchUrlReq.
:type image_url: str
"""
self._image_url = image_url
@property
def return_fields(self):
"""Gets the return_fields of this FaceSearchUrlReq.
指定返回的自定义字段。
:return: The return_fields of this FaceSearchUrlReq.
:rtype: list[str]
"""
return self._return_fields
@return_fields.setter
def return_fields(self, return_fields):
"""Sets the return_fields of this FaceSearchUrlReq.
指定返回的自定义字段。
:param return_fields: The return_fields of this FaceSearchUrlReq.
:type return_fields: list[str]
"""
self._return_fields = return_fields
@property
def threshold(self):
"""Gets the threshold of this FaceSearchUrlReq.
人脸相似度阈值,低于这个阈值则不返回,取值范围0~1,一般情况下建议取值0.93,默认为0。
:return: The threshold of this FaceSearchUrlReq.
:rtype: float
"""
return self._threshold
@threshold.setter
def threshold(self, threshold):
"""Sets the threshold of this FaceSearchUrlReq.
人脸相似度阈值,低于这个阈值则不返回,取值范围0~1,一般情况下建议取值0.93,默认为0。
:param threshold: The threshold of this FaceSearchUrlReq.
:type threshold: float
"""
self._threshold = threshold
@property
def sort(self):
"""Gets the sort of this FaceSearchUrlReq.
[支持字段排序,参考[sort语法](https://support.huaweicloud.com/api-face/face_02_0013.html)。](tag:hc) [支持字段排序,参考[sort语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0013.html)。](tag:hk)
:return: The sort of this FaceSearchUrlReq.
:rtype: list[dict(str, str)]
"""
return self._sort
@sort.setter
def sort(self, sort):
"""Sets the sort of this FaceSearchUrlReq.
[支持字段排序,参考[sort语法](https://support.huaweicloud.com/api-face/face_02_0013.html)。](tag:hc) [支持字段排序,参考[sort语法](https://support.huaweicloud.com/intl/zh-cn/api-face/face_02_0013.html)。](tag:hk)
:param sort: The sort of this FaceSearchUrlReq.
:type sort: list[dict(str, str)]
"""
self._sort = sort
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
import simplejson as json
if six.PY2:
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
def __repr__(self):
"""For `print`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, FaceSearchUrlReq):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
|
[
"[email protected]"
] | |
87d375bbe50d0f9268ad0bf0297e41f7421d3d79
|
15581a76b36eab6062e71d4e5641cdfaf768b697
|
/LeetCode_30days_challenge/2021/June/Range Sum Query - Mutable.py
|
706b6b702cad1c3dea2e2ba9c84f32a5268dccbd
|
[] |
no_license
|
MarianDanaila/Competitive-Programming
|
dd61298cc02ca3556ebc3394e8d635b57f58b4d2
|
3c5a662e931a5aa1934fba74b249bce65a5d75e2
|
refs/heads/master
| 2023-05-25T20:03:18.468713 | 2023-05-16T21:45:08 | 2023-05-16T21:45:08 | 254,296,597 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 1,287 |
py
|
from math import sqrt, ceil
from typing import List
class NumArray:
def __init__(self, nums: List[int]):
self.nums = nums
n = len(self.nums)
bucket_length = sqrt(n)
self.nr_buckets = ceil(n / bucket_length)
self.buckets = [0] * int(self.nr_buckets)
for i in range(n):
self.buckets[i // self.nr_buckets] += self.nums[i]
def update(self, index: int, val: int) -> None:
self.buckets[index // self.nr_buckets] += val - self.nums[index]
self.nums[index] = val
def sumRange(self, left: int, right: int) -> int:
start_bucket = left // self.nr_buckets
end_bucket = right // self.nr_buckets
if start_bucket == end_bucket:
total_sum = sum(self.nums[left: right + 1])
else:
total_sum = sum(self.nums[left: (start_bucket + 1) * self.nr_buckets]) # sum from first bucket
total_sum += sum(self.buckets[start_bucket + 1: end_bucket]) # sum from middle buckets
total_sum += sum(self.nums[end_bucket * self.nr_buckets: right + 1]) # sum from last bucket
return total_sum
# Your NumArray object will be instantiated and called as such:
# obj = NumArray(nums)
# obj.update(index,val)
# param_2 = obj.sumRange(left,right)
|
[
"[email protected]"
] | |
e24ab3fbb279a18b2d432b73ba6fdaf38bdadad2
|
4142b8c513d87361da196631f7edd82f11465abb
|
/python/round710/1506A.py
|
da3092ef9ff672dc4336fef5ebbc1e8262b7e825
|
[] |
no_license
|
npkhanhh/codeforces
|
b52b66780426682ea1a3d72c66aedbe6dc71d7fe
|
107acd623b0e99ef0a635dfce3e87041347e36df
|
refs/heads/master
| 2022-02-08T17:01:01.731524 | 2022-02-07T10:29:52 | 2022-02-07T10:29:52 | 228,027,631 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 180 |
py
|
from sys import stdin
for _ in range(int(stdin.readline())):
n, m, x = list(map(int, stdin.readline().split()))
c, r = divmod(x-1, n)
res = r*m + c + 1
print(res)
|
[
"[email protected]"
] | |
8079f22284b0b8cc9f38a51756f95e1d311cbfdf
|
a6f1389c97705724e6b5cc40b0abd56c885b0335
|
/max_heap.py
|
413690f975be30b09a839f1f85a748181bfc5814
|
[] |
no_license
|
iosmichael/interview-prep
|
c80854a05d5b6d2cfba4321bcea9b68c6649790c
|
1635890b6f3ed6c132b3bf6e87f752d85d3280e1
|
refs/heads/master
| 2020-04-01T18:36:21.316874 | 2018-11-05T23:44:18 | 2018-11-05T23:44:18 | 153,502,988 | 1 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 2,063 |
py
|
'''
Coding challenges: build a max heap tree in 10 mins
Michael Liu
'''
class Heap(object):
def __init__(self, data):
#starting index is 1
self.data = [0]
self.nums = 0
for dat in data:
self.insert(dat)
def heapify(self, start):
if start >= len(self.data):
return
left_child_val = right_child_val = float('-inf')
if self.left_child(start) < len(self.data):
left_child_val = self.data[self.left_child(start)]
if self.right_child(start) < len(self.data):
right_child_val = self.data[self.right_child(start)]
if self.data[start] < max(left_child_val, right_child_val):
if left_child_val > right_child_val:
self.data[start], self.data[self.left_child(start)] = left_child_val, self.data[start]
self.heapify(self.left_child(start))
else:
self.data[start], self.data[self.right_child(start)] = right_child_val, self.data[start]
self.heapify(self.right_child(start))
def insert(self, i):
self.data.append(i)
if self.nums != 0:
self.data[1], self.data[len(self.data) - 1] = self.data[len(self.data)-1], self.data[1]
self.nums += 1
self.heapify_recursive(1)
def heapify_recursive(self, i):
self.heapify(i)
if self.right_child(i) < len(self.data):
self.heapify_recursive(self.right_child(i))
if self.left_child(i) < len(self.data):
self.heapify_recursive(self.left_child(i))
def print_heap(self, start):
queue = [("", start)]
while len(queue) != 0:
prefix, node = queue.pop(0)
print(prefix, self.data[node])
if self.left_child(node) < len(self.data):
queue.append((prefix + "-", self.left_child(node)))
if self.right_child(node) < len(self.data):
queue.append((prefix + "-", self.right_child(node)))
def left_child(self, n):
return 2 * n
def right_child(self, n):
return 2 * n + 1
def get_max(self):
max_num = self.data.pop(1)
self.nums -= 1
self.heapify_recursive(1)
return max_num
def main():
data = [1, 2, 5, 2, 3]
heap = Heap(data)
heap.print_heap(1)
for i in range(heap.nums):
print(heap.get_max())
if __name__ == '__main__':
main()
|
[
"[email protected]"
] | |
9a97bca1fc8062bacb8ad8f8f52f2f5c5cee640e
|
181247a52877d8577b3d2bf96ee9b2683c0a2edc
|
/client-python/producer/hello_world_producer_synchronously_with_call_back.py
|
cd550a4f958abc82ca358abc9c5a1d29300fd92e
|
[
"Apache-2.0"
] |
permissive
|
savadev/CCD-Apache-Kafka-Certification-Examination-Notes
|
65f9470510243a9ba328f0f3d8a2d7b2903ff1d9
|
2e35fdd0d289bd91ed618c7096d5fad7becfb928
|
refs/heads/master
| 2023-03-06T15:15:06.721867 | 2021-02-18T17:02:25 | 2021-02-18T17:02:25 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 681 |
py
|
import socket
from confluent_kafka import Producer
def call_back(err, msg):
if err is not None:
print("Failed to deliver message: %s: %s" % (str(msg), str(err)))
else:
print("Message produced: %s" % (str(msg)))
print("Topic name : ", msg.topic)
print("offset : ", msg.offset)
print("timestamp : ", msg.timestamp)
conf = {'bootstrap.servers': "broker-1:19092,broker-2:29092,broker-3:39092",
'client.id': socket.gethostname()}
producer = Producer(conf)
producer.produce(topic='hello-world-topic', key=None, value="Hello World from Python", callback=call_back)
producer.flush() # can be used to make writes synchronous.
|
[
"[email protected]"
] | |
8aa95cbddef9faac1d7bf8cbdf032a87e54da017
|
f0d713996eb095bcdc701f3fab0a8110b8541cbb
|
/u9mxp7LLxogAjAGDN_0.py
|
28bbdb4bb9a2a71820a11d6e89ebb428d9d40700
|
[] |
no_license
|
daniel-reich/turbo-robot
|
feda6c0523bb83ab8954b6d06302bfec5b16ebdf
|
a7a25c63097674c0a81675eed7e6b763785f1c41
|
refs/heads/main
| 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 1,085 |
py
|
"""
A numbers **factor length** is simply its total number of factors.
For instance:
3: 1, 3
# 3's factor length = 2
8: 1, 2, 4, 8
# 8's factor length = 4
36 : 1, 2, 3, 4, 6, 9, 12, 18, 36
# 36's factor length = 9
Create a function that sorts a list by **factor length** in **descending
order**. If multiple numbers have the same factor length, sort these numbers
in **descending order** , with the largest first.
In the example below, since 13 and 7 both have only 2 factors, we put 13 ahead
of 7.
factor_sort([9, 7, 13, 12]) ➞ [12, 9, 13, 7]
# 12 : 6, 9: 3, 13: 2, 7: 2
### Examples
factor_sort([1, 2, 31, 4]) ➞ [4, 31, 2, 1]
factor_sort([5, 7, 9]) ➞ [9, 7, 5]
factor_sort([15, 8, 2, 3]) ➞ [15, 8, 3, 2]
### Notes
Descending order: numbers with a higher factor length go before numbers with a
lower factor length.
"""
def factor_sort(nums):
nums=sorted([[factors(i),i] for i in nums])[::-1]
return [i[1] for i in nums]
def factors(num):
return len([i for i in range(1,num+1) if num%i==0])
|
[
"[email protected]"
] | |
34fe0b333f0f6e513fed9b4ab3192ffcbd9fcbb6
|
c97b9ae1bf06757ba61f90905e4d9b9dd6498700
|
/venv/Lib/site-packages/tensorflow/python/keras/preprocessing/__init__.py
|
7f6e4c8ba1fbc5e8264cf8618a5d1dc362f84d8d
|
[] |
no_license
|
Rahulk1p/image-processor
|
f7ceee2e3f66d10b2889b937cdfd66a118df8b5d
|
385f172f7444bdbf361901108552a54979318a2d
|
refs/heads/main
| 2023-03-27T10:09:46.080935 | 2021-03-16T13:04:02 | 2021-03-16T13:04:02 | 348,115,443 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 129 |
py
|
version https://git-lfs.github.com/spec/v1
oid sha256:e1ff166defb534fc907c2cf431350e914660a6c2560baffc884c51b97960f923
size 1575
|
[
"[email protected]"
] | |
5921315dca20310def35476bf2346d60bef6dca9
|
1577e1cf4e89584a125cffb855ca50a9654c6d55
|
/pyobjc/pyobjc/pyobjc-core-2.5.1/PyObjCTest/test_object_property.py
|
62ee7101437f9d3b762127e374de2ba01f703e46
|
[
"MIT"
] |
permissive
|
apple-open-source/macos
|
a4188b5c2ef113d90281d03cd1b14e5ee52ebffb
|
2d2b15f13487673de33297e49f00ef94af743a9a
|
refs/heads/master
| 2023-08-01T11:03:26.870408 | 2023-03-27T00:00:00 | 2023-03-27T00:00:00 | 180,595,052 | 124 | 24 | null | 2022-12-27T14:54:09 | 2019-04-10T14:06:23 | null |
UTF-8
|
Python
| false | false | 19,504 |
py
|
from __future__ import unicode_literals
from PyObjCTools.TestSupport import *
import objc
import copy
from PyObjCTest.fnd import *
objc.registerMetaDataForSelector(
b"NSObject", b"validateValue:forKey:error:",
dict(
arguments={
2: dict(type_modifier=objc._C_INOUT),
4: dict(type_modifier=objc._C_OUT),
},
))
class OCCopy (NSObject):
def copy(self):
return self.copyWithZone_(None)
def copyWithZone_(self, zone):
v = OCCopy.allocWithZone_(zone).init()
return v
class OCObserve (NSObject):
def init(self):
self = super(OCObserve, self).init()
self.values = []
self.registrations = []
return self
@property
def seen(self):
return { v[1]: v[2]['new'] for v in self.values }
def register(self, object, keypath):
object.addObserver_forKeyPath_options_context_(
self, keypath, 0x3, None)
self.registrations.append((object, keypath))
def unregister(self, object, keypath):
object.removeObserver_forKeyPath_(self, keypath)
def observeValueForKeyPath_ofObject_change_context_(
self, keypath, object, change, context):
# We don't get to keep the 'change' dictionary, make
# a copy (it gets reused in future calls)
new_change = {}
for k in change:
v = change[k]
if isinstance(v, (list, tuple, set)):
v = copy.copy(v)
new_change[k] = v
self.values.append((object, keypath, new_change))
def __enter__(self):
return self
def __exit__(self, type, value, traceback):
for o, k in self.registrations:
self.unregister(o, k)
self.registrations = []
class TestObjectProperty (TestCase):
def testCreation(self):
class OCTestObjectProperty1 (NSObject):
p1 = objc.object_property()
p2 = objc.object_property(copy=True)
p3 = objc.object_property(read_only=True)
p4 = objc.object_property(ivar='myp4')
p5 = objc.object_property(typestr=objc._C_INT)
p6 = objc.object_property(typestr=objc._C_DBL)
o = OCTestObjectProperty1.alloc().init()
self.assertTrue(o.respondsToSelector(b'p1'))
self.assertTrue(o.respondsToSelector(b'setP1:'))
v = OCCopy.alloc().init()
o.p1 = v
self.assertIs(o.p1, v)
self.assertIs(o._p1, v)
self.assertTrue(o.respondsToSelector(b'p2'))
self.assertTrue(o.respondsToSelector(b'setP2:'))
o.p2 = v
self.assertIsInstance(o.p2, OCCopy)
self.assertIsNot(o.p2, v)
self.assertIsNot(o._p2, v)
self.assertTrue(o.respondsToSelector(b'p3'))
self.assertFalse(o.respondsToSelector(b'setP3:'))
o._p3 = v
self.assertIs(o.p3, v)
self.assertTrue(o.respondsToSelector(b'p4'))
self.assertTrue(o.respondsToSelector(b'setP4:'))
o.p4 = v
self.assertIs(o.p4, v)
self.assertIs(o.myp4, v)
self.assertTrue(o.respondsToSelector(b'p5'))
self.assertTrue(o.respondsToSelector(b'setP5:'))
self.assertTrue(o.respondsToSelector(b'p6'))
self.assertTrue(o.respondsToSelector(b'setP6:'))
s = o.methodSignatureForSelector_(b'p5')
self.assertEqual(s.methodReturnType(), objc._C_INT)
s = o.methodSignatureForSelector_(b'p6')
self.assertEqual(s.methodReturnType(), objc._C_DBL)
def testDepends(self):
class OCTestObjectProperty2 (NSObject):
p1 = objc.object_property()
p2 = objc.object_property()
p3 = objc.object_property(read_only=True, depends_on=['p1', 'p2'])
@p3.getter
def p3(self):
return (self.p1 or '', self.p2 or '')
class OCTestObjectProperty2b (OCTestObjectProperty2):
p4 = objc.object_property()
@OCTestObjectProperty2.p3.getter
def p3(self):
return (self.p4 or '', self.p2 or '', self.p1 or '')
p3.depends_on('p4')
p5 = objc.object_property(read_only=True)
@p5.getter
def p5(self):
return "-%s-"%(self.p4,)
p5.depends_on('p4')
observer1 = OCObserve.alloc().init()
observer2 = OCObserve.alloc().init()
object1 = OCTestObjectProperty2.alloc().init()
object2 = OCTestObjectProperty2b.alloc().init()
v = type(object1).keyPathsForValuesAffectingP3()
self.assertIsInstance(v, objc.lookUpClass('NSSet'))
self.assertEqual(v, {'p1', 'p2'})
v = type(object2).keyPathsForValuesAffectingP3()
self.assertIsInstance(v, objc.lookUpClass('NSSet'))
self.assertEqual(v, {'p1', 'p2', 'p4'})
self.assertTrue(object1.respondsToSelector('p1'))
self.assertTrue(object1.respondsToSelector('setP1:'))
self.assertTrue(object1.respondsToSelector('p2'))
self.assertTrue(object1.respondsToSelector('setP2:'))
self.assertTrue(object1.respondsToSelector('p3'))
self.assertFalse(object1.respondsToSelector('setP3:'))
self.assertTrue(object2.respondsToSelector('p1'))
self.assertTrue(object2.respondsToSelector('setP1:'))
self.assertTrue(object2.respondsToSelector('p2'))
self.assertTrue(object2.respondsToSelector('setP2:'))
self.assertTrue(object2.respondsToSelector('p3'))
self.assertFalse(object2.respondsToSelector('setP3:'))
self.assertTrue(object2.respondsToSelector('p4'))
self.assertTrue(object2.respondsToSelector('setP4:'))
observer1.register(object1, 'p1')
observer1.register(object1, 'p2')
observer1.register(object1, 'p3')
observer2.register(object2, 'p1')
observer2.register(object2, 'p2')
observer2.register(object2, 'p3')
observer2.register(object2, 'p4')
observer2.register(object2, 'p5')
try:
self.assertEqual(observer1.values, [])
self.assertEqual(observer2.values, [])
object1.p1 = "a"
object1.p2 = "b"
self.assertEqual(object1.p3, ("a", "b"))
self.assertEqual(object1.pyobjc_instanceMethods.p3(), ("a", "b"))
object2.p1 = "a"
object2.p2 = "b"
object2.p4 = "c"
self.assertEqual(object2.p3, ("c", "b", "a"))
self.assertEqual(object2.pyobjc_instanceMethods.p3(), ("c", "b", "a"))
self.assertEqual(object2.pyobjc_instanceMethods.p4(), "c")
#seen = { v[1]: v[2]['new'] for v in observer1.values }
self.assertEqual(observer1.seen,
{'p1': 'a', 'p2': 'b', 'p3': ('a', 'b') })
#seen = { v[1]: v[2]['new'] for v in observer2.values }
self.assertEqual(observer2.seen,
{'p1': 'a', 'p2': 'b', 'p3': ('c', 'b', 'a'), 'p4': 'c', 'p5': '-c-' })
finally:
observer1.unregister(object1, 'p1')
observer1.unregister(object1, 'p2')
observer1.unregister(object1, 'p3')
observer2.unregister(object2, 'p1')
observer2.unregister(object2, 'p2')
observer2.unregister(object2, 'p3')
observer2.unregister(object2, 'p4')
observer2.unregister(object2, 'p5')
def testDepends2(self):
class OCTestObjectProperty2B (NSObject):
p1 = objc.object_property()
@p1.getter
def p1(self):
return self._p1
@p1.setter
def p1(self, v):
self._p1 = v
p2 = objc.object_property()
@p2.getter
def p2(self):
return self._p2
@p2.setter
def p2(self, v):
self._p2 = v
p3 = objc.object_property(read_only=True, depends_on=['p1', 'p2'])
@p3.getter
def p3(self):
return (self.p1 or '', self.p2 or '')
class OCTestObjectProperty2Bb (OCTestObjectProperty2B):
p4 = objc.object_property()
@OCTestObjectProperty2B.p1.getter
def p1(self):
return self._p1
@OCTestObjectProperty2B.p3.getter
def p3(self):
return (self.p4 or '', self.p2 or '', self.p1 or '')
p3.depends_on('p4')
observer1 = OCObserve.alloc().init()
observer2 = OCObserve.alloc().init()
object1 = OCTestObjectProperty2B.alloc().init()
object2 = OCTestObjectProperty2Bb.alloc().init()
v = type(object1).keyPathsForValuesAffectingP3()
self.assertIsInstance(v, objc.lookUpClass('NSSet'))
self.assertEqual(v, {'p1', 'p2'})
v = type(object2).keyPathsForValuesAffectingP3()
self.assertIsInstance(v, objc.lookUpClass('NSSet'))
self.assertEqual(v, {'p1', 'p2', 'p4'})
self.assertTrue(object1.respondsToSelector('p1'))
self.assertTrue(object1.respondsToSelector('setP1:'))
self.assertTrue(object1.respondsToSelector('p2'))
self.assertTrue(object1.respondsToSelector('setP2:'))
self.assertTrue(object1.respondsToSelector('p3'))
self.assertFalse(object1.respondsToSelector('setP3:'))
self.assertTrue(object2.respondsToSelector('p1'))
self.assertTrue(object2.respondsToSelector('setP1:'))
self.assertTrue(object2.respondsToSelector('p2'))
self.assertTrue(object2.respondsToSelector('setP2:'))
self.assertTrue(object2.respondsToSelector('p3'))
self.assertFalse(object2.respondsToSelector('setP3:'))
self.assertTrue(object2.respondsToSelector('p4'))
self.assertTrue(object2.respondsToSelector('setP4:'))
observer1.register(object1, 'p1')
observer1.register(object1, 'p2')
observer1.register(object1, 'p3')
observer2.register(object2, 'p1')
observer2.register(object2, 'p2')
observer2.register(object2, 'p3')
observer2.register(object2, 'p4')
try:
self.assertEqual(observer1.values, [])
self.assertEqual(observer2.values, [])
object1.p1 = "a"
object1.p2 = "b"
self.assertEqual(object1.p3, ("a", "b"))
self.assertEqual(object1.pyobjc_instanceMethods.p3(), ("a", "b"))
object2.p1 = "a"
object2.p2 = "b"
object2.p4 = "c"
self.assertEqual(object2.p3, ("c", "b", "a"))
self.assertEqual(object2.pyobjc_instanceMethods.p3(), ("c", "b", "a"))
self.assertEqual(object2.pyobjc_instanceMethods.p4(), "c")
#seen = { v[1]: v[2]['new'] for v in observer1.values }
self.assertEqual(observer1.seen,
{'p1': 'a', 'p2': 'b', 'p3': ('a', 'b') })
#seen = { v[1]: v[2]['new'] for v in observer2.values }
self.assertEqual(observer2.seen,
{'p1': 'a', 'p2': 'b', 'p3': ('c', 'b', 'a'), 'p4': 'c' })
finally:
observer1.unregister(object1, 'p1')
observer1.unregister(object1, 'p2')
observer1.unregister(object1, 'p3')
observer2.unregister(object2, 'p1')
observer2.unregister(object2, 'p2')
observer2.unregister(object2, 'p3')
observer2.unregister(object2, 'p4')
def testMethods(self):
l = []
class OCTestObjectProperty4 (NSObject):
p1 = objc.object_property()
@p1.getter
def p1(self):
l.append(('get',))
return self._p1 + '!'
@p1.setter
def p1(self, v):
l.append(('set', v))
self._p1 = v + '?'
@p1.validate
def p1(self, value, error):
if value == 1:
return (True, value, None)
else:
return (False, 2, "snake")
class OCTestObjectProperty4b (OCTestObjectProperty4):
@OCTestObjectProperty4.p1.validate
def p1(self, value, error):
if value == 2:
return (True, value, None)
else:
return (False, 2, "monty")
o = OCTestObjectProperty4.alloc().init()
o.p1 = 'f'
self.assertEqual(o.p1, 'f?!')
self.assertEqual(o._p1, 'f?')
self.assertEqual(l, [('set', 'f'), ('get',)])
ok, value, error = o.validateValue_forKey_error_(
1, 'p1', None)
self.assertTrue(ok)
self.assertEqual(value, 1)
self.assertEqual(error, None)
ok, value, error = o.validateValue_forKey_error_(
9, 'p1', None)
self.assertFalse(ok)
self.assertEqual(value, 2)
self.assertEqual(error, "snake")
l = []
o = OCTestObjectProperty4b.alloc().init()
o.p1 = 'f'
self.assertEqual(o.p1, 'f?!')
self.assertEqual(o._p1, 'f?')
self.assertEqual(l, [('set', 'f'), ('get',)])
ok, value, error = o.validateValue_forKey_error_(
2, 'p1', None)
self.assertTrue(ok)
self.assertEqual(value, 2)
self.assertEqual(error, None)
ok, value, error = o.validateValue_forKey_error_(
9, 'p1', None)
self.assertFalse(ok)
self.assertEqual(value, 2)
self.assertEqual(error, "monty")
def testNative(self):
l = []
class OCTestObjectProperty7 (NSObject):
p1 = objc.object_property()
@p1.getter
def p1(self):
l.append('get')
return self._p1
@p1.setter
def p1(self, value):
l.append('set')
self._p1 = value
o = OCTestObjectProperty7.alloc().init()
o.setValue_forKey_(42, 'p1')
self.assertEqual(o._p1, 42)
o._p1 = "monkey"
v = o.valueForKey_('p1')
self.assertEqual(v, "monkey")
self.assertEqual(l, ["set", "get"])
def testDynamic(self):
class OCTestObjectProperty8 (NSObject):
p1 = objc.object_property(dynamic=True)
p2 = objc.object_property(dynamic=True, typestr=objc._C_NSBOOL)
self.assertFalse(OCTestObjectProperty8.instancesRespondToSelector_(b"p1"))
self.assertFalse(OCTestObjectProperty8.instancesRespondToSelector_(b"setP1:"))
self.assertFalse(OCTestObjectProperty8.instancesRespondToSelector_(b"isP2"))
self.assertFalse(OCTestObjectProperty8.instancesRespondToSelector_(b"setP2:"))
v = [42]
def getter(self):
return v[0]
def setter(self, value):
v[0] = value
OCTestObjectProperty8.p1 = getter
OCTestObjectProperty8.setP1_ = setter
v2 = [False]
def getter2(self):
return v2[0]
def setter2(self, value):
v2[0] = bool(value)
OCTestObjectProperty8.isP2 = getter2
OCTestObjectProperty8.setP2_ = setter2
self.assertTrue(OCTestObjectProperty8.instancesRespondToSelector_(b"p1"))
self.assertTrue(OCTestObjectProperty8.instancesRespondToSelector_(b"setP1:"))
self.assertTrue(OCTestObjectProperty8.instancesRespondToSelector_(b"isP2"))
self.assertTrue(OCTestObjectProperty8.instancesRespondToSelector_(b"setP2:"))
o = OCTestObjectProperty8.alloc().init()
self.assertIsInstance(OCTestObjectProperty8.p1, objc.object_property)
self.assertIsInstance(OCTestObjectProperty8.p2, objc.object_property)
self.assertEqual(o.p1, 42)
self.assertEqual(o.p2, False)
o.p1 = 99
o.p2 = True
self.assertEqual(o.p1, 99)
self.assertEqual(v[0], 99)
self.assertEqual(o.p2, True)
self.assertEqual(v2[0], True)
def testReadOnly(self):
class OCTestObjectProperty3 (NSObject):
p1 = objc.object_property(read_only=True)
o = OCTestObjectProperty3.alloc().init()
self.assertRaises(ValueError, setattr, o, 'p1', 42)
def testSubclass(self):
class OCTestObjectProperty5 (NSObject):
p1 = objc.object_property(read_only=True)
p2 = objc.object_property()
p3 = objc.object_property(read_only=True, typestr=objc._C_NSBOOL)
class OCTestObjectProperty6 (OCTestObjectProperty5):
@OCTestObjectProperty5.p1.setter
def p1(self, value):
self._p1 = value
@OCTestObjectProperty5.p2.setter
def p2(self, value):
self._p2 = value * 2
@OCTestObjectProperty5.p3.getter
def p3(self):
return not super(OCTestObjectProperty6, self).p3
base = OCTestObjectProperty5.alloc().init()
self.assertRaises(ValueError, setattr, base, 'p1', 1)
self.assertRaises(ValueError, setattr, base, 'p3', 1)
base.p2 = 'b'
self.assertEqual(base.p2, 'b')
sub = OCTestObjectProperty6.alloc().init()
sub.p1 = 1
sub.p2 = 'a'
sub._p3 = False
self.assertEqual(sub.p1, 1)
self.assertEqual(sub.p2, 'aa')
self.assertEqual(sub.p3, True)
self.assertTrue(base.respondsToSelector_(b'p2'))
self.assertFalse(base.respondsToSelector_(b'setP1:'))
self.assertTrue(base.respondsToSelector_(b'isP3'))
self.assertFalse(base.respondsToSelector_(b'p3'))
self.assertTrue(sub.respondsToSelector_(b'p2'))
self.assertTrue(sub.respondsToSelector_(b'setP1:'))
self.assertTrue(sub.respondsToSelector_(b'isP3'))
self.assertFalse(sub.respondsToSelector_(b'p3'))
try:
del sub.p3
except TypeError:
pass
else:
self.fail("Deleting an object_property shouldn't be possible")
def testDefaultSetterWithoutIvar(self):
try:
class OCTestObjectProperty7 (NSObject):
p1 = objc.object_property(ivar=objc.NULL)
except ValueError:
pass
else:
self.fail("ValueError not raised")
try:
class OCTestObjectProperty8 (NSObject):
p1 = objc.object_property(ivar=objc.NULL, read_only=True)
except ValueError:
pass
else:
self.fail("ValueError not raised")
try:
class OCTestObjectProperty9 (NSObject):
p1 = objc.object_property(read_only=True)
@p1.setter
def p1(self, v):
pass
except ValueError:
pass
else:
self.fail("ValueError not raised")
try:
class OCTestObjectProperty9 (NSObject):
p1 = objc.object_property(read_only=True)
@p1.validate
def p1(self, v):
pass
except ValueError:
pass
else:
self.fail("ValueError not raised")
class TestBoolProperty (TestCase):
def testDefault(self):
class OCTestBoolProperty1 (NSObject):
p1 = objc.bool_property()
o = OCTestBoolProperty1.alloc().init()
self.assertEqual(o.p1, False)
o.p1 = [1, 2]
self.assertEqual(o.p1, True)
if __name__ == "__main__":
main()
|
[
"[email protected]"
] | |
0b86ad91ba46470f01a77a8261beb4206834c864
|
2acf76ecc3ad14f5e0390df5db31ef17aecd91cb
|
/rookbook/server.py
|
0b0b1e320c2757bd07b2e2b819fe20de52671726
|
[] |
no_license
|
zielmicha/rookbook
|
420b2717a5d3d8b7968c41ca8296e37e3ce6b5ec
|
a54d693a83db88d0f7aabfe58ee01513e531bdb1
|
refs/heads/master
| 2020-12-22T15:40:13.499835 | 2020-02-15T18:03:17 | 2020-02-15T18:03:17 | 220,621,406 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 5,224 |
py
|
import asyncio, http, os, io, glob, websockets, json
from lxml import etree
from . import book
def get_static(content_type, path):
with open(path, 'rb') as f:
return http.HTTPStatus.OK, [('content-type', content_type)], f.read()
static_file_map = {
'/static/index.js': ('text/javascript', 'client/dist/index.js'),
'/static/index.js.map': ('text/javascript', 'client/dist/index.js.map'),
'/static/react.js': ('text/javascript', 'client/node_modules/react/umd/react.development.js'),
'/static/react-dom.js': ('text/javascript', 'client/node_modules/react-dom/umd/react-dom.development.js'),
'/static/style.css': ('text/css', 'client/style.css'),
}
class WebServer:
def __init__(self, handler):
self.handler = handler
async def process_request(self, path, request_headers):
path = path.split('?')[0]
base_dir = os.path.dirname(__file__) + '/..'
if path == "/":
return get_static('text/html', os.path.join(base_dir, 'client/index.html'))
if path in static_file_map:
mime_type, local_path = static_file_map[path]
return get_static(mime_type, os.path.join(base_dir, local_path))
if path != "/websocket":
return http.HTTPStatus.NOT_FOUND, [], b'not found'
async def handle_websocket(self, websocket, path):
if path == '/websocket':
await self.handler.run(websocket)
def main(self, host, port):
start_server = websockets.serve(
self.handle_websocket, host, port, process_request=self.process_request,
origins=['http://%s:%d' % (host, port), 'https://%s:%d' % (host, port)] # type: ignore
)
asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()
class Handler:
def __init__(self, book):
self.book = book
self.websockets = []
async def run(self, websocket):
await self.send_full_update(websocket)
self.websockets.append(websocket)
try:
async for msg in websocket:
await self.handle_message(websocket, msg)
finally:
self.websockets.remove(websocket)
async def send_full_update(self, websocket):
document = self.book.get_document_text()
print('send', document)
await websocket.send(json.dumps({'type': 'document', 'data': '<!-- gen -->\n' + document}))
for id, widget in self.book.widgets.items():
await websocket.send(json.dumps({'type': 'data', 'id': id,
'data': widget.data_json,
'header': widget.header_json}))
async def full_update(self):
# TODO: async
for ws in self.websockets:
await self.send_full_update(ws)
async def send_result(self, websocket, req, data):
await websocket.send(json.dumps({
'type': 'response',
'id': req['call_id'],
'data': data
}))
async def handle_message(self, websocket, msg_data):
print('msg', msg_data)
msg = json.loads(msg_data)
if msg['type'] == 'set':
self.book.set(msg['path'], msg['value'])
await self.full_update()
await websocket.send(json.dumps({'type': 'set-done', 'epoch': msg['epoch']}))
elif msg['type'] == 'action':
self.book.action(msg['path'], msg['value'])
await self.full_update()
elif msg['type'] == 'doc-add-widget':
self.book.doc_add_widget(parent_id=msg['parentId'], element_name=msg['element'])
await self.full_update()
elif msg['type'] == 'doc-set-text':
self.book.doc_set_text(selector=msg['selector'], new_value=msg['new_value'])
await self.full_update()
elif msg['type'] == 'doc-delete':
self.book.doc_delete(selector=msg['selector'])
await self.full_update()
elif msg['type'] == 'doc-add':
parser = etree.XMLParser(remove_blank_text=True)
self.book.doc_add(selector=msg['selector'], element=etree.XML(msg['xml'], parser=parser))
await self.full_update()
elif msg['type'] == 'doc-set-attr':
self.book.doc_set_attr(selector=msg['selector'], attrs=msg['attrs'])
await self.full_update()
elif msg['type'] == 'doc-replace-xml':
parser = etree.XMLParser(remove_blank_text=True)
try:
xml = etree.XML(msg['new_xml'], parser=parser)
except Exception:
await self.send_result(websocket, msg, {'error': 'failed to parse XML'})
else:
self.book.doc_replace_xml(msg['selector'], xml)
await self.send_result(websocket, msg, {'ok': True})
await self.full_update()
else:
print('unknown message', msg)
if __name__ == '__main__':
import sys
book = book.Book(document_path=sys.argv[1], data_path=sys.argv[2])
book.refresh()
from . import common
common.start_asyncio_ipython(local_ns=globals())
WebServer(Handler(book)).main('localhost', 5000)
|
[
"[email protected]"
] | |
64bfcbf215c590084465eb89247384375d351ee7
|
227c102ed508ad2b1d046340dcb598a7b16e2925
|
/.history/Forritun/Verkefni með einkunn/Lokaverkefni/lokaverkefni_20201208144201.py
|
a4d6050c43a57fc0f23f14ca71f758d8cfae2236
|
[] |
no_license
|
larusarmann/Skoli-haust-2020
|
298e48f1c20d7ec0c92124018650253f13bcbb2f
|
3061a0238b74919daccaa74117bc1c32b3436619
|
refs/heads/master
| 2023-02-07T09:15:45.493928 | 2020-12-09T19:46:53 | 2020-12-09T19:46:53 | 292,543,006 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 8,975 |
py
|
"""
Show how to do enemies in a platformer
Artwork from: http://kenney.nl
Tiled available from: http://www.mapeditor.org/
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.sprite_enemies_in_platformer
"""
import random
import arcade
import os
SPRITE_SCALING_coin=12
SPRITE_SCALING = 0.5
SPRITE_NATIVE_SIZE = 128
SPRITE_SIZE = int(SPRITE_NATIVE_SIZE * SPRITE_SCALING)
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
SCREEN_TITLE = "Lárus"
VIEWPORT_MARGIN = 40
RIGHT_MARGIN = 150
MOVEMENT_SPEED = 5
JUMP_SPEED = 14
GRAVITY = 0.5
class MyGame(arcade.Window):
""" Main application class. """
def __init__(self):
"""
Initializer
"""
super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, "Lokaverkefni Lárus")
# Sprite lists
self.coin_list = None
self.player_list = None
self.wall_list = None
self.flag=True
self.score = 0
# Set up the player
self.player_sprite = None
# This variable holds our simple "physics engine"
self.physics_engine = None
# Manage the view port
self.view_left = 0
self.view_bottom = 0
def setup(self):
""" Set up the game and initialize the variables. """
self.wall_list = arcade.SpriteList()
self.enemy_list = arcade.SpriteList()
self.player_list = arcade.SpriteList()
self.coin_list = arcade.SpriteList()
for x in range(0, SCREEN_WIDTH, SPRITE_SIZE):
wall = arcade.Sprite("C:/Git/Skoli-haust-2020/Forritun/Verkefni með einkunn/Lokaverkefni/images/rpgTile019.png", SPRITE_SCALING)
wall.bottom = 0
wall.left = x
self.wall_list.append(wall)
# Draw the platform
for x in range(SPRITE_SIZE * 3, SPRITE_SIZE * 8, SPRITE_SIZE):
wall = arcade.Sprite("C:/Git/Skoli-haust-2020/Forritun/Verkefni með einkunn/Lokaverkefni/images/rpgTile019.png", SPRITE_SCALING)
wall.bottom = SPRITE_SIZE * 3
wall.left = x
self.wall_list.append(wall)
# Draw the crates
for x in range(0, SCREEN_WIDTH, SPRITE_SIZE * 5):
wall = arcade.Sprite("C:/Git/Skoli-haust-2020/Forritun/Verkefni með einkunn/Lokaverkefni/images/boxCrate_double.png", SPRITE_SCALING)
wall.bottom = SPRITE_SIZE
wall.left = x
self.wall_list.append(wall)
for i in range(7):
# Create the coin instance
coin = arcade.Sprite("C:\Git\Skoli-haust-2020\Forritun\Verkefni með einkunn\Lokaverkefni\images\coinGold.png", SPRITE_SCALING / 2)
# Position the coin
coin.center_x = random.randrange(SCREEN_WIDTH)
coin.center_y = random.randrange(600)
# Add the coin to the lists
self.coin_list.append(coin)
# -- Draw an enemy on the ground
enemy = arcade.Sprite("C:/Git/Skoli-haust-2020/Forritun/Verkefni með einkunn/Lokaverkefni/images/character_zombie_idle.png", SPRITE_SCALING)
enemy.bottom = SPRITE_SIZE
enemy.left = SPRITE_SIZE * 2
# Set enemy initial speed
enemy.change_x = 2
self.enemy_list.append(enemy)
# -- Draw a enemy on the platform
enemy = arcade.Sprite("C:/Git/Skoli-haust-2020/Forritun/Verkefni með einkunn/Lokaverkefni/images/character_zombie_idle.png", SPRITE_SCALING)
enemy.bottom = SPRITE_SIZE * 4
enemy.left = SPRITE_SIZE * 4
# Set boundaries on the left/right the enemy can't cross
enemy.boundary_right = SPRITE_SIZE * 8
enemy.boundary_left = SPRITE_SIZE * 3
enemy.change_x = 2
self.enemy_list.append(enemy)
# -- Set up the player
self.player_sprite = arcade.Sprite("C:/Git/Skoli-haust-2020/Forritun/Verkefni með einkunn/Lokaverkefni/images/character1.png", SPRITE_SCALING)
self.player_list.append(self.player_sprite)
# Starting position of the player
self.player_sprite.center_x = 64
self.player_sprite.center_y = 270
self.physics_engine = arcade.PhysicsEnginePlatformer(self.player_sprite,
self.wall_list,
gravity_constant=GRAVITY)
# Set the background color
arcade.set_background_color(arcade.color.AMAZON)
def on_draw(self):
arcade.start_render()
if self.flag:
arcade.set_background_color(arcade.color.BLUE)
arcade.draw_text("Lárus Ármann Kjartansson\n Ýttu á Q til að hefja leik", 10,300, arcade.color.WHITE, 24)
elif self.score >=5 and self.flag==False:
arcade.set_background_color(arcade.color.BUBBLES)
arcade.draw_text("Leik lokið ",self.view_left+200,self.view_bottom+300, arcade.color.CHERRY, 44)
arcade.draw_text("Leik lokið ",self.view_left+200,self.view_bottom+300, arcade.color.CHERRY, 44)
else:
arcade.set_background_color(arcade.color.AMAZON)
self.wall_list.draw()
self.player_list.draw()
arcade.draw_text(f"stig: {self.score}", self.player_sprite.center_x-15,self.player_sprite.center_y+30, arcade.color.WHITE, 14)
arcade.draw_text(f"stig: {self.score}", self.player_sprite.center_x-15,self.player_sprite.center_y+30, arcade.color.WHITE, 14)
self.coin_list.draw()
def draw_game(self):
"""
Draw all the sprites, along with the score.
"""
# Draw all the sprites.
self.player_list.draw()
self.coin_list.draw()
# Put the text on the screen.
output = f"Score: {self.score}"
arcade.draw_text(output, 10, 20, arcade.color.WHITE, 14)
def on_key_press(self, key, modifiers):
"""
Called whenever the mouse moves.
"""
if key == arcade.key.Q:
self.flag=False
else:
if key == arcade.key.UP:
if self.physics_engine.can_jump():
self.player_sprite.change_y = JUMP_SPEED
elif key == arcade.key.LEFT:
self.player_sprite.change_x = -MOVEMENT_SPEED
elif key == arcade.key.RIGHT:
self.player_sprite.change_x = MOVEMENT_SPEED
def on_key_release(self, key, modifiers):
"""
Called when the user presses a mouse button.
"""
if key == arcade.key.LEFT or key == arcade.key.RIGHT:
self.player_sprite.change_x = 0
def on_update(self, delta_time):
self.physics_engine.update()
self.coin_list.update()
hit_list = arcade.check_for_collision_with_list(self.player_sprite, self.coin_list)
if len(hit_list)>0:
for pening in hit_list:
pening.remove_from_sprite_lists()
self.score=self.score+1
# --- Manage Scrolling ---
# Keep track of if we changed the boundary. We don't want to call the
# set_viewport command if we didn't change the view port.
changed = False
# Scroll left
left_boundary = self.view_left + VIEWPORT_MARGIN
if self.player_sprite.left < left_boundary:
self.view_left -= left_boundary - self.player_sprite.left
changed = True
# Scroll right
right_boundary = self.view_left + SCREEN_WIDTH - VIEWPORT_MARGIN
if self.player_sprite.right > right_boundary:
self.view_left += self.player_sprite.right - right_boundary
changed = True
# Scroll up
top_boundary = self.view_bottom + SCREEN_HEIGHT - VIEWPORT_MARGIN
if self.player_sprite.top > top_boundary:
self.view_bottom += self.player_sprite.top - top_boundary
changed = True
# Scroll down
bottom_boundary = self.view_bottom + VIEWPORT_MARGIN
if self.player_sprite.bottom < bottom_boundary:
self.view_bottom -= bottom_boundary - self.player_sprite.bottom
changed = True
# Make sure our boundaries are integer values. While the view port does
# support floating point numbers, for this application we want every pixel
# in the view port to map directly onto a pixel on the screen. We don't want
# any rounding errors.
self.view_left = int(self.view_left)
self.view_bottom = int(self.view_bottom)
# If we changed the boundary values, update the view port to match
if changed:
arcade.set_viewport(self.view_left,
SCREEN_WIDTH + self.view_left - 1,
self.view_bottom,
SCREEN_HEIGHT + self.view_bottom - 1)
def main():
window = MyGame()
window.setup()
arcade.run()
if __name__ == "__main__":
main()
|
[
"[email protected]"
] | |
b6742a605d30a14b56ddc7e9c2752801f04823cb
|
078de01daa97d413ec91629fc553fd637404d4d1
|
/manage.py
|
d12027a6383577ddef48b217627464e888080be8
|
[] |
no_license
|
crowdbotics-apps/test-user-1975
|
c6e91cf4b0940630a5906df6e5085a789be5493e
|
bff22c4c5c825c158f166303aa34d421a3572f97
|
refs/heads/master
| 2022-12-11T05:57:00.701120 | 2019-04-05T17:17:46 | 2019-04-05T17:17:46 | 179,724,618 | 0 | 0 | null | 2022-12-08T05:00:06 | 2019-04-05T17:17:14 |
Python
|
UTF-8
|
Python
| false | false | 812 |
py
|
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_user_1975.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
# issue is really that Django is missing to avoid masking other
# exceptions on Python 2.
try:
import django
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
)
raise
execute_from_command_line(sys.argv)
|
[
"[email protected]"
] | |
e9e91d9998570c5d120492877e7906cd0fd27a61
|
3c52eb24728edf054842c162153c92d2a77dac4a
|
/Q1/boy.py
|
aa5090666e6314fc8cb060dc6385b28d393466f7
|
[] |
no_license
|
PPL-IIITA/ppl-assignment-shyam000
|
53afeacc94905e46713b710a9d162c364a08f896
|
8512c533ff3a0e43eb4913494238da10590101fb
|
refs/heads/master
| 2021-01-21T05:29:06.520958 | 2017-02-27T06:18:18 | 2017-02-27T06:18:18 | 83,195,331 | 0 | 1 | null | null | null | null |
UTF-8
|
Python
| false | false | 717 |
py
|
class Boy:
def __init__ (self,name,attractiveness,reqAttractiveness,Type,intelligence,budget):
self.name = name
self.attractiveness = attractiveness
self.reqAttractiveness = reqAttractiveness
self.Type = Type
self.intelligence = intelligence
self.status = 'single'
self.budget = budget
self.gfName = ''
self.happiness = 0
self.gfBudget = 0
def set_gf(self,gf):
self.gfName = gf
def changegfBudget(self,gfBudget):
self.gfBudget = gfBudget
def set_happiness(self,happiness) :
self.happiness = happiness
def isEligible(self,maintainanceBudget,attractiveness):
if(self.budget >= maintainanceBudget) and (attractiveness >= self.reqAttractiveness):
return True
else:
return False
|
[
"[email protected]"
] | |
cd4ca89e51565e52a8b8011f9f6f3158fa32f12c
|
7619aed8a311e2832634379762c373886f4354fb
|
/trace_floodlight_firewall-StarTopology4-steps200/openflow_replay_config.py
|
ab27d1ba43e9fb1c43662952cef93ba8dda5abba
|
[] |
no_license
|
jmiserez/sdnracer-traces
|
b60f8588277c4dc2dad9fe270c05418c47d229b3
|
8991eee19103c8ebffd6ffe15d88dd8c25e1aad5
|
refs/heads/master
| 2021-01-21T18:21:32.040221 | 2015-12-15T14:34:46 | 2015-12-15T14:34:46 | 39,391,225 | 2 | 1 | null | null | null | null |
UTF-8
|
Python
| false | false | 1,095 |
py
|
from config.experiment_config_lib import ControllerConfig
from sts.topology import *
from sts.control_flow.openflow_replayer import OpenFlowReplayer
from sts.simulation_state import SimulationConfig
from sts.input_traces.input_logger import InputLogger
simulation_config = SimulationConfig(controller_configs=[ControllerConfig(start_cmd='java -ea -Dlogback.configurationFile=./src/main/resources/logback-trace.xml -jar ./target/floodlight.jar -cf ./src/main/resources/trace_firewall.properties', label='c1', address='127.0.0.1', cwd='../floodlight')],
topology_class=StarTopology,
topology_params="num_hosts=4",
patch_panel_class=BufferedPatchPanel,
multiplex_sockets=False,
ignore_interposition=False,
kill_controllers_on_exit=True)
control_flow = OpenFlowReplayer(simulation_config, "paper/trace_floodlight_firewall-StarTopology4-steps200/events.trace")
# wait_on_deterministic_values=False
# delay_flow_mods=False
# Invariant check: 'InvariantChecker.check_liveness'
# Bug signature: ""
|
[
"[email protected]"
] | |
6d6f18f23f0bfa640e44315af45fd2070e03b6ba
|
d2e80a7f2d93e9a38f37e70e12ff564986e76ede
|
/Python-cookbook-2nd/cb2_03/cb2_3_3_sol_1.py
|
427c0a4f54818660fbf6defaa71b60562dcd4147
|
[] |
no_license
|
mahavivo/Python
|
ceff3d173948df241b4a1de5249fd1c82637a765
|
42d2ade2d47917ece0759ad83153baba1119cfa1
|
refs/heads/master
| 2020-05-21T10:01:31.076383 | 2018-02-04T13:35:07 | 2018-02-04T13:35:07 | 54,322,949 | 5 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 183 |
py
|
from dateutil import rrule
import datetime
def weeks_between(start_date, end_date):
weeks = rrule.rrule(rrule.WEEKLY, dtstart=start_date, until=end_date)
return weeks.count()
|
[
"[email protected]"
] | |
e249e15b4e945f227280d87a8fd0c22f5f5404fa
|
402ac64e93d36c2e4ea88f32f50d0b47b84dc16f
|
/TwitterClone/tweets/admin.py
|
5e5f25a495a07f134b9f7f0158356e3431f4e728
|
[] |
no_license
|
akashgiricse/TwitterClone
|
e430e8eb7bfe7e60f3be5c2cf56138457bcb5028
|
8fb3edb36aa54aa81737284d0379112f457ce08f
|
refs/heads/master
| 2021-04-18T20:44:00.335872 | 2018-05-16T18:00:00 | 2018-05-16T18:00:00 | 126,720,678 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 281 |
py
|
from django.contrib import admin
# Register your models here.
from .forms import TweetModelForm
from .models import Tweet
# admin.site.register(Tweet)
class TweetModelAdmin(admin.ModelAdmin):
class Meta:
model = Tweet
admin.site.register(Tweet, TweetModelAdmin)
|
[
"[email protected]"
] | |
5b7d4eb4a9269304bd4ad33203096ae1001fdfe7
|
24a291e5eb298b7c2b4f1105d789ac488457b59c
|
/Python_Pandas_Basics/Pandas07_11_setIndex01_김민교.py
|
90f6885de1a89b2c7dc304d78b8b0afa18265359
|
[] |
no_license
|
gmrdns03/Python-Introductory-Course_Minkyo
|
da3afff502ed44f178d5b3885fbb1b01249ad1de
|
ef0d4e16aee3dba6a4a10c422ef68b1465745833
|
refs/heads/main
| 2023-05-29T16:08:31.814542 | 2021-06-23T13:32:14 | 2021-06-23T13:32:14 | 379,300,979 | 1 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 698 |
py
|
# coding: utf-8
# '''index / set_index / reindex / reset_index'''
# In[2]:
import pandas as pd
exam_data = {'이름':['서준', '우현', '인아'],
'수학' : [90,80,70],
'영어' : [98,89,95],
'음악': [85,95,100],
'체육': [100,90,90]}
df = pd.DataFrame(exam_data)
print(df, '\n')
# In[5]:
# 특정 열을 데이터프레임의 행 인덱스로 설정
ndf = df.set_index(['이름'])
print(ndf, '\n')
print('='*30)
ndf2 = ndf.set_index('음악')
print(ndf2, '\n')
print('='*30)
ndf3 = ndf.set_index(['수학', '음악'])
print(ndf3, '\n')
print('='*30)
ndf4 = df.set_index(['음악', '체육'])
print(ndf4, '\n')
print('='*30)
|
[
"[email protected]"
] | |
e14231b7aba338f8d2f8abff1314626b808ee9d9
|
5c724d6e03e4194680c793718a4f72a58ca66bb1
|
/app/migrations/0151_auto_20181026_0352.py
|
1a09b05d842c68193239fc5054aad9abce6d0427
|
[] |
no_license
|
tigrezhito1/bat
|
26002de4540bb4eac2751a31171adc45687f4293
|
0ea6b9b85e130a201c21eb6cbf09bc21988d6443
|
refs/heads/master
| 2020-05-02T07:13:06.936015 | 2019-03-26T15:04:17 | 2019-03-26T15:04:17 | 177,812,144 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 602 |
py
|
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2018-10-26 08:52
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0150_auto_20181026_0346'),
]
operations = [
migrations.AlterField(
model_name='produccion',
name='fecha',
field=models.DateTimeField(default=datetime.datetime(2018, 10, 26, 3, 52, 22, 789940), editable=False, help_text='Fecha de recepci\xf3n de la llamada (No se puede modificar)'),
),
]
|
[
"[email protected]"
] | |
5bd58a8d3db1ba70468d22d0b32b71b4eea15847
|
bad62c2b0dfad33197db55b44efeec0bab405634
|
/sdk/scvmm/azure-mgmt-scvmm/azure/mgmt/scvmm/aio/_scvmm.py
|
1d467ccbda4e3a25f2e6b6fd7ba5f5ed89a4ec01
|
[
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] |
permissive
|
test-repo-billy/azure-sdk-for-python
|
20c5a2486456e02456de17515704cb064ff19833
|
cece86a8548cb5f575e5419864d631673be0a244
|
refs/heads/master
| 2022-10-25T02:28:39.022559 | 2022-10-18T06:05:46 | 2022-10-18T06:05:46 | 182,325,031 | 0 | 0 |
MIT
| 2019-07-25T22:28:52 | 2019-04-19T20:59:15 |
Python
|
UTF-8
|
Python
| false | false | 6,185 |
py
|
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from copy import deepcopy
from typing import Any, Awaitable, TYPE_CHECKING
from msrest import Deserializer, Serializer
from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from .. import models
from ._configuration import SCVMMConfiguration
from .operations import AvailabilitySetsOperations, CloudsOperations, InventoryItemsOperations, Operations, VirtualMachineTemplatesOperations, VirtualMachinesOperations, VirtualNetworksOperations, VmmServersOperations
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
class SCVMM: # pylint: disable=too-many-instance-attributes
"""The Microsoft.ScVmm Rest API spec.
:ivar vmm_servers: VmmServersOperations operations
:vartype vmm_servers: azure.mgmt.scvmm.aio.operations.VmmServersOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.scvmm.aio.operations.Operations
:ivar clouds: CloudsOperations operations
:vartype clouds: azure.mgmt.scvmm.aio.operations.CloudsOperations
:ivar virtual_networks: VirtualNetworksOperations operations
:vartype virtual_networks: azure.mgmt.scvmm.aio.operations.VirtualNetworksOperations
:ivar virtual_machines: VirtualMachinesOperations operations
:vartype virtual_machines: azure.mgmt.scvmm.aio.operations.VirtualMachinesOperations
:ivar virtual_machine_templates: VirtualMachineTemplatesOperations operations
:vartype virtual_machine_templates:
azure.mgmt.scvmm.aio.operations.VirtualMachineTemplatesOperations
:ivar availability_sets: AvailabilitySetsOperations operations
:vartype availability_sets: azure.mgmt.scvmm.aio.operations.AvailabilitySetsOperations
:ivar inventory_items: InventoryItemsOperations operations
:vartype inventory_items: azure.mgmt.scvmm.aio.operations.InventoryItemsOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g.
00000000-0000-0000-0000-000000000000).
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2020-06-05-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
def __init__(
self,
credential: "AsyncTokenCredential",
subscription_id: str,
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
self._config = SCVMMConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.vmm_servers = VmmServersOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.clouds = CloudsOperations(self._client, self._config, self._serialize, self._deserialize)
self.virtual_networks = VirtualNetworksOperations(self._client, self._config, self._serialize, self._deserialize)
self.virtual_machines = VirtualMachinesOperations(self._client, self._config, self._serialize, self._deserialize)
self.virtual_machine_templates = VirtualMachineTemplatesOperations(self._client, self._config, self._serialize, self._deserialize)
self.availability_sets = AvailabilitySetsOperations(self._client, self._config, self._serialize, self._deserialize)
self.inventory_items = InventoryItemsOperations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(
self,
request: HttpRequest,
**kwargs: Any
) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.
>>> from azure.core.rest import HttpRequest
>>> request = HttpRequest("GET", "https://www.example.org/")
<HttpRequest [GET], url: 'https://www.example.org/'>
>>> response = await client._send_request(request)
<AsyncHttpResponse: 200 OK>
For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
:param request: The network request you want to make. Required.
:type request: ~azure.core.rest.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.rest.AsyncHttpResponse
"""
request_copy = deepcopy(request)
request_copy.url = self._client.format_url(request_copy.url)
return self._client.send_request(request_copy, **kwargs)
async def close(self) -> None:
await self._client.close()
async def __aenter__(self) -> "SCVMM":
await self._client.__aenter__()
return self
async def __aexit__(self, *exc_details) -> None:
await self._client.__aexit__(*exc_details)
|
[
"[email protected]"
] | |
6124ae92af04400051ec38844b0db31b8b940b49
|
80fd6511bce02d3809d4d4fbb5d9879c09f9a535
|
/ui.py
|
27e0ab6b55b271bc9ad37f96f54b62344e44e300
|
[] |
no_license
|
BennyKok/uv-align-distribute
|
bb5aa210d983bd9f97500dda8a8f05131d72ed5d
|
1aad31c487612f86bb42bc9d5d399636450b452e
|
refs/heads/master
| 2021-01-14T09:49:57.430336 | 2015-12-07T14:42:22 | 2015-12-07T14:42:22 | 66,824,994 | 0 | 0 | null | 2016-08-29T08:18:37 | 2016-08-29T08:18:37 | null |
UTF-8
|
Python
| false | false | 2,445 |
py
|
import bpy
##############
# UI
##############
class IMAGE_PT_align_distribute(bpy.types.Panel):
bl_label = "Align\Distribute"
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'TOOLS'
bl_category = "Tools"
@classmethod
def poll(cls, context):
sima = context.space_data
return sima.show_uvedit and \
not (context.tool_settings.use_uv_sculpt
or context.scene.tool_settings.use_uv_select_sync)
def draw(self, context):
scn = context.scene
layout = self.layout
layout.prop(scn, "relativeItems")
layout.prop(scn, "selectionAsGroup")
layout.separator()
layout.label(text="Align:")
box = layout.box()
row = box.row(True)
row.operator("uv.align_left_margin", "Left")
row.operator("uv.align_vertical_axis", "VAxis")
row.operator("uv.align_right_margin", "Right")
row = box.row(True)
row.operator("uv.align_top_margin", "Top")
row.operator("uv.align_horizontal_axis", "HAxis")
row.operator("uv.align_low_margin", "Low")
row = layout.row()
row.operator("uv.align_rotation", "Rotation")
row.operator("uv.equalize_scale", "Eq. Scale")
layout.separator()
# Another Panel??
layout.label(text="Distribute:")
box = layout.box()
row = box.row(True)
row.operator("uv.distribute_ledges_horizontally", "LEdges")
row.operator("uv.distribute_center_horizontally",
"HCenters")
row.operator("uv.distribute_redges_horizontally",
"RCenters")
row = box.row(True)
row.operator("uv.distribute_tedges_vertically", "TEdges")
row.operator("uv.distribute_center_vertically", "VCenters")
row.operator("uv.distribute_bedges_vertically", "BEdges")
row = layout.row(True)
row.operator("uv.equalize_horizontal_gap", "Eq. HGap")
row.operator("uv.equalize_vertical_gap", "Eq. VGap")
#wip
#row = layout.row(True)
#row.operator("uv.remove_overlaps", "Remove Overlaps")
layout.separator()
layout.label("Others:")
row = layout.row()
layout.operator("uv.snap_islands")
row = layout.row()
layout.operator("uv.match_islands")
|
[
"none@none"
] |
none@none
|
cf7adeaaa9a4b1b387a721fea95dcb84be70228d
|
ad1d46b4ec75ef1f00520ff246d0706c6bb7770e
|
/content/chapters/transform-strings/07.py
|
b419a5904a6ca3411f46ba81c537f890f9dc5da1
|
[] |
no_license
|
roberto-arista/PythonForDesigners
|
036f69bae73095b6f49254255fc473a8ab7ee7bb
|
1a781ea7c7ee21e9c64771ba3bf5634ad550692c
|
refs/heads/master
| 2022-02-24T15:28:04.167558 | 2021-09-07T10:37:01 | 2021-09-07T10:37:01 | 168,937,263 | 103 | 37 | null | 2022-02-11T02:24:01 | 2019-02-03T11:17:51 |
Python
|
UTF-8
|
Python
| false | false | 209 |
py
|
# we import the euler constant from the math module
from math import e
# then we print the constant value
print(f'euler: {e}') # euler: 2.718281828459045
# note the different amount of digits after the period
|
[
"[email protected]"
] | |
dc4e1395791a3fc6b701292c2310211d746f2646
|
3e5150447a2c90c26354500f1df9660ef35c990b
|
/module/__file__.py
|
03884607358b6331a27ed05a5aa5839cc1a8627a
|
[] |
no_license
|
kilirobbs/python-fiddle
|
8d6417ebff9d6530e713b6724f8416da86c24c65
|
9c2f320bd2391433288cd4971c2993f1dd5ff464
|
refs/heads/master
| 2016-09-11T03:56:39.808358 | 2013-03-19T19:26:19 | 2013-03-19T19:26:19 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 28 |
py
|
import os
print os.__file__
|
[
"[email protected]"
] | |
026ef60b487bbe9b43329cf88076dd339b18923a
|
e0df2bc703d0d02423ea68cf0b8c8f8d22d5c163
|
/ScientificComputing/ch18/simple_pendulum_period.py
|
960c0d2dad9265076e26a94ed236db5197dc8fd7
|
[] |
no_license
|
socrates77-sh/learn
|
a5d459cb9847ba3b1bc4f9284ce35d4207d8aa8b
|
ae50978023f6b098b168b8cca82fba263af444aa
|
refs/heads/master
| 2022-12-16T16:53:50.231577 | 2019-07-13T13:52:42 | 2019-07-13T13:52:42 | 168,442,963 | 0 | 0 | null | 2022-12-08T05:18:37 | 2019-01-31T01:30:06 |
HTML
|
UTF-8
|
Python
| false | false | 980 |
py
|
# -*- coding: utf-8 -*-
from math import sin, sqrt
import numpy as np
from scipy.integrate import odeint
from scipy.optimize import fsolve
import pylab as pl
from scipy.special import ellipk
g = 9.8
def pendulum_equations(w, t, l):
th, v = w
dth = v
dv = - g/l * sin(th)
return dth, dv
def pendulum_th(t, l, th0):
track = odeint(pendulum_equations, (th0, 0), [0, t], args=(l,))
return track[-1, 0]
def pendulum_period(l, th0):
t0 = 2*np.pi*sqrt(l/g) / 4
t = fsolve(pendulum_th, t0, args=(l, th0))
return t*4
ths = np.arange(0, np.pi/2.0, 0.01)
periods = [pendulum_period(1, th) for th in ths]
periods2 = 4*sqrt(1.0/g)*ellipk(np.sin(ths/2)**2) # 计算单摆周期的精确值
pl.plot(ths, periods, label=u"fsolve计算的单摆周期", linewidth=4.0)
pl.plot(ths, periods2, "r", label=u"单摆周期精确值", linewidth=2.0)
pl.legend(loc='upper left')
pl.xlabel(u"初始摆角(弧度)")
pl.ylabel(u"摆动周期(秒)")
pl.show()
|
[
"[email protected]"
] | |
1f43950d64ce5a38f3b7d2a3519a97f7f52bac9e
|
1141cd4aeffafe496bb7d8a1399ca7c8445edd6e
|
/tests/functional/test_yet_another_tests.py
|
a3516905a07d5a3c2a61ef4aa4ab70e912400f88
|
[
"Apache-2.0"
] |
permissive
|
amleshkov/adcm
|
d338c3b7c51e38ffe9a0b2715c85e54bed0c4f46
|
e1c67e3041437ad9e17dccc6c95c5ac02184eddb
|
refs/heads/master
| 2020-11-30T15:35:57.456194 | 2019-12-16T20:27:06 | 2019-12-16T20:27:06 | 230,432,278 | 0 | 0 |
NOASSERTION
| 2019-12-27T11:30:23 | 2019-12-27T11:30:22 | null |
UTF-8
|
Python
| false | false | 1,543 |
py
|
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import coreapi
import pytest
# pylint: disable=W0611, W0621
from tests.library import steps
from tests.library.errorcodes import BUNDLE_ERROR, INVALID_OBJECT_DEFINITION
BUNDLES = os.path.join(os.path.dirname(__file__), "stacks/")
testcases = [
("cluster"),
("host")
]
@pytest.mark.parametrize('testcase', testcases)
def test_handle_unknown_words_in_bundle(client, testcase):
bundledir = os.path.join(BUNDLES, 'unknown_words_in_' + testcase + '_bundle')
with pytest.raises(coreapi.exceptions.ErrorMessage) as e:
steps.upload_bundle(client, bundledir)
INVALID_OBJECT_DEFINITION.equal(e, 'Not allowed key', 'in ' + testcase)
def test_shouldnt_load_same_bundle_twice(client):
bundledir = os.path.join(BUNDLES, 'bundle_directory_exist')
steps.upload_bundle(client, bundledir)
with pytest.raises(coreapi.exceptions.ErrorMessage) as e:
steps.upload_bundle(client, bundledir)
BUNDLE_ERROR.equal(e, 'bundle directory', 'already exists')
|
[
"[email protected]"
] | |
62073db4346cff27becfbaff88080a0b6925ce3d
|
aee5f372ba1b5fbb1c8acf6080c4c86ae195c83f
|
/cern-stubs/japc/value/spi/value/simple/__init__.pyi
|
be32c6f95d495c41e384051b0e41832b1f50436a
|
[] |
no_license
|
rdemaria/pjlsa
|
25221ae4a4b6a4abed737a41a4cafe7376e8829f
|
e64589ab2203338db4253fbc05ff5131142dfd5f
|
refs/heads/master
| 2022-09-03T13:18:05.290012 | 2022-08-16T13:45:57 | 2022-08-16T13:45:57 | 51,926,309 | 1 | 5 | null | 2019-07-11T11:50:44 | 2016-02-17T13:56:40 |
Python
|
UTF-8
|
Python
| false | false | 1,016,905 |
pyi
|
import cern.japc.value
import cern.japc.value.spi.value.core
import java.io
import java.lang
import typing
class AbstractMapSimpleValue(cern.japc.value.spi.value.core.ParameterValueImpl, cern.japc.value.SimpleParameterValue, java.io.Serializable, java.lang.Cloneable):
"""
public abstract class AbstractMapSimpleValue extends :class:`~cern.japc.value.spi.value.core.ParameterValueImpl` implements :class:`~cern.japc.value.SimpleParameterValue`, `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
This abstract class provides the basic services needed to manage a SimpleParameterValue that is either a simple scalar
or String or an array of simple scalars or Strings.
That includes the methods to get and set the value type and the to String method.
Basically this class translates all the map based methods (containing a field name) to the methods of a simple value
without any fields.
Also see:
:meth:`~serialized`
"""
def __init__(self): ...
def get(self, string: str) -> cern.japc.value.SimpleParameterValue:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.get`
Returns the matching value for the given name
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.get`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
Returns:
the matching value for the given name or null if no match
"""
...
@typing.overload
def getArray2D(self) -> cern.japc.value.Array2D: ...
@typing.overload
def getArray2D(self, string: str) -> cern.japc.value.Array2D:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getArray2D`
Returns a wrapper around the the value being interpreted as a 2d array. If the value is a 1d array it is encapsulated in
an array of size 1xn. If the value is not an array it is encapsulated in an array of size 1x1. If the name does not
match any value an :class:`~cern.japc.value.ValueConversionException` is thrown. IMPORTANT: if the value is mutable and
is changed after the wrapper is got the wrapper becomes invalide and can return wrong values or even throw
OutOfBoundException.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getArray2D`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value translated as a boolean 2d array.
"""
...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned. If the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getBoolean`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getBoolean`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBooleans(self) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self, int: int, int2: int) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getBooleans`
Returns a sub array of the value translated as a boolean array. The subarray starts at startIndex and contains the
number of element given by length. If startIndex+length is greater than the number of values in the underlying array an
exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getBooleans`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value translated as a boolean array.
"""
...
@typing.overload
def getBooleans(self, string: str) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getBooleans`
Returns the value being interpreted as a boolean array. If the value is not an array it is encapsulated in an array of
size 1. If the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getBooleans`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value translated as a boolean array.
"""
...
@typing.overload
def getBooleans(self, string: str, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getByte(self, int: int) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
If the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getByte`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getByte`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBytes(self) -> typing.List[int]: ...
@typing.overload
def getBytes(self, int: int, int2: int) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getBytes`
Returns a sub array of the value translated as a boolean array. The subarray starts at startIndex and contains the
number of element given by length. If startIndex+length is greater than the number of values in the underlying array an
exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getBytes`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value translated as a byte array.
"""
...
@typing.overload
def getBytes(self, string: str) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getBytes`
Returns the value translated as a byte array. If the value is not an array it is encapsulated in an array of size 1. If
the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getBytes`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value translated as a byte array.
"""
...
@typing.overload
def getBytes(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getColumnCount(self) -> int: ...
@typing.overload
def getColumnCount(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getColumnCount`
Returns the number of columns for the case when the value is represented as 2-dimensional array. For scalar which are
not bit-pattern will always return 1.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getColumnCount`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the number of columns for the case when the value is represented as 2-dimensional array
"""
...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the name does not match any value or the value can't be
represented as a discrete function a :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the name does not match any value or the value can't
be represented as a discrete function list a :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
If the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getDouble`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getDouble`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDoubles(self) -> typing.List[float]: ...
@typing.overload
def getDoubles(self, int: int, int2: int) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getDoubles`
Returns a sub array of the value translated as a boolean array. The subarray starts at startIndex and contains the
number of element given by length. If startIndex+length is greater than the number of values in the underlying array an
exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getDoubles`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value translated as a double array.
"""
...
@typing.overload
def getDoubles(self, string: str) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getDoubles`
Returns the value translated as a double array. If the value is not an array it is encapsulated in an array of size 1.
If the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getDoubles`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value translated as a double array.
"""
...
@typing.overload
def getDoubles(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the name does not match any value or the value can't be
represented as an enumeration item (value is boolean, array or there is no information about enumeration type, etc) an
:class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getEnumItem`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the name does not match any value or the value can't
be represented as an enumeration item set (value is boolean, array or there is no information about enumeration type,
etc) an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSets(self) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
def getEnumItemSets(self, int: int, int2: int) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
def getEnumItemSets(self, string: str) -> typing.List[cern.japc.value.EnumItemSet]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getEnumItemSets`
Returns the value translated as a :class:`~cern.japc.value.EnumItemSet` array. If the value is not an array it is
encapsulated in an array of size 1. If the name does not match any value an
:class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getEnumItemSets`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value translated as a String array.
"""
...
@typing.overload
def getEnumItems(self) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
def getEnumItems(self, int: int, int2: int) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
def getEnumItems(self, string: str) -> typing.List[cern.japc.value.EnumItem]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getEnumItems`
Returns the value translated as a :class:`~cern.japc.value.EnumItem` array. If the value is not an array it is
encapsulated in an array of size 1. If the name does not match any value an
:class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getEnumItems`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value translated as a String array.
"""
...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
If the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getFloat`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getFloat`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloats(self) -> typing.List[float]: ...
@typing.overload
def getFloats(self, int: int, int2: int) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getFloats`
Returns a sub array of the value translated as a boolean array. The subarray starts at startIndex and contains the
number of element given by length. If startIndex+length is greater than the number of values in the underlying array an
exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getFloats`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value translated as a float array.
"""
...
@typing.overload
def getFloats(self, string: str) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getFloats`
Returns the value translated as a float array. If the value is not an array it is encapsulated in an array of size 1. If
the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getFloats`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value translated as a float array.
"""
...
@typing.overload
def getFloats(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, int: int) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned. If
the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getInt`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getInt`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInts(self) -> typing.List[int]: ...
@typing.overload
def getInts(self, int: int, int2: int) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getInts`
Returns the value translated as a int array. If the value is not an array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getInts`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value translated as a int array.
"""
...
@typing.overload
def getInts(self, string: str) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getInts`
Returns the value translated as a int array. If the value is not an array it is encapsulated in an array of size 1. If
the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getInts`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value translated as a int array.
"""
...
@typing.overload
def getInts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLength(self) -> int: ...
@typing.overload
def getLength(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getLength`
Returns the length of the array represented by the value of given name. In case the value is not an array the value
returned is 1. If the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getLength`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get the length for
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, int: int) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
If the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getLong`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getLong`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLongs(self) -> typing.List[int]: ...
@typing.overload
def getLongs(self, int: int, int2: int) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getLongs`
Returns a sub array of the value translated as a boolean array. The subarray starts at startIndex and contains the
number of element given by length. If startIndex+length is greater than the number of values in the underlying array an
exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getLongs`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value translated as a long array.
"""
...
@typing.overload
def getLongs(self, string: str) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getLongs`
Returns the value translated as a long array. If the value is not an array it is encapsulated in an array of size 1. If
the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getLongs`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value translated as a long array.
"""
...
@typing.overload
def getLongs(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getMaxValue(self) -> float: ...
@typing.overload
def getMaxValue(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getMaxValue`
Returns the allowed maximum of the value with a given name. The maximum is usually the same as the one given by the
descriptor. If the maximum is dynamic, the one from the descriptor cannot be defined and this method returns the correct
value. If no maximum is defined the :code:`Double.NaN` is returned.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getMaxValue`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): value name
Returns:
the allowed maximum of the value with a given name or :code:`Double.NaN`
"""
...
@typing.overload
def getMinValue(self) -> float: ...
@typing.overload
def getMinValue(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getMinValue`
Returns the allowed minimum of the value with a given name. The minimum is usually the same as the one given by the
descriptor. If the minimum is dynamic, the one from the descriptor cannot be defined and this method returns the correct
value. If no minimum is defined the :code:`Double.NaN` is returned.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getMinValue`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): value name
Returns:
the allowed minimum of the value with a given name or :code:`Double.NaN`
"""
...
def getNames(self) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getNames`
Returns the names of all entries in this map. The array returned is a copy. Any modification on the returned array has
no effect on this value.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getNames`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Returns:
the names of all entries in this map
"""
...
@typing.overload
def getObject(self) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type and arrays and string
without change.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getObject`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value as an object.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getObject`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getRowCount(self) -> int: ...
@typing.overload
def getRowCount(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getRowCount`
Returns the number of rows for the case when the value is represented as 2-dimensional array. For scalar and
1-dimensional arrays will always return 1.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getRowCount`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the number of rows for the case when the value is represented as 2-dimensional array
"""
...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, int: int) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
If the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getShort`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getShort`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShorts(self) -> typing.List[int]: ...
@typing.overload
def getShorts(self, int: int, int2: int) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getShorts`
Returns a sub array of the value translated as a boolean array. The subarray starts at startIndex and contains the
number of element given by length. If startIndex+length is greater than the number of values in the underlying array an
exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getShorts`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value translated as a short array.
"""
...
@typing.overload
def getShorts(self, string: str) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getShorts`
Returns the value translated as a short array. If the value is not an array it is encapsulated in an array of size 1. If
the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getShorts`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value translated as a short array.
"""
...
@typing.overload
def getShorts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getString(self) -> str: ...
@typing.overload
def getString(self, int: int) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getString`
Returns the value being interpreted as a String. If the value is an array only the first value of the array is returned.
If the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getString`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value being interpreted as a String.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getString`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getStrings(self) -> typing.List[str]: ...
@typing.overload
def getStrings(self, int: int, int2: int) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getStrings`
Returns a sub array of the value translated as a boolean array. The subarray starts at startIndex and contains the
number of element given by length. If startIndex+length is greater than the number of values in the underlying array an
exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getStrings`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value translated as a String array.
"""
...
@typing.overload
def getStrings(self, string: str) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getStrings`
Returns the value translated as a String array. If the value is not an array it is encapsulated in an array of size 1.
If the name does not match any value an :class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getStrings`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get
Returns:
the value translated as a String array.
"""
...
@typing.overload
def getStrings(self, string: str, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getUnit(self) -> str: ...
@typing.overload
def getUnit(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getUnit`
Returns the unit of the value with a given name. The unit is usually the same as the one given by the descriptor. If the
unit is dynamic, the one from the descriptor cannot be defined and this method returns the correct value. If no unit is
defined an empty string is returned.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getUnit`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): value name
Returns:
the unit of the value with a given name or an empty string
"""
...
@typing.overload
def getValueType(self) -> cern.japc.value.ValueType: ...
@typing.overload
def getValueType(self, string: str) -> cern.japc.value.ValueType:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getValueType`
Returns the value type of the value of given name If the name does not match any value an
:class:`~cern.japc.value.ValueConversionException` is thrown.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getValueType`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value to get the type for
Returns:
the value type of the value interpreted by this reader
"""
...
@typing.overload
def getXMaxValue(self) -> float: ...
@typing.overload
def getXMaxValue(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getXMaxValue`
If the value with a given name is a function, this method returns the allowed maximum of X axis. The maximum is usually
the same as the one given by the descriptor. If the maximum is dynamic, the one from the descriptor cannot be defined
and this method returns the correct value. If the value is not a function or no maximum is defined the
:code:`Double.NaN` is returned.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getXMaxValue`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): value name
Returns:
the allowed maximum of X axis for the value with a given name or :code:`Double.NaN`
"""
...
@typing.overload
def getXMinValue(self) -> float: ...
@typing.overload
def getXMinValue(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getXMinValue`
If the value with a given name is a function, this method returns the allowed minimum of X axis. The minimum is usually
the same as the one given by the descriptor. If the minimum is dynamic, the one from the descriptor cannot be defined
and this method returns the correct value. If the value is not a function or no minimum is defined the
:code:`Double.NaN` is returned.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getXMinValue`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): value name
Returns:
the allowed minimum of X axis for the value with a given name or :code:`Double.NaN`
"""
...
@typing.overload
def getXUnit(self) -> str: ...
@typing.overload
def getXUnit(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getXUnit`
If the value with a given name is a function, this method returns the unit of X axis. The unit is usually the same as
the one given by the descriptor. If the unit is dynamic, the one from the descriptor cannot be defined and this method
returns the correct value. If the value is not a function or no unit is defined an empty string is returned.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getXUnit`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): value name
Returns:
the unit of X axis for the value with a given name or an empty string
"""
...
@typing.overload
def getYMaxValue(self) -> float: ...
@typing.overload
def getYMaxValue(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getYMaxValue`
If the value with a given name is a function, this method returns the allowed maximum of Y axis. The maximum is usually
the same as the one given by the descriptor. If the maximum is dynamic, the one from the descriptor cannot be defined
and this method returns the correct value. If no maximum is defined the :code:`Double.NaN` is returned. If the value is
not a function this method returns the same result as :meth:`~cern.japc.value.ImmutableMapParameterValue.getMinValue`.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getYMaxValue`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): value name
Returns:
the allowed maximum of Y axis for the value with a given name or :code:`Double.NaN`
"""
...
@typing.overload
def getYMinValue(self) -> float: ...
@typing.overload
def getYMinValue(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getYMinValue`
If the value with a given name is a function, this method returns the allowed minimum of Y axis. The minimum is usually
the same as the one given by the descriptor. If the minimum is dynamic, the one from the descriptor cannot be defined
and this method returns the correct value. If no minimum is defined the :code:`Double.NaN` is returned. If the value is
not a function this method returns the same result as :meth:`~cern.japc.value.ImmutableMapParameterValue.getMinValue`.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getYMinValue`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): value name
Returns:
the allowed minimum of Y axis for the value with a given name or :code:`Double.NaN`
"""
...
@typing.overload
def getYUnit(self) -> str: ...
@typing.overload
def getYUnit(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.getYUnit`
If the value with a given name is a function, this method returns the unit of Y axis. The unit is usually the same as
the one given by the descriptor. If the unit is dynamic, the one from the descriptor cannot be defined and this method
returns the correct value. If no unit is defined an empty string is returned. If the value is not a function this method
returns the same result as :meth:`~cern.japc.value.ImmutableMapParameterValue.getUnit`.
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.getYUnit`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): value name
Returns:
the unit of Y axis for the value with a given name or an empty string
"""
...
def makeMutable(self) -> 'AbstractMapSimpleValue':
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.makeMutable`
Creates a mutable version of this ParameterValue that can be set using the setters. The original values are untouched by
this operation. If this ParameterValue is already mutable this method returns the same instance.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.makeMutable` in interface :class:`~cern.japc.value.MapParameterValue`
Specified by:
:meth:`~cern.japc.value.ParameterValue.makeMutable` in interface :class:`~cern.japc.value.ParameterValue`
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.makeMutable` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.makeMutable`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
A new mutable copy of this parameter value or this parameter value itself if it is already mutable.
"""
...
def put(self, string: str, simpleParameterValue: cern.japc.value.SimpleParameterValue) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.put`
Sets the matching reader for the given named value
Specified by:
:meth:`~cern.japc.value.MapParameterValue.put` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (:class:`~cern.japc.value.SimpleParameterValue`): the non null matching reader for the given named value
"""
...
def remove(self, string: str) -> cern.japc.value.SimpleParameterValue:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.remove`
Removes the matching reader from this map
Specified by:
:meth:`~cern.japc.value.MapParameterValue.remove` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the reader
Returns:
the reader removed or null if none was removed
"""
...
@typing.overload
def setBoolean(self, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setBoolean`
Sets the value being a boolean. The scale is left unchanged from what it was before or set to 0 is the value of that
name has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setBoolean` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (boolean): the boolean value.
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setBoolean` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBooleans(self, booleanArray: typing.List[bool]) -> None: ...
@typing.overload
def setBooleans(self, string: str, booleanArray: typing.List[bool]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setBooleans`
Sets the value being a boolean array. The scale is left unchanged from what it was before or set to 0 is the value of
that name has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setBooleans` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (boolean[]): the boolean array value.
"""
...
@typing.overload
def setBooleans2D(self, booleanArray: typing.List[bool], intArray: typing.List[int]) -> None: ...
@typing.overload
def setBooleans2D(self, string: str, booleanArray: typing.List[bool], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setBooleans2D`
Sets the value being a 2-dimensional boolean array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setBooleans2D` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (boolean[]): the boolean array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setByte(self, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setByte`
Sets the value being a byte. The scale is left unchanged from what it was before or set to 0 is the value of that name
has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setByte` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (byte): the byte value.
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setByte` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setBytes(self, byteArray: typing.List[int]) -> None: ...
@typing.overload
def setBytes(self, string: str, byteArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setBytes`
Sets the value being a byte array. The scale is left unchanged from what it was before or set to 0 is the value of that
name has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setBytes` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (byte[]): the byte array value.
"""
...
@typing.overload
def setBytes2D(self, byteArray: typing.List[int], intArray: typing.List[int]) -> None: ...
@typing.overload
def setBytes2D(self, string: str, byteArray: typing.List[int], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setBytes2D`
Sets the value being a 2-dimensional byte array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setBytes2D` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (byte[]): the byte array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setDiscreteFunction`
Sets the value being a :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setDiscreteFunction` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setDiscreteFunctionList`
Sets the value being a :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setDouble`
Sets the value being a double. The scale is left unchanged from what it was before or set to 0 is the value of that name
has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setDouble` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (double): the double value.
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setDouble` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDoubles(self, doubleArray: typing.List[float]) -> None: ...
@typing.overload
def setDoubles(self, string: str, doubleArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setDoubles`
Sets the value being a double array. The scale is left unchanged from what it was before or set to 0 is the value of
that name has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setDoubles` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (double[]): the double array value.
"""
...
@typing.overload
def setDoubles2D(self, doubleArray: typing.List[float], intArray: typing.List[int]) -> None: ...
@typing.overload
def setDoubles2D(self, string: str, doubleArray: typing.List[float], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setDoubles2D`
Sets the value being a 2-dimensional double array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setDoubles2D` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (double[]): the double array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setEnumItem` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setEnumItemSet` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSets(self, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> None: ...
@typing.overload
def setEnumItemSets(self, string: str, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setEnumItemSets`
Sets the value being a EnumItemSet array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setEnumItemSets` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (:class:`~cern.japc.value.EnumItemSet`[]): the EnumItemSet array value.
"""
...
@typing.overload
def setEnumItemSets2D(self, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet], intArray: typing.List[int]) -> None: ...
@typing.overload
def setEnumItemSets2D(self, string: str, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setEnumItemSets2D`
Sets the value being a 2-dimensional EnumItemSet array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setEnumItemSets2D` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (:class:`~cern.japc.value.EnumItemSet`[]): the EnumItemSet array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setEnumItems(self, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None: ...
@typing.overload
def setEnumItems(self, string: str, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setEnumItems`
Sets the value being a EnumItem array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setEnumItems` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (:class:`~cern.japc.value.EnumItem`[]): the EnumItem array value.
"""
...
@typing.overload
def setEnumItems2D(self, enumItemArray: typing.List[cern.japc.value.EnumItem], intArray: typing.List[int]) -> None: ...
@typing.overload
def setEnumItems2D(self, string: str, enumItemArray: typing.List[cern.japc.value.EnumItem], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setEnumItems2D`
Sets the value being a 2-dimensional EnumItem array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setEnumItems2D` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (:class:`~cern.japc.value.EnumItem`[]): the EnumItem array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setFloat(self, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setFloat`
Sets the value being a float. The scale is left unchanged from what it was before or set to 0 is the value of that name
has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setFloat` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (float): the float value.
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setFloat` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloats(self, floatArray: typing.List[float]) -> None: ...
@typing.overload
def setFloats(self, string: str, floatArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setFloats`
Sets the value being a float array. The scale is left unchanged from what it was before or set to 0 is the value of that
name has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setFloats` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (float[]): the float array value.
"""
...
@typing.overload
def setFloats2D(self, floatArray: typing.List[float], intArray: typing.List[int]) -> None: ...
@typing.overload
def setFloats2D(self, string: str, floatArray: typing.List[float], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setFloats2D`
Sets the value being a 2-dimensional float array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setFloats2D` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (float[]): the float array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setInt(self, int: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setInt` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setInt`
Sets the value being a int. The scale is left unchanged from what it was before or set to 0 is the value of that name
has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setInt` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (int): the int value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInts(self, intArray: typing.List[int]) -> None: ...
@typing.overload
def setInts(self, string: str, intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setInts`
Sets the value being a int array. The scale is left unchanged from what it was before or set to 0 is the value of that
name has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setInts` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (int[]): the int array value.
"""
...
@typing.overload
def setInts2D(self, intArray: typing.List[int], intArray2: typing.List[int]) -> None: ...
@typing.overload
def setInts2D(self, string: str, intArray: typing.List[int], intArray2: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setInts2D`
Sets the value being a 2-dimensional int array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setInts2D` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (int[]): the int array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setLong(self, int: int, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setLong` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setLong`
Sets the value being a long. The scale is left unchanged from what it was before or set to 0 is the value of that name
has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setLong` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (long): the long value.
"""
...
@typing.overload
def setLong(self, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLongs(self, longArray: typing.List[int]) -> None: ...
@typing.overload
def setLongs(self, string: str, longArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setLongs`
Sets the value being a long array. The scale is left unchanged from what it was before or set to 0 is the value of that
name has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setLongs` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (long[]): the long array value.
"""
...
@typing.overload
def setLongs2D(self, longArray: typing.List[int], intArray: typing.List[int]) -> None: ...
@typing.overload
def setLongs2D(self, string: str, longArray: typing.List[int], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setLongs2D`
Sets the value being a 2-dimensional long array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setLongs2D` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (long[]): the long array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setObject(self, object: typing.Any) -> None: ...
@typing.overload
def setObject(self, string: str, object: typing.Any) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setObject`
Sets the value as an object. This method can handle any scalar wrapping Object type as well as arrays and string. If
other type was passed a `null
<http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/IllegalArgumentException.html?is-external=true>` will be
thrown. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setObject` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (`Object <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true>`): the value as an object.
"""
...
@typing.overload
def setObjects2D(self, object: typing.Any, intArray: typing.List[int]) -> None: ...
@typing.overload
def setObjects2D(self, string: str, object: typing.Any, intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setObjects2D`
Sets the value as a 2d array of objects. This method can handle any array of primitives and Strings, which will be used
as a source for 2D array. If other type was passed a `null
<http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/IllegalArgumentException.html?is-external=true>` will be
thrown. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setObjects2D` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (`Object <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true>`): the value as an object.
dimensions (int[]): the dimensions of the 2D array
"""
...
@typing.overload
def setShort(self, int: int, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setShort` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setShort`
Sets the value being a short. The scale is left unchanged from what it was before or set to 0 is the value of that name
has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setShort` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (short): the short value.
"""
...
@typing.overload
def setShort(self, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShorts(self, shortArray: typing.List[int]) -> None: ...
@typing.overload
def setShorts(self, string: str, shortArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setShorts`
Sets the value being a short array. The scale is left unchanged from what it was before or set to 0 is the value of that
name has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setShorts` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (short[]): the short array value.
"""
...
@typing.overload
def setShorts2D(self, shortArray: typing.List[int], intArray: typing.List[int]) -> None: ...
@typing.overload
def setShorts2D(self, string: str, shortArray: typing.List[int], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setShorts2D`
Sets the value being a 2-dimensional short array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setShorts2D` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (short[]): the short array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setString(self, int: int, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setString` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setString`
Sets the value being a String. The scale is left unchanged from what it was before or set to 0 is the value of that name
has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setString` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
@typing.overload
def setString(self, string: str) -> None: ...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setStrings(self, stringArray: typing.List[str]) -> None: ...
@typing.overload
def setStrings(self, string: str, stringArray: typing.List[str]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setStrings`
Sets the value being a String array. The scale is left unchanged from what it was before or set to 0 is the value of
that name has not been set before.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setStrings` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): the String array value.
"""
...
@typing.overload
def setStrings2D(self, stringArray: typing.List[str], intArray: typing.List[int]) -> None: ...
@typing.overload
def setStrings2D(self, string: str, stringArray: typing.List[str], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.MapParameterValue.setStrings2D`
Sets the value being a 2-dimensional String array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.MapParameterValue.setStrings2D` in interface :class:`~cern.japc.value.MapParameterValue`
Parameters:
name (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the name of the value
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): the String array value.
dimensions (int[]): the dimensions of the array
"""
...
def size(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.ImmutableMapParameterValue.size`
Returns the number of entries in this map
Specified by:
:meth:`~cern.japc.value.ImmutableMapParameterValue.size`Â in
interface :class:`~cern.japc.value.ImmutableMapParameterValue`
Returns:
the number of entries in this map
"""
...
class Array2DImpl(cern.japc.value.Array2D, java.io.Serializable):
"""
public class Array2DImpl extends `Object <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true>` implements :class:`~cern.japc.value.Array2D`, `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`
The wrapper around parameterValue representing 2-dimensional array
Also see:
:meth:`~serialized`
"""
def __init__(self, simpleParameterValue: cern.japc.value.SimpleParameterValue, intArray: typing.List[int]): ...
def getArray1D(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getArray1D`
Returns a flat array representing the 2D array as an Object.
The return value is an array of elements of corresponding type (boolean[], byte[], double[], float[], int[], long[],
short[] or String[])
Specified by:
:meth:`~cern.japc.value.Array2D.getArray1D` in interface :class:`~cern.japc.value.Array2D`
Returns:
a flat array representing the 2D array.
"""
...
def getBoolean(self, int: int, int2: int) -> bool:
"""
Returns the value specified with the 2 indexes.
Specified by:
:meth:`~cern.japc.value.Array2D.getBoolean` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): first index
columnNumber (int): second index
Returns:
the value specified with the 2 indexes.
"""
...
def getBooleanArray2D(self) -> typing.List[typing.List[bool]]:
"""
Returns the 2-dimensional array
Specified by:
:meth:`~cern.japc.value.Array2D.getBooleanArray2D` in interface :class:`~cern.japc.value.Array2D`
Returns:
the 2-dimensional array
"""
...
def getBooleanRow(self, int: int) -> typing.List[bool]:
"""
Returns the row specified with the index
Specified by:
:meth:`~cern.japc.value.Array2D.getBooleanRow` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): the index of the row
Returns:
the row specified with the index
"""
...
def getBooleans(self) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getBooleans`
Returns a flat array of booleans representing the 2D array.
Specified by:
:meth:`~cern.japc.value.Array2D.getBooleans` in interface :class:`~cern.japc.value.Array2D`
Returns:
a flat array of booleans representing the 2D array.
"""
...
def getByte(self, int: int, int2: int) -> int:
"""
Returns the value specified with the 2 indexes.
Specified by:
:meth:`~cern.japc.value.Array2D.getByte` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): first index
columnNumber (int): second index
Returns:
the value specified with the 2 indexes.
"""
...
def getByteArray2D(self) -> typing.List[typing.List[int]]:
"""
Returns the 2-dimensional array
Specified by:
:meth:`~cern.japc.value.Array2D.getByteArray2D` in interface :class:`~cern.japc.value.Array2D`
Returns:
the 2-dimensional array
"""
...
def getByteRow(self, int: int) -> typing.List[int]:
"""
Returns the row specified with the index
Specified by:
:meth:`~cern.japc.value.Array2D.getByteRow` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): the index of the row
Returns:
the row specified with the index
"""
...
def getBytes(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getBytes`
Returns a flat array of bytes representing the 2D array.
Specified by:
:meth:`~cern.japc.value.Array2D.getBytes` in interface :class:`~cern.japc.value.Array2D`
Returns:
a flat array of bytes representing the 2D array.
"""
...
def getColumnCount(self) -> int:
"""
Returns the number of columns.
Specified by:
:meth:`~cern.japc.value.Array2D.getColumnCount` in interface :class:`~cern.japc.value.Array2D`
Returns:
the number of columns.
"""
...
def getDouble(self, int: int, int2: int) -> float:
"""
Returns the value specified with the 2 indexes.
Specified by:
:meth:`~cern.japc.value.Array2D.getDouble` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): first index
columnNumber (int): second index
Returns:
the value specified with the 2 indexes.
"""
...
def getDoubleArray2D(self) -> typing.List[typing.List[float]]:
"""
Returns the 2-dimensional array
Specified by:
:meth:`~cern.japc.value.Array2D.getDoubleArray2D` in interface :class:`~cern.japc.value.Array2D`
Returns:
the 2-dimensional array
"""
...
def getDoubleRow(self, int: int) -> typing.List[float]:
"""
Returns the row specified with the index
Specified by:
:meth:`~cern.japc.value.Array2D.getDoubleRow` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): the index of the row
Returns:
the row specified with the index
"""
...
def getDoubles(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getDoubles`
Returns a flat array of doubles representing the 2D array.
Specified by:
:meth:`~cern.japc.value.Array2D.getDoubles` in interface :class:`~cern.japc.value.Array2D`
Returns:
a flat array of doubles representing the 2D array.
"""
...
def getEnumItem(self, int: int, int2: int) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getEnumItem`
Returns the value specified with the 2 indexes.
Specified by:
:meth:`~cern.japc.value.Array2D.getEnumItem` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): first index
columnNumber (int): second index
Returns:
the value specified with the 2 indexes.
"""
...
def getEnumItemArray2D(self) -> typing.List[typing.List[cern.japc.value.EnumItem]]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getEnumItemArray2D`
Returns the 2-dimensional array
Specified by:
:meth:`~cern.japc.value.Array2D.getEnumItemArray2D` in interface :class:`~cern.japc.value.Array2D`
Returns:
the 2-dimensional array
"""
...
def getEnumItemRow(self, int: int) -> typing.List[cern.japc.value.EnumItem]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getEnumItemRow`
Returns the row specified with the index
Specified by:
:meth:`~cern.japc.value.Array2D.getEnumItemRow` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): the index of the row
Returns:
the row specified with the index
"""
...
def getEnumItemSet(self, int: int, int2: int) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getEnumItemSet`
Returns the value specified with the 2 indexes.
Specified by:
:meth:`~cern.japc.value.Array2D.getEnumItemSet` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): first index
columnNumber (int): second index
Returns:
the value specified with the 2 indexes.
"""
...
def getEnumItemSetArray2D(self) -> typing.List[typing.List[cern.japc.value.EnumItemSet]]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getEnumItemSetArray2D`
Returns the 2-dimensional array
Specified by:
:meth:`~cern.japc.value.Array2D.getEnumItemSetArray2D` in interface :class:`~cern.japc.value.Array2D`
Returns:
the 2-dimensional array
"""
...
def getEnumItemSetRow(self, int: int) -> typing.List[cern.japc.value.EnumItemSet]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getEnumItemSetRow`
Returns the row specified with the index
Specified by:
:meth:`~cern.japc.value.Array2D.getEnumItemSetRow` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): the index of the row
Returns:
the row specified with the index
"""
...
def getEnumItemSets(self) -> typing.List[cern.japc.value.EnumItemSet]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getEnumItemSets`
Returns a flat array of enumeration sets representing the 2D array.
Specified by:
:meth:`~cern.japc.value.Array2D.getEnumItemSets` in interface :class:`~cern.japc.value.Array2D`
Returns:
a flat array of enumeration sets representing the 2D array.
"""
...
def getEnumItems(self) -> typing.List[cern.japc.value.EnumItem]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getEnumItems`
Returns a flat array of enumerations representing the 2D array.
Specified by:
:meth:`~cern.japc.value.Array2D.getEnumItems` in interface :class:`~cern.japc.value.Array2D`
Returns:
a flat array of enumerations representing the 2D array.
"""
...
def getFloat(self, int: int, int2: int) -> float:
"""
Returns the value specified with the 2 indexes.
Specified by:
:meth:`~cern.japc.value.Array2D.getFloat` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): first index
columnNumber (int): second index
Returns:
the value specified with the 2 indexes.
"""
...
def getFloatArray2D(self) -> typing.List[typing.List[float]]:
"""
Returns the 2-dimensional array
Specified by:
:meth:`~cern.japc.value.Array2D.getFloatArray2D` in interface :class:`~cern.japc.value.Array2D`
Returns:
the 2-dimensional array
"""
...
def getFloatRow(self, int: int) -> typing.List[float]:
"""
Returns the row specified with the index
Specified by:
:meth:`~cern.japc.value.Array2D.getFloatRow` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): the index of the row
Returns:
the row specified with the index
"""
...
def getFloats(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getFloats`
Returns a flat array of floats representing the 2D array.
Specified by:
:meth:`~cern.japc.value.Array2D.getFloats` in interface :class:`~cern.japc.value.Array2D`
Returns:
a flat array of floats representing the 2D array.
"""
...
def getInt(self, int: int, int2: int) -> int:
"""
Returns the value specified with the 2 indexes.
Specified by:
:meth:`~cern.japc.value.Array2D.getInt` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): first index
columnNumber (int): second index
Returns:
the value specified with the 2 indexes.
"""
...
def getIntArray2D(self) -> typing.List[typing.List[int]]:
"""
Returns the 2-dimensional array
Specified by:
:meth:`~cern.japc.value.Array2D.getIntArray2D` in interface :class:`~cern.japc.value.Array2D`
Returns:
the 2-dimensional array
"""
...
def getIntRow(self, int: int) -> typing.List[int]:
"""
Returns the row specified with the index
Specified by:
:meth:`~cern.japc.value.Array2D.getIntRow` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): the index of the row
Returns:
the row specified with the index
"""
...
def getInternalComponentType(self) -> cern.japc.value.ValueType:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getInternalComponentType`
Returns the internal component type of the 2D array.
This method returns the JAPC type of the elements in the array.
Specified by:
:meth:`~cern.japc.value.Array2D.getInternalComponentType` in interface :class:`~cern.japc.value.Array2D`
Returns:
the internal component type of the 2D array
"""
...
def getInts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getInts`
Returns a flat array of integers representing the 2D array.
Specified by:
:meth:`~cern.japc.value.Array2D.getInts` in interface :class:`~cern.japc.value.Array2D`
Returns:
a flat array of integers representing the 2D array.
"""
...
def getLong(self, int: int, int2: int) -> int:
"""
Returns the value specified with the 2 indexes.
Specified by:
:meth:`~cern.japc.value.Array2D.getLong` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): first index
columnNumber (int): second index
Returns:
the value specified with the 2 indexes.
"""
...
def getLongArray2D(self) -> typing.List[typing.List[int]]:
"""
Returns the 2-dimensional array
Specified by:
:meth:`~cern.japc.value.Array2D.getLongArray2D` in interface :class:`~cern.japc.value.Array2D`
Returns:
the 2-dimensional array
"""
...
def getLongRow(self, int: int) -> typing.List[int]:
"""
Returns the row specified with the index
Specified by:
:meth:`~cern.japc.value.Array2D.getLongRow` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): the index of the row
Returns:
the row specified with the index
"""
...
def getLongs(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getLongs`
Returns a flat array of longs representing the 2D array.
Specified by:
:meth:`~cern.japc.value.Array2D.getLongs` in interface :class:`~cern.japc.value.Array2D`
Returns:
a flat array of longs representing the 2D array.
"""
...
def getRowCount(self) -> int:
"""
Returns the number of rows.
Specified by:
:meth:`~cern.japc.value.Array2D.getRowCount` in interface :class:`~cern.japc.value.Array2D`
Returns:
the number of rows.
"""
...
def getShort(self, int: int, int2: int) -> int:
"""
Returns the value specified with the 2 indexes.
Specified by:
:meth:`~cern.japc.value.Array2D.getShort` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): first index
columnNumber (int): second index
Returns:
the value specified with the 2 indexes.
"""
...
def getShortArray2D(self) -> typing.List[typing.List[int]]:
"""
Returns the 2-dimensional array
Specified by:
:meth:`~cern.japc.value.Array2D.getShortArray2D` in interface :class:`~cern.japc.value.Array2D`
Returns:
the 2-dimensional array
"""
...
def getShortRow(self, int: int) -> typing.List[int]:
"""
Returns the row specified with the index
Specified by:
:meth:`~cern.japc.value.Array2D.getShortRow` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): the index of the row
Returns:
the row specified with the index
"""
...
def getShorts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getShorts`
Returns a flat array of shorts representing the 2D array.
Specified by:
:meth:`~cern.japc.value.Array2D.getShorts` in interface :class:`~cern.japc.value.Array2D`
Returns:
a flat array of shorts representing the 2D array.
"""
...
def getString(self, int: int, int2: int) -> str:
"""
Returns the value specified with the 2 indexes.
Specified by:
:meth:`~cern.japc.value.Array2D.getString` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): first index
columnNumber (int): second index
Returns:
the value specified with the 2 indexes.
"""
...
def getStringArray2D(self) -> typing.List[typing.List[str]]:
"""
Returns the 2-dimensional array
Specified by:
:meth:`~cern.japc.value.Array2D.getStringArray2D` in interface :class:`~cern.japc.value.Array2D`
Returns:
the 2-dimensional array
"""
...
def getStringRow(self, int: int) -> typing.List[str]:
"""
Returns the row specified with the index
Specified by:
:meth:`~cern.japc.value.Array2D.getStringRow` in interface :class:`~cern.japc.value.Array2D`
Parameters:
rowNumber (int): the index of the row
Returns:
the row specified with the index
"""
...
def getStrings(self) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.Array2D.getStrings`
Returns a flat array of strings representing the 2D array.
Specified by:
:meth:`~cern.japc.value.Array2D.getStrings` in interface :class:`~cern.japc.value.Array2D`
Returns:
a flat array of strings representing the 2D array.
"""
...
def toString(self) -> str:
"""
Overrides:
in class
"""
...
class ObsoleteFunctionCodec:
"""
`@Deprecated <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Deprecated.html?is-external=true>` public class ObsoleteFunctionCodec extends `Object <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true>`
Deprecated.
This class contains the first version (now oboslete) of unified encoding of functions and function-lists as a double
array:
**P**: point, defined as x,y
**F**: function, defined as #P, P1, P2, ... Pn (where n = #P)
**FL**: function list, defined as #F, F1, F2, ... Fm (where m = #F)
With introduction of full support for functions and function-lists in the control system the encoding/decoding should
not be part of JAPC anymore (however because of CALS v.1 a slightly modified version will still be available as a part
of :class:`~cern.japc.value.spi.value.simple.ValueConverter`).
TODO: This class should eventually be moved to InCA communicating with Passerelle and LabView (through XML/RPC gateway
provided by CMW) as well as reading functions and functions-lists represented in this encoding. The reason it is
currently in JAPC is the fact that it is not easy to identify all the users of the obsolete encoding so it would be
faster/easier to switch them to a class in JAPC than to a class in LSA.
See JAPC-876.
"""
def __init__(self): ...
@staticmethod
def convertToDiscreteFunction(doubleArray: typing.List[float]) -> cern.japc.value.DiscreteFunction:
"""
Deprecated.
Conversion from low level double-array representation to discrete function
Parameters:
value (double[]): initial value
Returns:
result value
"""
...
@staticmethod
def convertToDiscreteFunctionList(doubleArray: typing.List[float]) -> cern.japc.value.DiscreteFunctionList:
"""
Deprecated.
Conversion from low level double-array representation to discrete function list
Parameters:
value (double[]): initial value
Returns:
result value
Also see:
:meth:`~cern.japc.value.spi.value.simple.ValueConverter.convertToDoubleArray`
"""
...
@typing.overload
@staticmethod
def convertToDoubleArray(discreteFunction: cern.japc.value.DiscreteFunction) -> typing.List[float]:
"""
Deprecated.
Conversion from DiscreteFunction to double array
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Also see:
:meth:`~cern.japc.value.spi.value.simple.ValueConverter.convertToDoubleArray`
Deprecated.
Conversion from DiscreteFunctionList to double array using the following convention
**P**: point, defined as x,y
**F**: function, defined as #P, P1, P2, ... Pn (where n = #P)
**FL**: function list, defined as #F, F1, F2, ... Fm (where m = #F)
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): - initial discrete function list to be converted
Returns:
the discrete function list encoded in a double array as specified above
"""
...
@typing.overload
@staticmethod
def convertToDoubleArray(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> typing.List[float]: ...
class UpdatableParameterValue:
"""
public interface UpdatableParameterValue
"""
def setMaxValue(self, double: float) -> None:
"""
Parameters:
maxValue (double): maximum to set
"""
...
def setMinValue(self, double: float) -> None:
"""
Parameters:
minValue (double): minimum to set
"""
...
def setString(self, string: str) -> None:
"""
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): The string value to set
"""
...
def setUnit(self, string: str) -> None:
"""
Parameters:
unit (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): unit to set
"""
...
def setXMaxValue(self, double: float) -> None:
"""
Parameters:
xMaxValue (double): maximum of X axis to set (makes sense for function values only)
"""
...
def setXMinValue(self, double: float) -> None:
"""
Parameters:
xMinValue (double): minimum of X axis to set (makes sense for function values only)
"""
...
def setXUnit(self, string: str) -> None:
"""
Parameters:
xUnit (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): unit of X axis set (makes sense for function values only)
"""
...
def setYMaxValue(self, double: float) -> None:
"""
Parameters:
yMaxValue (double): maximum of Y axis to set (makes sense for function values only)
"""
...
def setYMinValue(self, double: float) -> None:
"""
Parameters:
yMinValue (double): minimum of Y axis to set (makes sense for function values only)
"""
...
def setYUnit(self, string: str) -> None:
"""
Parameters:
yUnit (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): unit of Y axis to set (makes sense for function values only)
"""
...
class ValueConverter:
"""
public class ValueConverter extends `Object <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true>`
A class providing many static methods to convert scalar and array of scalar values.
"""
@staticmethod
def conversionNotPossibleException(valueType: cern.japc.value.ValueType, valueType2: cern.japc.value.ValueType) -> cern.japc.value.ValueConversionException:
"""
Helper method which creates "conversion not possible" exceptions.
There is a number of value type combinations which the conversion is not possible for.
Parameters:
sourceType (:class:`~cern.japc.value.ValueType`): the source parameter value type
destType (:class:`~cern.japc.value.ValueType`): the destination parameter value type
Returns:
the exception
"""
...
@typing.overload
@staticmethod
def convertToBoolean(boolean: bool) -> bool:
"""
Conversion from boolean to boolean
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from byte to boolean
Parameters:
value (byte): initial value
Returns:
result value
Conversion from double to boolean
Parameters:
value (double): initial value
Returns:
result value
Conversion from float to boolean
Parameters:
value (float): initial value
Returns:
result value
Conversion from int to boolean
Parameters:
value (int): initial value
Returns:
result value
Conversion from long to boolean
Parameters:
value (long): initial value
Returns:
result value
Conversion from short to boolean
Parameters:
value (short): initial value
Returns:
result value
Conversion from string to boolean
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to boolean
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to boolean
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function to boolean
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to boolean
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToBoolean(byte: int) -> bool: ...
@typing.overload
@staticmethod
def convertToBoolean(discreteFunction: cern.japc.value.DiscreteFunction) -> bool: ...
@typing.overload
@staticmethod
def convertToBoolean(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> bool: ...
@typing.overload
@staticmethod
def convertToBoolean(enumItem: cern.japc.value.EnumItem) -> bool: ...
@typing.overload
@staticmethod
def convertToBoolean(enumItemSet: cern.japc.value.EnumItemSet) -> bool: ...
@typing.overload
@staticmethod
def convertToBoolean(double: float) -> bool: ...
@typing.overload
@staticmethod
def convertToBoolean(float: float) -> bool: ...
@typing.overload
@staticmethod
def convertToBoolean(int: int) -> bool: ...
@typing.overload
@staticmethod
def convertToBoolean(string: str) -> bool: ...
@typing.overload
@staticmethod
def convertToBoolean(long: int) -> bool: ...
@typing.overload
@staticmethod
def convertToBoolean(short: int) -> bool: ...
@typing.overload
@staticmethod
def convertToBooleanArray(booleanArray: typing.List[bool]) -> typing.List[bool]:
"""
Conversion from boolean array to boolean array
Parameters:
value (boolean[]): initial value
Returns:
result value
Conversion from byte array to boolean array
Parameters:
value (byte[]): initial value
Returns:
result value
Conversion from double array to boolean array
Parameters:
value (double[]): initial value
Returns:
result value
Conversion from float array to boolean array
Parameters:
value (float[]): initial value
Returns:
result value
Conversion from int array to boolean array
Parameters:
value (int[]): initial value
Returns:
result value
Conversion from long array to boolean array
Parameters:
value (long[]): initial value
Returns:
result value
Conversion from short array to boolean array
Parameters:
value (short[]): initial value
Returns:
result value
Conversion from string array to boolean array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): initial value
Returns:
result value
Conversion from enumeration array to boolean array
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): initial value
Returns:
result value
Conversion from enumeration set array to boolean array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToBooleanArray(byteArray: typing.List[int]) -> typing.List[bool]: ...
@typing.overload
@staticmethod
def convertToBooleanArray(enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> typing.List[bool]: ...
@typing.overload
@staticmethod
def convertToBooleanArray(enumItemArray: typing.List[cern.japc.value.EnumItem]) -> typing.List[bool]: ...
@typing.overload
@staticmethod
def convertToBooleanArray(doubleArray: typing.List[float]) -> typing.List[bool]: ...
@typing.overload
@staticmethod
def convertToBooleanArray(floatArray: typing.List[float]) -> typing.List[bool]: ...
@typing.overload
@staticmethod
def convertToBooleanArray(intArray: typing.List[int]) -> typing.List[bool]: ...
@typing.overload
@staticmethod
def convertToBooleanArray(stringArray: typing.List[str]) -> typing.List[bool]: ...
@typing.overload
@staticmethod
def convertToBooleanArray(longArray: typing.List[int]) -> typing.List[bool]: ...
@typing.overload
@staticmethod
def convertToBooleanArray(shortArray: typing.List[int]) -> typing.List[bool]: ...
@typing.overload
@staticmethod
def convertToByte(boolean: bool) -> int:
"""
Conversion from byte to byte
Parameters:
value (byte): initial value
Returns:
result value
Conversion from boolean to byte
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from double to byte
Parameters:
value (double): initial value
Returns:
result value
Conversion from float to byte
Parameters:
value (float): initial value
Returns:
result value
Conversion from int to byte
Parameters:
value (int): initial value
Returns:
result value
Conversion from long to byte
Parameters:
value (long): initial value
Returns:
result value
Conversion from short to byte
Parameters:
value (short): initial value
Returns:
result value
Conversion from string to byte
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to byte
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to byte
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function to byte
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to byte
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToByte(byte: int) -> int: ...
@typing.overload
@staticmethod
def convertToByte(discreteFunction: cern.japc.value.DiscreteFunction) -> int: ...
@typing.overload
@staticmethod
def convertToByte(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> int: ...
@typing.overload
@staticmethod
def convertToByte(enumItem: cern.japc.value.EnumItem) -> int: ...
@typing.overload
@staticmethod
def convertToByte(enumItemSet: cern.japc.value.EnumItemSet) -> int: ...
@typing.overload
@staticmethod
def convertToByte(double: float) -> int: ...
@typing.overload
@staticmethod
def convertToByte(float: float) -> int: ...
@typing.overload
@staticmethod
def convertToByte(int: int) -> int: ...
@typing.overload
@staticmethod
def convertToByte(string: str) -> int: ...
@typing.overload
@staticmethod
def convertToByte(long: int) -> int: ...
@typing.overload
@staticmethod
def convertToByte(short: int) -> int: ...
@typing.overload
@staticmethod
def convertToByteArray(booleanArray: typing.List[bool]) -> typing.List[int]:
"""
Conversion from boolean array to byte array
Parameters:
value (boolean[]): initial value
Returns:
result value
Conversion from byte array to byte array
Parameters:
value (byte[]): initial value
Returns:
result value
Conversion from double array to byte array
Parameters:
value (double[]): initial value
Returns:
result value
Conversion from float array to byte array
Parameters:
value (float[]): initial value
Returns:
result value
Conversion from int array to byte array
Parameters:
value (int[]): initial value
Returns:
result value
Conversion from long array to byte array
Parameters:
value (long[]): initial value
Returns:
result value
Conversion from short array to byte array
Parameters:
value (short[]): initial value
Returns:
result value
Conversion from string array to byte array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): initial value
Returns:
result value
Conversion from enumeration array to byte array
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): initial value
Returns:
result value
Conversion from enumeration set array to byte array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToByteArray(byteArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToByteArray(enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToByteArray(enumItemArray: typing.List[cern.japc.value.EnumItem]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToByteArray(doubleArray: typing.List[float]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToByteArray(floatArray: typing.List[float]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToByteArray(intArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToByteArray(stringArray: typing.List[str]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToByteArray(longArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToByteArray(shortArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToDiscreteFunction(boolean: bool) -> cern.japc.value.DiscreteFunction:
"""
Conversion from boolean to discrete function
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from byte to discrete function
Parameters:
value (byte): initial value
Returns:
result value
Conversion from double to discrete function
Parameters:
value (double): initial value
Returns:
result value
Conversion from float to discrete function
Parameters:
value (float): initial value
Returns:
result value
Conversion from int to discrete function
Parameters:
value (int): initial value
Returns:
result value
Conversion from long to discrete function
Parameters:
value (long): initial value
Returns:
result value
Conversion from short to discrete function
Parameters:
value (short): initial value
Returns:
result value
Conversion from string to discrete function
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to discrete function
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to discrete function
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function list to discrete function
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
Conversion from low level double-array representation to discrete function
Parameters:
value (double[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToDiscreteFunction(byte: int) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
@staticmethod
def convertToDiscreteFunction(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
@staticmethod
def convertToDiscreteFunction(enumItem: cern.japc.value.EnumItem) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
@staticmethod
def convertToDiscreteFunction(enumItemSet: cern.japc.value.EnumItemSet) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
@staticmethod
def convertToDiscreteFunction(double: float) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
@staticmethod
def convertToDiscreteFunction(doubleArray: typing.List[float]) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
@staticmethod
def convertToDiscreteFunction(float: float) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
@staticmethod
def convertToDiscreteFunction(int: int) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
@staticmethod
def convertToDiscreteFunction(string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
@staticmethod
def convertToDiscreteFunction(long: int) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
@staticmethod
def convertToDiscreteFunction(short: int) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(boolean: bool) -> cern.japc.value.DiscreteFunctionList:
"""
Conversion from boolean to discrete function list
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from byte to discrete function list
Parameters:
value (byte): initial value
Returns:
result value
Conversion from double to discrete function list
Parameters:
value (double): initial value
Returns:
result value
Conversion from float to discrete function list
Parameters:
value (float): initial value
Returns:
result value
Conversion from int to discrete function list
Parameters:
value (int): initial value
Returns:
result value
Conversion from long to discrete function list
Parameters:
value (long): initial value
Returns:
result value
Conversion from short to discrete function list
Parameters:
value (short): initial value
Returns:
result value
Conversion from string to discrete function list
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to discrete function list
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to discrete function list
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function to discrete function list
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from low level double-array representation to discrete function list
Parameters:
src (double[]): initial value
Returns:
result value
Also see:
:meth:`~cern.japc.value.spi.value.simple.ValueConverter.convertToDoubleArray`
"""
...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(byte: int) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(discreteFunction: cern.japc.value.DiscreteFunction) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(enumItem: cern.japc.value.EnumItem) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(enumItemSet: cern.japc.value.EnumItemSet) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(double: float) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(doubleArray: typing.List[float]) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(float: float) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(int: int) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(long: int) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
@staticmethod
def convertToDiscreteFunctionList(short: int) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
@staticmethod
def convertToDouble(boolean: bool) -> float:
"""
Conversion from double to double
Parameters:
value (double): initial value
Returns:
result value
Conversion from boolean to double
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from any integer to double
Parameters:
value (long): initial value
Returns:
result value
Conversion from string to double
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to double
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to double
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function to double
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to double
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToDouble(discreteFunction: cern.japc.value.DiscreteFunction) -> float: ...
@typing.overload
@staticmethod
def convertToDouble(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> float: ...
@typing.overload
@staticmethod
def convertToDouble(enumItem: cern.japc.value.EnumItem) -> float: ...
@typing.overload
@staticmethod
def convertToDouble(enumItemSet: cern.japc.value.EnumItemSet) -> float: ...
@typing.overload
@staticmethod
def convertToDouble(double: float) -> float: ...
@typing.overload
@staticmethod
def convertToDouble(string: str) -> float: ...
@typing.overload
@staticmethod
def convertToDouble(long: int) -> float: ...
@typing.overload
@staticmethod
def convertToDoubleArray(booleanArray: typing.List[bool]) -> typing.List[float]:
"""
Conversion from boolean array to double array
Parameters:
value (boolean[]): initial value
Returns:
result value
Conversion from byte array to double array
Parameters:
value (byte[]): initial value
Returns:
result value
Conversion from double array to double array
Parameters:
value (double[]): initial value
Returns:
result value
Conversion from float array to double array
Parameters:
value (float[]): initial value
Returns:
result value
Conversion from int array to double array
Parameters:
value (int[]): initial value
Returns:
result value
Conversion from long array to double array
Parameters:
value (long[]): initial value
Returns:
result value
Conversion from short array to double array
Parameters:
value (short[]): initial value
Returns:
result value
Conversion from String array to double array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): initial value
Returns:
result value
Conversion from DiscreteFunction to double array using the following convention
**P**: point, defined as x,y
**F**: function, defined as P1, P2, ... Pn
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Also see:
:meth:`~cern.japc.value.spi.value.simple.ValueConverter.convertToDoubleArray`
Conversion from DiscreteFunctionList to double array using the following convention
**P**: point, defined as x,y
**F**: function, defined as #P, P1, P2, ... Pn (where n = #P)
**FL**: function list, defined as #F, F1, F2, ... Fm (where m = #F)
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): - initial discrete function list to be converted
Returns:
the discrete function list encoded in a double array as specified above
Conversion from enumeration array to double array
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): initial value
Returns:
result value
Conversion from enumeration set array to double array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToDoubleArray(byteArray: typing.List[int]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToDoubleArray(discreteFunction: cern.japc.value.DiscreteFunction) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToDoubleArray(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToDoubleArray(enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToDoubleArray(enumItemArray: typing.List[cern.japc.value.EnumItem]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToDoubleArray(doubleArray: typing.List[float]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToDoubleArray(floatArray: typing.List[float]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToDoubleArray(intArray: typing.List[int]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToDoubleArray(stringArray: typing.List[str]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToDoubleArray(longArray: typing.List[int]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToDoubleArray(shortArray: typing.List[int]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToEnumItem(boolean: bool) -> cern.japc.value.EnumItem:
"""
Conversion from boolean to enumeration
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from byte to enumeration
Parameters:
value (byte): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from int to enumeration
Parameters:
value (int): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from long to enumeration
Parameters:
value (long): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from short to enumeration
Parameters:
value (short): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from float to enumeration
Parameters:
value (float): initial value
Returns:
result value
Conversion from double to enumeration
Parameters:
value (double): initial value
Returns:
result value
Conversion from enumeration to enumeration
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to enumeration
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function to enumeration
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to enumeration
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToEnumItem(byte: int, enumType: cern.japc.value.EnumType) -> cern.japc.value.EnumItem:
"""
Conversion from string to enumeration
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToEnumItem(discreteFunction: cern.japc.value.DiscreteFunction) -> cern.japc.value.EnumItem: ...
@typing.overload
@staticmethod
def convertToEnumItem(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> cern.japc.value.EnumItem: ...
@typing.overload
@staticmethod
def convertToEnumItem(enumItem: cern.japc.value.EnumItem) -> cern.japc.value.EnumItem: ...
@typing.overload
@staticmethod
def convertToEnumItem(enumItemSet: cern.japc.value.EnumItemSet) -> cern.japc.value.EnumItem: ...
@typing.overload
@staticmethod
def convertToEnumItem(double: float) -> cern.japc.value.EnumItem: ...
@typing.overload
@staticmethod
def convertToEnumItem(float: float) -> cern.japc.value.EnumItem: ...
@typing.overload
@staticmethod
def convertToEnumItem(int: int, enumType: cern.japc.value.EnumType) -> cern.japc.value.EnumItem: ...
@typing.overload
@staticmethod
def convertToEnumItem(string: str, enumType: cern.japc.value.EnumType) -> cern.japc.value.EnumItem: ...
@typing.overload
@staticmethod
def convertToEnumItem(long: int, enumType: cern.japc.value.EnumType) -> cern.japc.value.EnumItem: ...
@typing.overload
@staticmethod
def convertToEnumItem(short: int, enumType: cern.japc.value.EnumType) -> cern.japc.value.EnumItem: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(boolean: bool) -> typing.List[cern.japc.value.EnumItem]:
"""
Conversion from boolean to enumeration array
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from byte to enumeration array
Parameters:
value (byte): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from int to enumeration array;
Parameters:
value (int): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from long to enumeration array
Parameters:
value (long): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from short to enumeration array
Parameters:
value (short): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from float to enumeration array
Parameters:
value (float): initial value
Returns:
result value
Conversion from double to enumeration array
Parameters:
value (double): initial value
Returns:
result value
Conversion from string to enumeration array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to enumeration array
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration array to enumeration array
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): initial value
Returns:
result value
Conversion from enumeration set to enumeration array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from enumeration set array to enumeration array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): initial value
Returns:
result value
Conversion from discrete function to enumeration array
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to enumeration array
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
Conversion from boolean array to EnumItem array
Parameters:
value (boolean[]): initial value
Returns:
result value
Conversion from double array to EnumItem array
Parameters:
value (double[]): initial value
Returns:
result value
Conversion from float array to EnumItem array
Parameters:
value (float[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToEnumItemArray(booleanArray: typing.List[bool]) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(byte: int, enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItem]:
"""
Conversion from byte array to EnumItem array
Parameters:
value (byte[]): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from int array to long array
Parameters:
value (int[]): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from long array to long array
Parameters:
value (long[]): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from short array to long array
Parameters:
value (short[]): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from String array to long array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToEnumItemArray(byteArray: typing.List[int], enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(discreteFunction: cern.japc.value.DiscreteFunction) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(enumItem: cern.japc.value.EnumItem) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(enumItemSet: cern.japc.value.EnumItemSet) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(enumItemArray: typing.List[cern.japc.value.EnumItem]) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(double: float) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(doubleArray: typing.List[float]) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(float: float) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(floatArray: typing.List[float]) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(int: int, enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(intArray: typing.List[int], enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(string: str) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(stringArray: typing.List[str], enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(long: int, enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(longArray: typing.List[int], enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(short: int, enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemArray(shortArray: typing.List[int], enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
@staticmethod
def convertToEnumItemSet(boolean: bool) -> cern.japc.value.EnumItemSet:
"""
Conversion from boolean to enumeration set
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from any integer to enumeration set
Parameters:
value (byte): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from int to enumeration set
Parameters:
value (int): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from long to enumeration set
Parameters:
value (long): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from short to enumeration set
Parameters:
value (short): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from float to enumeration set
Parameters:
value (float): initial value
Returns:
result value
Conversion from double to enumeration set
Parameters:
value (double): initial value
Returns:
result value
Conversion from string to enumeration set
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to enumeration set
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to enumeration set
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function to enumeration set
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to enumeration set
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToEnumItemSet(byte: int, enumType: cern.japc.value.EnumType) -> cern.japc.value.EnumItemSet: ...
@typing.overload
@staticmethod
def convertToEnumItemSet(discreteFunction: cern.japc.value.DiscreteFunction) -> cern.japc.value.EnumItemSet: ...
@typing.overload
@staticmethod
def convertToEnumItemSet(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> cern.japc.value.EnumItemSet: ...
@typing.overload
@staticmethod
def convertToEnumItemSet(enumItem: cern.japc.value.EnumItem) -> cern.japc.value.EnumItemSet: ...
@typing.overload
@staticmethod
def convertToEnumItemSet(enumItemSet: cern.japc.value.EnumItemSet) -> cern.japc.value.EnumItemSet: ...
@typing.overload
@staticmethod
def convertToEnumItemSet(double: float) -> cern.japc.value.EnumItemSet: ...
@typing.overload
@staticmethod
def convertToEnumItemSet(float: float) -> cern.japc.value.EnumItemSet: ...
@typing.overload
@staticmethod
def convertToEnumItemSet(int: int, enumType: cern.japc.value.EnumType) -> cern.japc.value.EnumItemSet: ...
@typing.overload
@staticmethod
def convertToEnumItemSet(string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
@staticmethod
def convertToEnumItemSet(long: int, enumType: cern.japc.value.EnumType) -> cern.japc.value.EnumItemSet: ...
@typing.overload
@staticmethod
def convertToEnumItemSet(short: int, enumType: cern.japc.value.EnumType) -> cern.japc.value.EnumItemSet: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(boolean: bool) -> typing.List[cern.japc.value.EnumItemSet]:
"""
Conversion from boolean to enumeration set array
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from byte to enumeration set array
Parameters:
value (byte): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from int to enumeration set array
Parameters:
value (int): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from long to enumeration set array
Parameters:
value (long): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from short to enumeration set array
Parameters:
value (short): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from float to enumeration set array
Parameters:
value (float): initial value
Returns:
result value
Conversion from double to enumeration set array
Parameters:
value (double): initial value
Returns:
result value
Conversion from string to enumeration set array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to enumeration set array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from enumeration set to enumeration set array
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from discrete function to enumeration array
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to enumeration set array
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
Conversion from boolean array to enumeration set array
Parameters:
value (boolean[]): initial value
Returns:
result value
Conversion from double array to enumeration set array
Parameters:
value (double[]): initial value
Returns:
result value
Conversion from float array to enumeration set array
Parameters:
value (float[]): initial value
Returns:
result value
Conversion from enumeration set array to enumeration set array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): initial value
Returns:
result value
Conversion from String array to enumeration set array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): initial value
Returns:
result value
Conversion from enumeration array to enumeration set array
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(booleanArray: typing.List[bool]) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(byte: int, enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItemSet]:
"""
Conversion from byte array to enumeration set array
Parameters:
value (byte[]): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from int array to enumeration set array
Parameters:
value (int[]): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from long array to enumeration set array
Parameters:
value (long[]): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
Conversion from short array to enumeration set array
Parameters:
value (short[]): initial value
enumType (:class:`~cern.japc.value.EnumType`): enumeration type
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(byteArray: typing.List[int], enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(discreteFunction: cern.japc.value.DiscreteFunction) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(enumItem: cern.japc.value.EnumItem) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(enumItemSet: cern.japc.value.EnumItemSet) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(enumItemArray: typing.List[cern.japc.value.EnumItem]) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(double: float) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(doubleArray: typing.List[float]) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(float: float) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(floatArray: typing.List[float]) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(int: int, enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(intArray: typing.List[int], enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(string: str) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(stringArray: typing.List[str]) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(long: int, enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(longArray: typing.List[int], enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(short: int, enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToEnumItemSetArray(shortArray: typing.List[int], enumType: cern.japc.value.EnumType) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
@staticmethod
def convertToFloat(boolean: bool) -> float:
"""
Conversion from float to float
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from double to float
Parameters:
value (float): initial value
Returns:
result value
Conversion from double to float
Parameters:
value (double): initial value
Returns:
result value
Conversion from byte, short, int to float
Parameters:
value (int): initial value
Returns:
result value
Conversion from long to float
Parameters:
value (long): initial value
Returns:
result value
Conversion from string to float
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to float
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to float
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function to float
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to float
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToFloat(discreteFunction: cern.japc.value.DiscreteFunction) -> float: ...
@typing.overload
@staticmethod
def convertToFloat(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> float: ...
@typing.overload
@staticmethod
def convertToFloat(enumItem: cern.japc.value.EnumItem) -> float: ...
@typing.overload
@staticmethod
def convertToFloat(enumItemSet: cern.japc.value.EnumItemSet) -> float: ...
@typing.overload
@staticmethod
def convertToFloat(double: float) -> float: ...
@typing.overload
@staticmethod
def convertToFloat(float: float) -> float: ...
@typing.overload
@staticmethod
def convertToFloat(int: int) -> float: ...
@typing.overload
@staticmethod
def convertToFloat(string: str) -> float: ...
@typing.overload
@staticmethod
def convertToFloat(long: int) -> float: ...
@typing.overload
@staticmethod
def convertToFloatArray(booleanArray: typing.List[bool]) -> typing.List[float]:
"""
Conversion from boolean array to float array
Parameters:
value (boolean[]): initial value
Returns:
result value
Conversion from byte array to float array
Parameters:
value (byte[]): initial value
Returns:
result value
Conversion from double array to float array
Parameters:
value (double[]): initial value
Returns:
result value
Conversion from float array to float array
Parameters:
value (float[]): initial value
Returns:
result value
Conversion from int array to float array
Parameters:
value (int[]): initial value
Returns:
result value
Conversion from long array to float array
Parameters:
value (long[]): initial value
Returns:
result value
Conversion from short array to float array
Parameters:
value (short[]): initial value
Returns:
result value
Conversion from String array to float array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): initial value
Returns:
result value
Conversion from enumeration array to float array
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): initial value
Returns:
result value
Conversion from enumeration set array to float array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToFloatArray(byteArray: typing.List[int]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToFloatArray(enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToFloatArray(enumItemArray: typing.List[cern.japc.value.EnumItem]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToFloatArray(doubleArray: typing.List[float]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToFloatArray(floatArray: typing.List[float]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToFloatArray(intArray: typing.List[int]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToFloatArray(stringArray: typing.List[str]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToFloatArray(longArray: typing.List[int]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToFloatArray(shortArray: typing.List[int]) -> typing.List[float]: ...
@typing.overload
@staticmethod
def convertToInt(boolean: bool) -> int:
"""
Conversion from boolean to int
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from float to int
Parameters:
value (float): initial value
Returns:
result value
Conversion from double to int
Parameters:
value (double): initial value
Returns:
result value
Conversion from long to int
Parameters:
value (long): initial value
Returns:
result value
Conversion from string to int
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to int
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to int
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function to int
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to int
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToInt(discreteFunction: cern.japc.value.DiscreteFunction) -> int: ...
@typing.overload
@staticmethod
def convertToInt(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> int: ...
@typing.overload
@staticmethod
def convertToInt(enumItem: cern.japc.value.EnumItem) -> int: ...
@typing.overload
@staticmethod
def convertToInt(enumItemSet: cern.japc.value.EnumItemSet) -> int: ...
@typing.overload
@staticmethod
def convertToInt(double: float) -> int: ...
@typing.overload
@staticmethod
def convertToInt(float: float) -> int: ...
@typing.overload
@staticmethod
def convertToInt(string: str) -> int: ...
@typing.overload
@staticmethod
def convertToInt(long: int) -> int: ...
@typing.overload
@staticmethod
def convertToIntArray(booleanArray: typing.List[bool]) -> typing.List[int]:
"""
Conversion from boolean array to int array
Parameters:
value (boolean[]): initial value
Returns:
result value
Conversion from byte array to int array
Parameters:
value (byte[]): initial value
Returns:
result value
Conversion from double array to int array
Parameters:
value (double[]): initial value
Returns:
result value
Conversion from float array to int array
Parameters:
value (float[]): initial value
Returns:
result value
Conversion from int array to int array
Parameters:
value (int[]): initial value
Returns:
result value
Conversion from long array to int array
Parameters:
value (long[]): initial value
Returns:
result value
Conversion from short array to int array
Parameters:
value (short[]): initial value
Returns:
result value
Conversion from String array to int array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): initial value
Returns:
result value
Conversion from enumeration array to int array
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): initial value
Returns:
result value
Conversion from enumeration set array to int array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToIntArray(byteArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToIntArray(enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToIntArray(enumItemArray: typing.List[cern.japc.value.EnumItem]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToIntArray(doubleArray: typing.List[float]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToIntArray(floatArray: typing.List[float]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToIntArray(intArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToIntArray(stringArray: typing.List[str]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToIntArray(longArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToIntArray(shortArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToLong(boolean: bool) -> int:
"""
Conversion from boolean to long
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from float to long
Parameters:
value (float): initial value
Returns:
result value
Conversion from long to long
Parameters:
value (long): initial value
Returns:
result value
Conversion from double to long
Parameters:
value (double): initial value
Returns:
result value
Conversion from string to long
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to long
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to long
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function to long
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to long
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToLong(discreteFunction: cern.japc.value.DiscreteFunction) -> int: ...
@typing.overload
@staticmethod
def convertToLong(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> int: ...
@typing.overload
@staticmethod
def convertToLong(enumItem: cern.japc.value.EnumItem) -> int: ...
@typing.overload
@staticmethod
def convertToLong(enumItemSet: cern.japc.value.EnumItemSet) -> int: ...
@typing.overload
@staticmethod
def convertToLong(double: float) -> int: ...
@typing.overload
@staticmethod
def convertToLong(float: float) -> int: ...
@typing.overload
@staticmethod
def convertToLong(string: str) -> int: ...
@typing.overload
@staticmethod
def convertToLong(long: int) -> int: ...
@typing.overload
@staticmethod
def convertToLongArray(booleanArray: typing.List[bool]) -> typing.List[int]:
"""
Conversion from boolean array to long array
Parameters:
value (boolean[]): initial value
Returns:
result value
Conversion from byte array to long array
Parameters:
value (byte[]): initial value
Returns:
result value
Conversion from double array to long array
Parameters:
value (double[]): initial value
Returns:
result value
Conversion from float array to long array
Parameters:
value (float[]): initial value
Returns:
result value
Conversion from int array to long array
Parameters:
value (int[]): initial value
Returns:
result value
Conversion from long array to long array
Parameters:
value (long[]): initial value
Returns:
result value
Conversion from short array to long array
Parameters:
value (short[]): initial value
Returns:
result value
Conversion from String array to long array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): initial value
Returns:
result value
Conversion from enumeration array to long array
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): initial value
Returns:
result value
Conversion from enumeration set array to long array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToLongArray(byteArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToLongArray(enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToLongArray(enumItemArray: typing.List[cern.japc.value.EnumItem]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToLongArray(doubleArray: typing.List[float]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToLongArray(floatArray: typing.List[float]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToLongArray(intArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToLongArray(stringArray: typing.List[str]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToLongArray(longArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToLongArray(shortArray: typing.List[int]) -> typing.List[int]: ...
@staticmethod
def convertToPrimitiveArray(objectArray: typing.List[typing.Any]) -> typing.Any:
"""
Converts an array of Strings or primitive type wrappers into the corresponding array of Strings or primitive types.
Parameters:
array (`Object <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true>`[]): an array of Strings or primitive type wrappers
Returns:
the corresponding array of Strings or primitive types
Raises:
: if the array contains any other objects
"""
...
@typing.overload
@staticmethod
def convertToShort(boolean: bool) -> int:
"""
Conversion from boolean to short
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from int to short
Parameters:
value (int): initial value
Returns:
result value
Conversion from long to short
Parameters:
value (long): initial value
Returns:
result value
Conversion from float to short
Parameters:
value (float): initial value
Returns:
result value
Conversion from double to short
Parameters:
value (double): initial value
Returns:
result value
Conversion from string to short
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to short
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to short
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function to short
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to short
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToShort(discreteFunction: cern.japc.value.DiscreteFunction) -> int: ...
@typing.overload
@staticmethod
def convertToShort(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> int: ...
@typing.overload
@staticmethod
def convertToShort(enumItem: cern.japc.value.EnumItem) -> int: ...
@typing.overload
@staticmethod
def convertToShort(enumItemSet: cern.japc.value.EnumItemSet) -> int: ...
@typing.overload
@staticmethod
def convertToShort(double: float) -> int: ...
@typing.overload
@staticmethod
def convertToShort(float: float) -> int: ...
@typing.overload
@staticmethod
def convertToShort(int: int) -> int: ...
@typing.overload
@staticmethod
def convertToShort(string: str) -> int: ...
@typing.overload
@staticmethod
def convertToShort(long: int) -> int: ...
@typing.overload
@staticmethod
def convertToShortArray(booleanArray: typing.List[bool]) -> typing.List[int]:
"""
Conversion from boolean array to short array
Parameters:
value (boolean[]): initial value
Returns:
result value
Conversion from byte array to short array
Parameters:
value (byte[]): initial value
Returns:
result value
Conversion from double array to short array
Parameters:
value (double[]): initial value
Returns:
result value
Conversion from float array to short array
Parameters:
value (float[]): initial value
Returns:
result value
Conversion from int array to short array
Parameters:
value (int[]): initial value
Returns:
result value
Conversion from long array to short array
Parameters:
value (long[]): initial value
Returns:
result value
Conversion from short array to short array
Parameters:
value (short[]): initial value
Returns:
result value
Conversion from String array to short array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): initial value
Returns:
result value
Conversion from enumeration array to short array
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): initial value
Returns:
result value
Conversion from enumeration set array to short array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToShortArray(byteArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToShortArray(enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToShortArray(enumItemArray: typing.List[cern.japc.value.EnumItem]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToShortArray(doubleArray: typing.List[float]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToShortArray(floatArray: typing.List[float]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToShortArray(intArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToShortArray(stringArray: typing.List[str]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToShortArray(longArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToShortArray(shortArray: typing.List[int]) -> typing.List[int]: ...
@typing.overload
@staticmethod
def convertToString(boolean: bool) -> str:
"""
Conversion from boolean to string
Parameters:
value (boolean): initial value
Returns:
result value
Conversion from byte to string
Parameters:
value (byte): initial value
Returns:
result value
Conversion from int to string
Parameters:
value (int): initial value
Returns:
result value
Conversion from long to string
Parameters:
value (long): initial value
Returns:
result value
Conversion from long to string usign a certain format pattern (JAPC-351).
Parameters:
formatPattern (long): The format pattern used to convert given values in conversions methods.(Cannot be null)
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): The value to convert using the format pattern provided in the constructor.
Returns:
result value.
Conversion from short to string
Parameters:
value (short): initial value
Returns:
result value
Conversion from float to string
Parameters:
value (float): initial value
Returns:
result value
Conversion from double to string
Parameters:
value (double): initial value
Returns:
result value
Conversion from string to string
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): initial value
Returns:
result value
Conversion from enumeration to string
Parameters:
value (:class:`~cern.japc.value.EnumItem`): initial value
Returns:
result value
Conversion from enumeration set to string
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): initial value
Returns:
result value
Conversion from discrete function to string
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): initial value
Returns:
result value
Conversion from discrete function list to string
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): initial value
Returns:
result value
Conversion from byte array to string
Parameters:
value (byte[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToString(byte: int) -> str: ...
@typing.overload
@staticmethod
def convertToString(byteArray: typing.List[int]) -> str: ...
@typing.overload
@staticmethod
def convertToString(discreteFunction: cern.japc.value.DiscreteFunction) -> str: ...
@typing.overload
@staticmethod
def convertToString(discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> str: ...
@typing.overload
@staticmethod
def convertToString(enumItem: cern.japc.value.EnumItem) -> str: ...
@typing.overload
@staticmethod
def convertToString(enumItemSet: cern.japc.value.EnumItemSet) -> str: ...
@typing.overload
@staticmethod
def convertToString(double: float) -> str: ...
@typing.overload
@staticmethod
def convertToString(float: float) -> str: ...
@typing.overload
@staticmethod
def convertToString(int: int) -> str: ...
@typing.overload
@staticmethod
def convertToString(string: str) -> str: ...
@typing.overload
@staticmethod
def convertToString(long: int) -> str: ...
@typing.overload
@staticmethod
def convertToString(long: int, string: str) -> str: ...
@typing.overload
@staticmethod
def convertToString(short: int) -> str: ...
@typing.overload
@staticmethod
def convertToStringArray(booleanArray: typing.List[bool]) -> typing.List[str]:
"""
Conversion from boolean array to String array
Parameters:
value (boolean[]): initial value
Returns:
result value
Conversion from byte array to String array
Parameters:
value (byte[]): initial value
Returns:
result value
Conversion from double array to String array
Parameters:
value (double[]): initial value
Returns:
result value
Conversion from float array to String array
Parameters:
value (float[]): initial value
Returns:
result value
Conversion from int array to String array
Parameters:
value (int[]): initial value
Returns:
result value
Conversion from long array to String array
Parameters:
value (long[]): initial value
Returns:
result value
Conversion from value array to String array
Parameters:
value (short[]): initial value
Returns:
result value
Conversion from enumeration array to string array
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): initial value
Returns:
result value
Conversion from enumeration set array to string array
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): initial value
Returns:
result value
Conversion from String array to String array
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): initial value
Returns:
result value
"""
...
@typing.overload
@staticmethod
def convertToStringArray(byteArray: typing.List[int]) -> typing.List[str]: ...
@typing.overload
@staticmethod
def convertToStringArray(enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> typing.List[str]: ...
@typing.overload
@staticmethod
def convertToStringArray(enumItemArray: typing.List[cern.japc.value.EnumItem]) -> typing.List[str]: ...
@typing.overload
@staticmethod
def convertToStringArray(doubleArray: typing.List[float]) -> typing.List[str]: ...
@typing.overload
@staticmethod
def convertToStringArray(floatArray: typing.List[float]) -> typing.List[str]: ...
@typing.overload
@staticmethod
def convertToStringArray(intArray: typing.List[int]) -> typing.List[str]: ...
@typing.overload
@staticmethod
def convertToStringArray(stringArray: typing.List[str]) -> typing.List[str]: ...
@typing.overload
@staticmethod
def convertToStringArray(longArray: typing.List[int]) -> typing.List[str]: ...
@typing.overload
@staticmethod
def convertToStringArray(shortArray: typing.List[int]) -> typing.List[str]: ...
class AbstractSimpleValue(AbstractMapSimpleValue, cern.japc.value.SimpleParameterValue, UpdatableParameterValue, java.io.Serializable, java.lang.Cloneable):
"""
public abstract class AbstractSimpleValue extends :class:`~cern.japc.value.spi.value.simple.AbstractMapSimpleValue` implements :class:`~cern.japc.value.SimpleParameterValue`, :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`, `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
This abstract class provides the basic services needed to manage a SimpleParameterValue that is either a simple scalar
or String or an array of simple scalars or Strings. That includes the methods to get and set the value type and the to
String method.
Also see:
:meth:`~serialized`
"""
def __init__(self, valueType: cern.japc.value.ValueType): ...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
in class
"""
...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration. The value returned is the nth one from the array where n is given
by the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration set. The value returned is the nth one from the array where n is
given by the index. If the underlying value is not an array the index is ignored the the value is returned. If the value
is an array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSets(self, string: str) -> typing.List[cern.japc.value.EnumItemSet]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSets`
Returns a sub array of the value being interpreted as an array of enumeration item sets. The subarray starts at
startIndex and contains the number of element given by length. If startIndex+length is greater than the number of values
in the underlying array an exception is thrown. If the value is not an array, the value is returned encapsulated in an
array of size 1, ignoring the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSets`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as an array of enumeration items.
"""
...
@typing.overload
def getEnumItemSets(self) -> typing.List[cern.japc.value.EnumItemSet]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSets`
Returns the value being interpreted as an array of enumeration item sets. If the value can't be represented as an array
of enumeration item sets, ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSets`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an array of enumeration item sets.
"""
...
@typing.overload
def getEnumItemSets(self, int: int, int2: int) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
def getEnumItems(self, string: str) -> typing.List[cern.japc.value.EnumItem]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItems`
Returns a sub array of the value being interpreted as an array of enumeration items. The subarray starts at startIndex
and contains the number of element given by length. If startIndex+length is greater than the number of values in the
underlying array an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of
size 1, ignoring the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItems` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as an array of enumeration items.
"""
...
@typing.overload
def getEnumItems(self) -> typing.List[cern.japc.value.EnumItem]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItems`
Returns the value being interpreted as an array of enumeration items. If the value can't be represented as an array of
enumeration items, ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItems` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an array of enumeration items.
"""
...
@typing.overload
def getEnumItems(self, int: int, int2: int) -> typing.List[cern.japc.value.EnumItem]: ...
def getFormatPattern(self) -> str:
"""
Returns:
Returns the formatPattern.
"""
...
@typing.overload
def getMaxValue(self, string: str) -> float: ...
@typing.overload
def getMaxValue(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getMaxValue`
Returns the allowed maximum of this value. The maximum is usually the same as the one given by the descriptor. If the
maximum is dynamic, the one from the descriptor cannot be defined and this method returns the correct value. If no
maximum is defined the :code:`Double.NaN` is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getMaxValue` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the allowed maximum of this value or :code:`Double.NaN`
"""
...
@typing.overload
def getMinValue(self, string: str) -> float: ...
@typing.overload
def getMinValue(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getMinValue`
Returns the allowed minimum of this value. The minimum is usually the same as the one given by the descriptor. If the
minimum is dynamic, the one from the descriptor cannot be defined and this method returns the correct value. If no
minimum is defined the :code:`Double.NaN` is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getMinValue` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the allowed minimum of this value or :code:`Double.NaN`
"""
...
@typing.overload
def getUnit(self, string: str) -> str: ...
@typing.overload
def getUnit(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getUnit`
Returns the unit of this value. The unit is usually the same as the one given by the descriptor. If the unit is dynamic,
the one from the descriptor cannot be defined and this method returns the correct value. If no unit is defined an empty
string is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getUnit` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the unit of this value or an empty string
"""
...
def getValueStatus(self) -> cern.japc.value.SimpleValueStatus:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getValueStatus`
Returns the :class:`~cern.japc.value.SimpleValueStatus` object of this value. It represents additional information about
value acquisition.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getValueStatus`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the :class:`~cern.japc.value.SimpleValueStatus` object of this value.
"""
...
@typing.overload
def getValueType(self, string: str) -> cern.japc.value.ValueType: ...
@typing.overload
def getValueType(self) -> cern.japc.value.ValueType:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getValueType`
Returns the value type of the value interpreted by this reader
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getValueType` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value type of the value interpreted by this reader
"""
...
@typing.overload
def getXMaxValue(self, string: str) -> float: ...
@typing.overload
def getXMaxValue(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getXMaxValue`
If the value is a function, this method returns the allowed maximum of X axis. The maximum is usually the same as the
one given by the descriptor. If the maximum is dynamic, the one from the descriptor cannot be defined and this method
returns the correct value. If the value is not a function or no maximum is defined the :code:`Double.NaN` is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getXMaxValue` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the allowed maximum of X axis for this value or :code:`Double.NaN`
"""
...
@typing.overload
def getXMinValue(self, string: str) -> float: ...
@typing.overload
def getXMinValue(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getXMinValue`
If the value is a function, this method returns the allowed minimum of X axis. The minimum is usually the same as the
one given by the descriptor. If the minimum is dynamic, the one from the descriptor cannot be defined and this method
returns the correct value. If the value is not a function or no minimum is defined the :code:`Double.NaN` is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getXMinValue` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the allowed minimum of X axis for this value or :code:`Double.NaN`
"""
...
@typing.overload
def getXUnit(self, string: str) -> str: ...
@typing.overload
def getXUnit(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getXUnit`
If the value is a function, this method returns the unit of X axis. The unit is usually the same as the one given by the
descriptor. If the unit is dynamic, the one from the descriptor cannot be defined and this method returns the correct
value. If the value is not a function or no unit is defined an empty string is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getXUnit` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the unit of X axis or an empty string
"""
...
@typing.overload
def getYMaxValue(self, string: str) -> float: ...
@typing.overload
def getYMaxValue(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getYMaxValue`
If the value is a function, this method returns the allowed maximum of Y axis. The maximum is usually the same as the
one given by the descriptor. If the maximum is dynamic, the one from the descriptor cannot be defined and this method
returns the correct value. If no maximum is defined the :code:`Double.NaN` is returned. If the value is not a function
this method returns the same result as :meth:`~cern.japc.value.SimpleParameterValue.getMaxValue`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getYMaxValue` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the allowed maximum of Y axis for this value or :code:`Double.NaN`
"""
...
@typing.overload
def getYMinValue(self, string: str) -> float: ...
@typing.overload
def getYMinValue(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getYMinValue`
If the value is a function, this method returns the allowed minimum of Y axis. The minimum is usually the same as the
one given by the descriptor. If the minimum is dynamic, the one from the descriptor cannot be defined and this method
returns the correct value. If no minimum is defined the :code:`Double.NaN` is returned. If the value is not a function
this method returns the same result as :meth:`~cern.japc.value.SimpleParameterValue.getMinValue`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getYMinValue` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the allowed minimum of Y axis for this value or :code:`Double.NaN`
"""
...
@typing.overload
def getYUnit(self, string: str) -> str: ...
@typing.overload
def getYUnit(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getYUnit`
If the value is a function, this method returns the unit of Y axis. The unit is usually the same as the one given by the
descriptor. If the unit is dynamic, the one from the descriptor cannot be defined and this method returns the correct
value. If no unit is defined an empty string is returned. If the value is not a function this method returns the same
result as :meth:`~cern.japc.value.SimpleParameterValue.getUnit`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getYUnit` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the unit of Y axis or an empty string
"""
...
def hashCode(self) -> int:
"""
Overrides:
in class
"""
...
def initializeWithDescriptor(self, simpleDescriptor: cern.japc.value.SimpleDescriptor) -> None:
"""
Extracts necessary descriptor information into the value.
Parameters:
descriptor (:class:`~cern.japc.value.SimpleDescriptor`): value descriptor
"""
...
@typing.overload
@staticmethod
def newSimpleValue(valueType: cern.japc.value.ValueType) -> 'AbstractSimpleValue':
"""
Creates a new simple parameter value based on the given value type.
Parameters:
valueType (:class:`~cern.japc.value.ValueType`): the type of the parameter value to create.
Returns:
a new parameter value of given type.
Creates a new enum-based simple parameter value.
Parameters:
valueType (:class:`~cern.japc.value.ValueType`): the type of the parameter value to create.
enumType (:class:`~cern.japc.value.EnumType`): the enumeration type
Returns:
a new parameter value of given type.
"""
...
@typing.overload
@staticmethod
def newSimpleValue(valueType: cern.japc.value.ValueType, enumType: cern.japc.value.EnumType) -> 'AbstractSimpleValue': ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value at the given index to the given enumeration item. The value set is the nth one from the array where n is
given by the index. If the underlying value is not an array the index is ignored and the value is set. If this value is
not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (:class:`~cern.japc.value.EnumItem`): the enumeration item to set at the given index.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value at the given index to the given enumeration items set. The value set is the nth one from the array where
n is given by the index. If the underlying value is not an array the index is ignored and the value is set. If this
value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (:class:`~cern.japc.value.EnumItemSet`): the enumeration items set to set at the given index.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSets(self, string: str, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> None: ...
@typing.overload
def setEnumItemSets(self, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSets`
Sets the value being a EnumItemSet array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSets`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): the EnumItemSet array value.
"""
...
@typing.overload
def setEnumItemSets2D(self, string: str, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet], intArray: typing.List[int]) -> None: ...
@typing.overload
def setEnumItemSets2D(self, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSets2D`
Sets the value being a 2-dimensional enumeration set array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSets2D`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): the enumeration set array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setEnumItems(self, string: str, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None: ...
@typing.overload
def setEnumItems(self, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItems`
Sets the value being a EnumItem array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItems` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): the EnumItem array value.
"""
...
@typing.overload
def setEnumItems2D(self, string: str, enumItemArray: typing.List[cern.japc.value.EnumItem], intArray: typing.List[int]) -> None: ...
@typing.overload
def setEnumItems2D(self, enumItemArray: typing.List[cern.japc.value.EnumItem], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItems2D`
Sets the value being a 2-dimensional enumeration array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItems2D`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): the enumeration array value.
dimensions (int[]): the dimensions of the array
"""
...
def setFormatPattern(self, string: str) -> None:
"""
Parameters:
formatPattern (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): The formatPattern to set.
"""
...
def setMaxValue(self, double: float) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setMaxValue`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
maxValue (double): maximum to set
"""
...
def setMinValue(self, double: float) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setMinValue`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
minValue (double): minimum to set
"""
...
@typing.overload
def setObject(self, string: str, object: typing.Any) -> None: ...
@typing.overload
def setObject(self, object: typing.Any) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setObject`
Sets the value as an object. This method can handle any scalar wrapping Object type as well as arrays and string. If
other type was passed a `null
<http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/IllegalArgumentException.html?is-external=true>` will be
thrown. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (`Object <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true>`): the value as an object.
"""
...
@typing.overload
def setObjects2D(self, string: str, object: typing.Any, intArray: typing.List[int]) -> None: ...
@typing.overload
def setObjects2D(self, object: typing.Any, intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setObjects2D`
Sets the value as a 2d array of objects. This method can handle any array of primitives and Strings, which will be used
as a source for 2D array. If other type was passed a `null
<http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/IllegalArgumentException.html?is-external=true>` will be
thrown. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setObjects2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (`Object <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true>`): the value as an object.
dimensions (int[]): the dimensions of the 2D array
"""
...
def setUnit(self, string: str) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setUnit`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
unit (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): unit to set
"""
...
def setValueStatus(self, simpleValueStatus: cern.japc.value.SimpleValueStatus) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setValueStatus`
Sets the value status.
If the value is immutable a `null
<http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/RuntimeException.html?is-external=true>` will be thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setValueStatus`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
valueStatus (:class:`~cern.japc.value.SimpleValueStatus`): new valueStatus
"""
...
def setXMaxValue(self, double: float) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setXMaxValue`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
xMaxValue (double): maximum of X axis to set (makes sense for function values only)
"""
...
def setXMinValue(self, double: float) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setXMinValue`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
xMinValue (double): minimum of X axis to set (makes sense for function values only)
"""
...
def setXUnit(self, string: str) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setXUnit`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
xUnit (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): unit of X axis set (makes sense for function values only)
"""
...
def setYMaxValue(self, double: float) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setYMaxValue`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
yMaxValue (double): maximum of Y axis to set (makes sense for function values only)
"""
...
def setYMinValue(self, double: float) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setYMinValue`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
yMinValue (double): minimum of Y axis to set (makes sense for function values only)
"""
...
def setYUnit(self, string: str) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setYUnit`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
yUnit (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): unit of Y axis to set (makes sense for function values only)
"""
...
def toString(self) -> str:
"""
Overrides:
in class
"""
...
class AbstractArrayValue(AbstractSimpleValue, java.io.Serializable, java.lang.Cloneable):
"""
public abstract class AbstractArrayValue extends :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
This abstract class provides the basic services needed to manage a value that is an array. That includes the methods to
get and set the value as a String, the methods to get the value as a non array value and the methods to extract a sub
array.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self, valueType: cern.japc.value.ValueType): ...
@typing.overload
def __init__(self, valueType: cern.japc.value.ValueType, int: int): ...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getArray2D(self) -> cern.japc.value.Array2D:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getArray2D`
Returns a wrapper around the value being interpreted as a 2d array. If the value is a 1d array it is encapsulated in an
array of size 1xn. If the value is not an array it is encapsulated in an array of size 1x1. IMPORTANT: if the value is
mutable and is changed after the wrapper is got the wrapper becomes invalide and can return wrong values or even throw
OutOfBoundException.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getArray2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean 2d array.
"""
...
@typing.overload
def getArray2D(self, string: str) -> cern.japc.value.Array2D: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getBooleans(self) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBooleans`
Returns the value being interpreted as a boolean array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type boolean array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean array.
"""
...
@typing.overload
def getBooleans(self, string: str) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBooleans`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a boolean array.
"""
...
@typing.overload
def getBooleans(self, string: str, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getBytes(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns the value being interpreted as a byte array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type byte array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getBytes(self, int: int, int2: int) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getBytes(self, string: str) -> typing.List[int]: ...
@typing.overload
def getBytes(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getColumnCount(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getColumnCount`
Returns the number of columns for the case when the value is represented as 2-dimensional array. For scalar which are
not bit-pattern will always return 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getColumnCount`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the number of columns for the case when the value is represented as 2-dimensional array
"""
...
@typing.overload
def getColumnCount(self, string: str) -> int: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getDoubles(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDoubles`
Returns the value being interpreted as a double array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type double array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double array.
"""
...
@typing.overload
def getDoubles(self, string: str) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDoubles`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a double array.
"""
...
@typing.overload
def getDoubles(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getDoubles(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSets(self, int: int, int2: int) -> typing.List[cern.japc.value.EnumItemSet]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSets`
Returns a sub array of the value being interpreted as an array of enumeration item sets. The subarray starts at
startIndex and contains the number of element given by length. If startIndex+length is greater than the number of values
in the underlying array an exception is thrown. If the value is not an array, the value is returned encapsulated in an
array of size 1, ignoring the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSets`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.getEnumItemSets`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as an array of enumeration items.
"""
...
@typing.overload
def getEnumItemSets(self, string: str) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
def getEnumItemSets(self) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
def getEnumItems(self, int: int, int2: int) -> typing.List[cern.japc.value.EnumItem]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItems`
Returns a sub array of the value being interpreted as an array of enumeration items. The subarray starts at startIndex
and contains the number of element given by length. If startIndex+length is greater than the number of values in the
underlying array an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of
size 1, ignoring the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItems` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.getEnumItems`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as an array of enumeration items.
"""
...
@typing.overload
def getEnumItems(self, string: str) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
def getEnumItems(self) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloats(self, int: int, int2: int) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloats`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a float array.
"""
...
@typing.overload
def getFloats(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloats`
Returns the value being interpreted as a float array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type float array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float array.
"""
...
@typing.overload
def getFloats(self, string: str) -> typing.List[float]: ...
@typing.overload
def getFloats(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInts(self, int: int, int2: int) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInts`
Returns the value being interpreted as a int array. If the value is not an array it is encapsulated in an array of size
1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a int array.
"""
...
@typing.overload
def getInts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInts`
Returns the value being interpreted as a int array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type int array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int array.
"""
...
@typing.overload
def getInts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getInts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLongs(self, int: int, int2: int) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLongs`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a long array.
"""
...
@typing.overload
def getLongs(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLongs`
Returns the value being interpreted as a long array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type long array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long array.
"""
...
@typing.overload
def getLongs(self, string: str) -> typing.List[int]: ...
@typing.overload
def getLongs(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getRowCount(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getRowCount`
Returns the number of rows for the case when the value is represented as 2-dimensional array. For scalar and
1-dimensional arrays will always return 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getRowCount` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the number of rows for the case when the value is represented as 2-dimensional array
"""
...
@typing.overload
def getRowCount(self, string: str) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShorts(self, int: int, int2: int) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShorts`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a short array.
"""
...
@typing.overload
def getShorts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShorts`
Returns the value being interpreted as a short array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type short array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short array.
"""
...
@typing.overload
def getShorts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getShorts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getStrings(self, int: int, int2: int) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getStrings`
Returns a sub array of the value being interpreted as a string array. The subarray starts at startIndex and contains the
number of element given by length. If startIndex+length is greater than the number of values in the underlying array an
exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a String array.
"""
...
@typing.overload
def getStrings(self) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getStrings`
Returns the value being interpreted as a String array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type String array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a String array.
"""
...
@typing.overload
def getStrings(self, string: str) -> typing.List[str]: ...
@typing.overload
def getStrings(self, string: str, int: int, int2: int) -> typing.List[str]: ...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBooleans(self, booleanArray: typing.List[bool]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBooleans`
Sets the value being a boolean array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean[]): the boolean array value.
"""
...
@typing.overload
def setBooleans(self, string: str, booleanArray: typing.List[bool]) -> None: ...
@typing.overload
def setBooleans2D(self, booleanArray: typing.List[bool], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBooleans2D`
Sets the value being a 2-dimensional boolean array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBooleans2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean[]): the boolean array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setBooleans2D(self, string: str, booleanArray: typing.List[bool], intArray: typing.List[int]) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setBytes(self, byteArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBytes`
Sets the value being a byte array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte[]): the byte array value.
"""
...
@typing.overload
def setBytes(self, string: str, byteArray: typing.List[int]) -> None: ...
@typing.overload
def setBytes2D(self, byteArray: typing.List[int], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBytes2D`
Sets the value being a 2-dimensional byte array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBytes2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte[]): the byte array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setBytes2D(self, string: str, byteArray: typing.List[int], intArray: typing.List[int]) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDoubles(self, doubleArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDoubles`
Sets the value being a double array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double[]): the double array value.
"""
...
@typing.overload
def setDoubles(self, string: str, doubleArray: typing.List[float]) -> None: ...
@typing.overload
def setDoubles2D(self, doubleArray: typing.List[float], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDoubles2D`
Sets the value being a 2-dimensional double array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDoubles2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double[]): the double array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setDoubles2D(self, string: str, doubleArray: typing.List[float], intArray: typing.List[int]) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSets(self, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSets`
Sets the value being a EnumItemSet array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSets`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.setEnumItemSets`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): the EnumItemSet array value.
"""
...
@typing.overload
def setEnumItemSets(self, string: str, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]) -> None: ...
@typing.overload
def setEnumItemSets2D(self, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSets2D`
Sets the value being a 2-dimensional enumeration set array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSets2D`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.setEnumItemSets2D`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`[]): the enumeration set array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setEnumItemSets2D(self, string: str, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet], intArray: typing.List[int]) -> None: ...
@typing.overload
def setEnumItems(self, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItems`
Sets the value being a EnumItem array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItems` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.setEnumItems`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): the EnumItem array value.
"""
...
@typing.overload
def setEnumItems(self, string: str, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None: ...
@typing.overload
def setEnumItems2D(self, enumItemArray: typing.List[cern.japc.value.EnumItem], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItems2D`
Sets the value being a 2-dimensional enumeration array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItems2D`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.setEnumItems2D`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`[]): the enumeration array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setEnumItems2D(self, string: str, enumItemArray: typing.List[cern.japc.value.EnumItem], intArray: typing.List[int]) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloats(self, floatArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloats`
Sets the value being a float array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float[]): the float array value.
"""
...
@typing.overload
def setFloats(self, string: str, floatArray: typing.List[float]) -> None: ...
@typing.overload
def setFloats2D(self, floatArray: typing.List[float], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloats2D`
Sets the value being a 2-dimensional float array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloats2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float[]): the float array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setFloats2D(self, string: str, floatArray: typing.List[float], intArray: typing.List[int]) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInts(self, intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInts`
Sets the value being a int array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int[]): the int array value.
"""
...
@typing.overload
def setInts(self, string: str, intArray: typing.List[int]) -> None: ...
@typing.overload
def setInts2D(self, intArray: typing.List[int], intArray2: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInts2D`
Sets the value being a 2-dimensional int array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInts2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int[]): the int array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setInts2D(self, string: str, intArray: typing.List[int], intArray2: typing.List[int]) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLongs(self, longArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLongs`
Sets the value being a long array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long[]): the long array value.
"""
...
@typing.overload
def setLongs(self, string: str, longArray: typing.List[int]) -> None: ...
@typing.overload
def setLongs2D(self, longArray: typing.List[int], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLongs2D`
Sets the value being a 2-dimensional long array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLongs2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long[]): the long array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setLongs2D(self, string: str, longArray: typing.List[int], intArray: typing.List[int]) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShorts(self, shortArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShorts`
Sets the value being a short array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short[]): the short array value.
"""
...
@typing.overload
def setShorts(self, string: str, shortArray: typing.List[int]) -> None: ...
@typing.overload
def setShorts2D(self, shortArray: typing.List[int], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShorts2D`
Sets the value being a 2-dimensional short array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShorts2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short[]): the short array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setShorts2D(self, string: str, shortArray: typing.List[int], intArray: typing.List[int]) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setStrings(self, stringArray: typing.List[str]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setStrings`
Sets the value being a String array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): the String array value.
"""
...
@typing.overload
def setStrings(self, string: str, stringArray: typing.List[str]) -> None: ...
@typing.overload
def setStrings2D(self, stringArray: typing.List[str], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setStrings2D`
Sets the value being a 2-dimensional String array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setStrings2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): the String array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setStrings2D(self, string: str, stringArray: typing.List[str], intArray: typing.List[int]) -> None: ...
class AbstractScalarValue(AbstractSimpleValue, java.io.Serializable, java.lang.Cloneable):
"""
public abstract class AbstractScalarValue extends :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
This abstract class provides the basic services needed to manage a value that is a simple scalar or a String. That
includes the methods to get the value as an array and the methods to extract a sub array or a single value. In all those
case the simple value is returned.
Also see:
:meth:`~serialized`
"""
def __init__(self, valueType: cern.japc.value.ValueType): ...
@typing.overload
def getArray2D(self, string: str) -> cern.japc.value.Array2D: ...
@typing.overload
def getArray2D(self) -> cern.japc.value.Array2D:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getArray2D`
Returns a wrapper around the value being interpreted as a 2d array. If the value is a 1d array it is encapsulated in an
array of size 1xn. If the value is not an array it is encapsulated in an array of size 1x1. IMPORTANT: if the value is
mutable and is changed after the wrapper is got the wrapper becomes invalide and can return wrong values or even throw
OutOfBoundException.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getArray2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean 2d array.
"""
...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getBoolean(self, string: str) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBooleans(self, string: str) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBooleans`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a boolean array.
"""
...
@typing.overload
def getBooleans(self, string: str, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBooleans`
Returns the value being interpreted as a boolean array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type boolean array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean array.
"""
...
@typing.overload
def getBooleans(self, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getByte(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getBytes(self, string: str) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getBytes(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns the value being interpreted as a byte array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type byte array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getBytes(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getColumnCount(self, string: str) -> int: ...
@typing.overload
def getColumnCount(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getColumnCount`
Returns the number of columns for the case when the value is represented as 2-dimensional array. For scalar which are
not bit-pattern will always return 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getColumnCount`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the number of columns for the case when the value is represented as 2-dimensional array
"""
...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getDouble(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDoubles(self, string: str) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDoubles`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a double array.
"""
...
@typing.overload
def getDoubles(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getDoubles(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDoubles`
Returns the value being interpreted as a double array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type double array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double array.
"""
...
@typing.overload
def getDoubles(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloats(self, string: str) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloats`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a float array.
"""
...
@typing.overload
def getFloats(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloats(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloats`
Returns the value being interpreted as a float array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type float array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float array.
"""
...
@typing.overload
def getFloats(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInts(self, string: str) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInts`
Returns the value being interpreted as a int array. If the value is not an array it is encapsulated in an array of size
1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a int array.
"""
...
@typing.overload
def getInts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInts`
Returns the value being interpreted as a int array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type int array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int array.
"""
...
@typing.overload
def getInts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLength(self, string: str) -> int: ...
@typing.overload
def getLength(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLength`
Returns the length of the array if the value is an array. In case the value is not an array the value returned is 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLength` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLongs(self, string: str) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLongs`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a long array.
"""
...
@typing.overload
def getLongs(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLongs`
Returns the value being interpreted as a long array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type long array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long array.
"""
...
@typing.overload
def getLongs(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getObject(self) -> typing.Any: ...
@typing.overload
def getObject(self, string: str) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getRowCount(self, string: str) -> int: ...
@typing.overload
def getRowCount(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getRowCount`
Returns the number of rows for the case when the value is represented as 2-dimensional array. For scalar and
1-dimensional arrays will always return 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getRowCount` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the number of rows for the case when the value is represented as 2-dimensional array
"""
...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShorts(self, string: str) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShorts`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a short array.
"""
...
@typing.overload
def getShorts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getShorts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShorts`
Returns the value being interpreted as a short array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type short array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short array.
"""
...
@typing.overload
def getShorts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getString(self) -> str: ...
@typing.overload
def getString(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getStrings(self, string: str) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getStrings`
Returns a sub array of the value being interpreted as a string array. The subarray starts at startIndex and contains the
number of element given by length. If startIndex+length is greater than the number of values in the underlying array an
exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a String array.
"""
...
@typing.overload
def getStrings(self, string: str, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getStrings(self) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getStrings`
Returns the value being interpreted as a String array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type String array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a String array.
"""
...
@typing.overload
def getStrings(self, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBooleans(self, string: str, booleanArray: typing.List[bool]) -> None: ...
@typing.overload
def setBooleans(self, booleanArray: typing.List[bool]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBooleans`
Sets the value being a boolean array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean[]): the boolean array value.
"""
...
@typing.overload
def setBooleans2D(self, string: str, booleanArray: typing.List[bool], intArray: typing.List[int]) -> None: ...
@typing.overload
def setBooleans2D(self, booleanArray: typing.List[bool], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBooleans2D`
Sets the value being a 2-dimensional boolean array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBooleans2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean[]): the boolean array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setBytes(self, string: str, byteArray: typing.List[int]) -> None: ...
@typing.overload
def setBytes(self, byteArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBytes`
Sets the value being a byte array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte[]): the byte array value.
"""
...
@typing.overload
def setBytes2D(self, string: str, byteArray: typing.List[int], intArray: typing.List[int]) -> None: ...
@typing.overload
def setBytes2D(self, byteArray: typing.List[int], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBytes2D`
Sets the value being a 2-dimensional byte array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBytes2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte[]): the byte array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDoubles(self, string: str, doubleArray: typing.List[float]) -> None: ...
@typing.overload
def setDoubles(self, doubleArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDoubles`
Sets the value being a double array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double[]): the double array value.
"""
...
@typing.overload
def setDoubles2D(self, string: str, doubleArray: typing.List[float], intArray: typing.List[int]) -> None: ...
@typing.overload
def setDoubles2D(self, doubleArray: typing.List[float], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDoubles2D`
Sets the value being a 2-dimensional double array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDoubles2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double[]): the double array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloats(self, string: str, floatArray: typing.List[float]) -> None: ...
@typing.overload
def setFloats(self, floatArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloats`
Sets the value being a float array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float[]): the float array value.
"""
...
@typing.overload
def setFloats2D(self, string: str, floatArray: typing.List[float], intArray: typing.List[int]) -> None: ...
@typing.overload
def setFloats2D(self, floatArray: typing.List[float], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloats2D`
Sets the value being a 2-dimensional float array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloats2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float[]): the float array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInts(self, string: str, intArray: typing.List[int]) -> None: ...
@typing.overload
def setInts(self, intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInts`
Sets the value being a int array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int[]): the int array value.
"""
...
@typing.overload
def setInts2D(self, string: str, intArray: typing.List[int], intArray2: typing.List[int]) -> None: ...
@typing.overload
def setInts2D(self, intArray: typing.List[int], intArray2: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInts2D`
Sets the value being a 2-dimensional int array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInts2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int[]): the int array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLongs(self, string: str, longArray: typing.List[int]) -> None: ...
@typing.overload
def setLongs(self, longArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLongs`
Sets the value being a long array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long[]): the long array value.
"""
...
@typing.overload
def setLongs2D(self, string: str, longArray: typing.List[int], intArray: typing.List[int]) -> None: ...
@typing.overload
def setLongs2D(self, longArray: typing.List[int], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLongs2D`
Sets the value being a 2-dimensional long array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLongs2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long[]): the long array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShorts(self, string: str, shortArray: typing.List[int]) -> None: ...
@typing.overload
def setShorts(self, shortArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShorts`
Sets the value being a short array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short[]): the short array value.
"""
...
@typing.overload
def setShorts2D(self, string: str, shortArray: typing.List[int], intArray: typing.List[int]) -> None: ...
@typing.overload
def setShorts2D(self, shortArray: typing.List[int], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShorts2D`
Sets the value being a 2-dimensional short array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShorts2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short[]): the short array value.
dimensions (int[]): the dimensions of the array
"""
...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
"""
...
@typing.overload
def setString(self, string: str) -> None: ...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setStrings(self, string: str, stringArray: typing.List[str]) -> None: ...
@typing.overload
def setStrings(self, stringArray: typing.List[str]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setStrings`
Sets the value being a String array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): the String array value.
"""
...
@typing.overload
def setStrings2D(self, string: str, stringArray: typing.List[str], intArray: typing.List[int]) -> None: ...
@typing.overload
def setStrings2D(self, stringArray: typing.List[str], intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setStrings2D`
Sets the value being a 2-dimensional String array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setStrings2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): the String array value.
dimensions (int[]): the dimensions of the array
"""
...
class BooleanArrayValue(AbstractArrayValue, java.io.Serializable, java.lang.Cloneable):
"""
public class BooleanArrayValue extends :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a boolean array.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, booleanArray: typing.List[bool]): ...
@typing.overload
def __init__(self, booleanArray: typing.List[bool], intArray: typing.List[int]): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getBooleans(self, string: str) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self, string: str, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBooleans`
Returns the value being interpreted as a boolean array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type boolean array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getBooleans`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
the value being interpreted as a boolean array.
"""
...
@typing.overload
def getBooleans(self, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getByte(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getDouble(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getLength(self, string: str) -> int: ...
@typing.overload
def getLength(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLength`
Returns the length of the array if the value is an array. In case the value is not an array the value returned is 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLength` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getObject(self, string: str) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getString(self) -> str: ...
@typing.overload
def getString(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
def setEnumItemsImpl(self, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setEnumItemsImpl`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
class BooleanValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class BooleanValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a boolean.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, boolean: bool): ...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
class ByteArrayValue(AbstractArrayValue, java.io.Serializable, java.lang.Cloneable):
"""
public class ByteArrayValue extends :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a byte array.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, byteArray: typing.List[int]): ...
@typing.overload
def __init__(self, byteArray: typing.List[int], intArray: typing.List[int]): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getByte(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getBytes(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self, string: str) -> typing.List[int]: ...
@typing.overload
def getBytes(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns the value being interpreted as a byte array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type byte array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getDouble(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getLength(self, string: str) -> int: ...
@typing.overload
def getLength(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLength`
Returns the length of the array if the value is an array. In case the value is not an array the value returned is 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLength` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getObject(self, string: str) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getString(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getString`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
a string representing the value as a string.
"""
...
@typing.overload
def getString(self, int: int) -> str: ...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
def setEnumItemsImpl(self, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setEnumItemsImpl`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
"""
...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setString`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
class ByteValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class ByteValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a byte.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, byte: int): ...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
class DiscreteFunctionListValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class DiscreteFunctionListValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a discrete function list.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getArray2D(self, string: str) -> cern.japc.value.Array2D: ...
@typing.overload
def getArray2D(self) -> cern.japc.value.Array2D:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getArray2D`
Returns a wrapper around the value being interpreted as a 2d array. If the value is a 1d array it is encapsulated in an
array of size 1xn. If the value is not an array it is encapsulated in an array of size 1x1. IMPORTANT: if the value is
mutable and is changed after the wrapper is got the wrapper becomes invalide and can return wrong values or even throw
OutOfBoundException.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getArray2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getArray2D`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a boolean 2d array.
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getBooleans(self, string: str) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self, string: str, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBooleans`
Returns the value being interpreted as a boolean array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type boolean array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getBooleans`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a boolean array.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getBytes(self, string: str) -> typing.List[int]: ...
@typing.overload
def getBytes(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns the value being interpreted as a byte array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type byte array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getDoubles(self, string: str) -> typing.List[float]: ...
@typing.overload
def getDoubles(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getDoubles(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getDoubles(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDoubles`
Returns the value being interpreted as a double array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type double array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getDoubles`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a double array.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getFloats(self, string: str) -> typing.List[float]: ...
@typing.overload
def getFloats(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloats(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloats(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloats`
Returns the value being interpreted as a float array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type float array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getFloats`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a float array.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getInts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getInts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInts`
Returns the value being interpreted as a int array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type int array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getInts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a int array.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getLongs(self, string: str) -> typing.List[int]: ...
@typing.overload
def getLongs(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLongs`
Returns the value being interpreted as a long array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type long array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getLongs`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a long array.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getShorts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getShorts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getShorts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getShorts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShorts`
Returns the value being interpreted as a short array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type short array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getShorts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a short array.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
@typing.overload
def getStrings(self, string: str) -> typing.List[str]: ...
@typing.overload
def getStrings(self, string: str, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getStrings(self, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getStrings(self) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getStrings`
Returns the value being interpreted as a String array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type String array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getStrings`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a String array.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setBooleans(self, string: str, booleanArray: typing.List[bool]) -> None: ...
@typing.overload
def setBooleans(self, booleanArray: typing.List[bool]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBooleans`
Sets the value being a boolean array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setBooleans`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (boolean[]): the boolean array value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setBytes(self, string: str, byteArray: typing.List[int]) -> None: ...
@typing.overload
def setBytes(self, byteArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBytes`
Sets the value being a byte array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (byte[]): the byte array value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setDoubles(self, string: str, doubleArray: typing.List[float]) -> None: ...
@typing.overload
def setDoubles(self, doubleArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDoubles`
Sets the value being a double array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setDoubles`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (double[]): the double array value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setFloats(self, string: str, floatArray: typing.List[float]) -> None: ...
@typing.overload
def setFloats(self, floatArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloats`
Sets the value being a float array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setFloats`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (float[]): the float array value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setInts(self, string: str, intArray: typing.List[int]) -> None: ...
@typing.overload
def setInts(self, intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInts`
Sets the value being a int array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setInts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (int[]): the int array value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setLongs(self, string: str, longArray: typing.List[int]) -> None: ...
@typing.overload
def setLongs(self, longArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLongs`
Sets the value being a long array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setLongs`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (long[]): the long array value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setShorts(self, string: str, shortArray: typing.List[int]) -> None: ...
@typing.overload
def setShorts(self, shortArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShorts`
Sets the value being a short array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setShorts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (short[]): the short array value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
@typing.overload
def setStrings(self, string: str, stringArray: typing.List[str]) -> None: ...
@typing.overload
def setStrings(self, stringArray: typing.List[str]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setStrings`
Sets the value being a String array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setStrings`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): the String array value.
"""
...
class DiscreteFunctionValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class DiscreteFunctionValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a discrete function.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, discreteFunction: cern.japc.value.DiscreteFunction): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getArray2D(self, string: str) -> cern.japc.value.Array2D: ...
@typing.overload
def getArray2D(self) -> cern.japc.value.Array2D:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getArray2D`
Returns a wrapper around the value being interpreted as a 2d array. If the value is a 1d array it is encapsulated in an
array of size 1xn. If the value is not an array it is encapsulated in an array of size 1x1. IMPORTANT: if the value is
mutable and is changed after the wrapper is got the wrapper becomes invalide and can return wrong values or even throw
OutOfBoundException.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getArray2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getArray2D`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a boolean 2d array.
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getBooleans(self, string: str) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self, string: str, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBooleans`
Returns the value being interpreted as a boolean array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type boolean array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getBooleans`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a boolean array.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getBytes(self, string: str) -> typing.List[int]: ...
@typing.overload
def getBytes(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns the value being interpreted as a byte array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type byte array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getDoubles(self, string: str) -> typing.List[float]: ...
@typing.overload
def getDoubles(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getDoubles(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getDoubles(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDoubles`
Returns the value being interpreted as a double array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type double array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getDoubles`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a double array.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getFloats(self, string: str) -> typing.List[float]: ...
@typing.overload
def getFloats(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloats(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloats(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloats`
Returns the value being interpreted as a float array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type float array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getFloats`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a float array.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getInts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getInts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInts`
Returns the value being interpreted as a int array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type int array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getInts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a int array.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getLongs(self, string: str) -> typing.List[int]: ...
@typing.overload
def getLongs(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLongs`
Returns the value being interpreted as a long array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type long array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getLongs`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a long array.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getShorts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getShorts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getShorts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getShorts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShorts`
Returns the value being interpreted as a short array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type short array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getShorts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a short array.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
@typing.overload
def getStrings(self, string: str) -> typing.List[str]: ...
@typing.overload
def getStrings(self, string: str, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getStrings(self, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getStrings(self) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getStrings`
Returns the value being interpreted as a String array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type String array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getStrings`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a String array.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setBooleans(self, string: str, booleanArray: typing.List[bool]) -> None: ...
@typing.overload
def setBooleans(self, booleanArray: typing.List[bool]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBooleans`
Sets the value being a boolean array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setBooleans`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (boolean[]): the boolean array value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setBytes(self, string: str, byteArray: typing.List[int]) -> None: ...
@typing.overload
def setBytes(self, byteArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBytes`
Sets the value being a byte array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (byte[]): the byte array value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setDoubles(self, string: str, doubleArray: typing.List[float]) -> None: ...
@typing.overload
def setDoubles(self, doubleArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDoubles`
Sets the value being a double array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setDoubles`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (double[]): the double array value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setFloats(self, string: str, floatArray: typing.List[float]) -> None: ...
@typing.overload
def setFloats(self, floatArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloats`
Sets the value being a float array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setFloats`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (float[]): the float array value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setInts(self, string: str, intArray: typing.List[int]) -> None: ...
@typing.overload
def setInts(self, intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInts`
Sets the value being a int array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setInts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (int[]): the int array value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setLongs(self, string: str, longArray: typing.List[int]) -> None: ...
@typing.overload
def setLongs(self, longArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLongs`
Sets the value being a long array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setLongs`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (long[]): the long array value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setShorts(self, string: str, shortArray: typing.List[int]) -> None: ...
@typing.overload
def setShorts(self, shortArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShorts`
Sets the value being a short array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setShorts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (short[]): the short array value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
@typing.overload
def setStrings(self, string: str, stringArray: typing.List[str]) -> None: ...
@typing.overload
def setStrings(self, stringArray: typing.List[str]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setStrings`
Sets the value being a String array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setStrings`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): the String array value.
"""
...
class DoubleArrayValue(AbstractArrayValue, java.io.Serializable, java.lang.Cloneable):
"""
public class DoubleArrayValue extends :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a double array.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, doubleArray: typing.List[float]): ...
@typing.overload
def __init__(self, doubleArray: typing.List[float], intArray: typing.List[int]): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getByte(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getDiscreteFunction`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getDiscreteFunctionList`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getDoubles(self, string: str) -> typing.List[float]: ...
@typing.overload
def getDoubles(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getDoubles(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDoubles`
Returns the value being interpreted as a double array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type double array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getDoubles`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
the value being interpreted as a double array.
"""
...
@typing.overload
def getDoubles(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getLength(self, string: str) -> int: ...
@typing.overload
def getLength(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLength`
Returns the length of the array if the value is an array. In case the value is not an array the value returned is 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLength` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getObject(self, string: str) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getString(self) -> str: ...
@typing.overload
def getString(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setDiscreteFunction`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setDiscreteFunctionList`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
def setEnumItemsImpl(self, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setEnumItemsImpl`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
class DoubleValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class DoubleValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a double.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, double: float): ...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
class EnumArrayValue(AbstractArrayValue, java.io.Serializable, java.lang.Cloneable):
"""
public class EnumArrayValue extends :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing an array of enumerations.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, enumItemArray: typing.List[cern.japc.value.EnumItem]): ...
@typing.overload
def __init__(self, enumItemArray: typing.List[cern.japc.value.EnumItem], intArray: typing.List[int]): ...
@typing.overload
def __init__(self, enumType: cern.japc.value.EnumType): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getByte(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getDouble(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration. The value returned is the nth one from the array where n is given
by the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.getEnumItem`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItems(self, int: int, int2: int) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
def getEnumItems(self, string: str) -> typing.List[cern.japc.value.EnumItem]: ...
@typing.overload
def getEnumItems(self) -> typing.List[cern.japc.value.EnumItem]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItems`
Returns the value being interpreted as an array of enumeration items. If the value can't be represented as an array of
enumeration items, ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItems` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.getEnumItems`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Returns:
the value being interpreted as an array of enumeration items.
"""
...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getLength(self, string: str) -> int: ...
@typing.overload
def getLength(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLength`
Returns the length of the array if the value is an array. In case the value is not an array the value returned is 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLength` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getObject(self, string: str) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getString(self) -> str: ...
@typing.overload
def getString(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setBoolean`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setByte(self, string: str, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setByte`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setDouble(self, string: str, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setDouble`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value at the given index to the given enumeration item. The value set is the nth one from the array where n is
given by the index. If the underlying value is not an array the index is ignored and the value is set. If this value is
not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.setEnumItem`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
index (int): the index where to set the value in the array
value (:class:`~cern.japc.value.EnumItem`): the enumeration item to set at the given index.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setFloat(self, string: str, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setFloat`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setInt(self, string: str, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
"""
...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setInt`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
"""
...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setLong`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
"""
...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setShort`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
"""
...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setString`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
class EnumSetArrayValue(AbstractArrayValue, java.io.Serializable, java.lang.Cloneable):
"""
public class EnumSetArrayValue extends :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing an array of enumeration sets.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet]): ...
@typing.overload
def __init__(self, enumItemSetArray: typing.List[cern.japc.value.EnumItemSet], intArray: typing.List[int]): ...
@typing.overload
def __init__(self, enumType: cern.japc.value.EnumType): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getByte(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getDouble(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration set. The value returned is the nth one from the array where n is
given by the index. If the underlying value is not an array the index is ignored the the value is returned. If the value
is an array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.getEnumItemSet`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSets(self, int: int, int2: int) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
def getEnumItemSets(self, string: str) -> typing.List[cern.japc.value.EnumItemSet]: ...
@typing.overload
def getEnumItemSets(self) -> typing.List[cern.japc.value.EnumItemSet]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSets`
Returns the value being interpreted as an array of enumeration item sets. If the value can't be represented as an array
of enumeration item sets, ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSets`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.getEnumItemSets`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Returns:
the value being interpreted as an array of enumeration item sets.
"""
...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getLength(self, string: str) -> int: ...
@typing.overload
def getLength(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLength`
Returns the length of the array if the value is an array. In case the value is not an array the value returned is 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLength` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getObject(self, string: str) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getString(self) -> str: ...
@typing.overload
def getString(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setBoolean`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setByte(self, string: str, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setByte`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setDouble(self, string: str, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setDouble`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value at the given index to the given enumeration items set. The value set is the nth one from the array where
n is given by the index. If the underlying value is not an array the index is ignored and the value is set. If this
value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.setEnumItemSet`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
index (int): the index where to set the value in the array
value (:class:`~cern.japc.value.EnumItemSet`): the enumeration items set to set at the given index.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setFloat(self, string: str, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setFloat`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setInt(self, string: str, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
"""
...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setInt`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
"""
...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setLong`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
"""
...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setShort`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
"""
...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setString`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
class EnumSetValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class EnumSetValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing an enumeration set.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, enumItemSet: cern.japc.value.EnumItemSet): ...
@typing.overload
def __init__(self, enumType: cern.japc.value.EnumType): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getArray2D(self, string: str) -> cern.japc.value.Array2D: ...
@typing.overload
def getArray2D(self) -> cern.japc.value.Array2D:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getArray2D`
Returns a wrapper around the value being interpreted as a 2d array. If the value is a 1d array it is encapsulated in an
array of size 1xn. If the value is not an array it is encapsulated in an array of size 1x1. IMPORTANT: if the value is
mutable and is changed after the wrapper is got the wrapper becomes invalide and can return wrong values or even throw
OutOfBoundException.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getArray2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getArray2D`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a boolean 2d array.
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getBooleans(self, string: str) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self, string: str, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBooleans`
Returns the value being interpreted as a boolean array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type boolean array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getBooleans`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a boolean array.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getBytes(self, string: str) -> typing.List[int]: ...
@typing.overload
def getBytes(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns the value being interpreted as a byte array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type byte array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getDoubles(self, string: str) -> typing.List[float]: ...
@typing.overload
def getDoubles(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getDoubles(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getDoubles(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDoubles`
Returns the value being interpreted as a double array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type double array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getDoubles`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a double array.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration set. The value returned is the nth one from the array where n is
given by the index. If the underlying value is not an array the index is ignored the the value is returned. If the value
is an array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.getEnumItemSet`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getFloats(self, string: str) -> typing.List[float]: ...
@typing.overload
def getFloats(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloats(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloats(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloats`
Returns the value being interpreted as a float array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type float array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getFloats`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a float array.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getInts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getInts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInts`
Returns the value being interpreted as a int array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type int array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getInts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a int array.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getLongs(self, string: str) -> typing.List[int]: ...
@typing.overload
def getLongs(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLongs`
Returns the value being interpreted as a long array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type long array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getLongs`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a long array.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getShorts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getShorts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getShorts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getShorts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShorts`
Returns the value being interpreted as a short array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type short array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getShorts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a short array.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
@typing.overload
def getStrings(self, string: str) -> typing.List[str]: ...
@typing.overload
def getStrings(self, string: str, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getStrings(self, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getStrings(self) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getStrings`
Returns the value being interpreted as a String array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type String array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getStrings`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a String array.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setBooleans(self, string: str, booleanArray: typing.List[bool]) -> None: ...
@typing.overload
def setBooleans(self, booleanArray: typing.List[bool]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBooleans`
Sets the value being a boolean array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setBooleans`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (boolean[]): the boolean array value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setBytes(self, string: str, byteArray: typing.List[int]) -> None: ...
@typing.overload
def setBytes(self, byteArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBytes`
Sets the value being a byte array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (byte[]): the byte array value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setDoubles(self, string: str, doubleArray: typing.List[float]) -> None: ...
@typing.overload
def setDoubles(self, doubleArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDoubles`
Sets the value being a double array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setDoubles`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (double[]): the double array value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setFloats(self, string: str, floatArray: typing.List[float]) -> None: ...
@typing.overload
def setFloats(self, floatArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloats`
Sets the value being a float array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setFloats`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (float[]): the float array value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setInts(self, string: str, intArray: typing.List[int]) -> None: ...
@typing.overload
def setInts(self, intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInts`
Sets the value being a int array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setInts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (int[]): the int array value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setLongs(self, string: str, longArray: typing.List[int]) -> None: ...
@typing.overload
def setLongs(self, longArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLongs`
Sets the value being a long array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setLongs`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (long[]): the long array value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setShorts(self, string: str, shortArray: typing.List[int]) -> None: ...
@typing.overload
def setShorts(self, shortArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShorts`
Sets the value being a short array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setShorts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (short[]): the short array value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
@typing.overload
def setStrings(self, string: str, stringArray: typing.List[str]) -> None: ...
@typing.overload
def setStrings(self, stringArray: typing.List[str]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setStrings`
Sets the value being a String array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setStrings`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): the String array value.
"""
...
class EnumValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class EnumValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing an enumeration.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, enumItem: cern.japc.value.EnumItem): ...
@typing.overload
def __init__(self, enumType: cern.japc.value.EnumType): ...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getArray2D(self, string: str) -> cern.japc.value.Array2D: ...
@typing.overload
def getArray2D(self) -> cern.japc.value.Array2D:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getArray2D`
Returns a wrapper around the value being interpreted as a 2d array. If the value is a 1d array it is encapsulated in an
array of size 1xn. If the value is not an array it is encapsulated in an array of size 1x1. IMPORTANT: if the value is
mutable and is changed after the wrapper is got the wrapper becomes invalide and can return wrong values or even throw
OutOfBoundException.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getArray2D` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getArray2D`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a boolean 2d array.
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getBooleans(self, string: str) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self, string: str, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self, int: int, int2: int) -> typing.List[bool]: ...
@typing.overload
def getBooleans(self) -> typing.List[bool]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBooleans`
Returns the value being interpreted as a boolean array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type boolean array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getBooleans`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a boolean array.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getBytes(self, string: str) -> typing.List[int]: ...
@typing.overload
def getBytes(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns the value being interpreted as a byte array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type byte array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getDoubles(self, string: str) -> typing.List[float]: ...
@typing.overload
def getDoubles(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getDoubles(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getDoubles(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDoubles`
Returns the value being interpreted as a double array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type double array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getDoubles`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a double array.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration. The value returned is the nth one from the array where n is given
by the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.getEnumItem`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getFloats(self, string: str) -> typing.List[float]: ...
@typing.overload
def getFloats(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloats(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloats(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloats`
Returns the value being interpreted as a float array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type float array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getFloats`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a float array.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getInts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getInts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInts`
Returns the value being interpreted as a int array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type int array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getInts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a int array.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getLongs(self, string: str) -> typing.List[int]: ...
@typing.overload
def getLongs(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLongs`
Returns the value being interpreted as a long array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type long array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getLongs`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a long array.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getShorts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getShorts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getShorts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getShorts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShorts`
Returns the value being interpreted as a short array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type short array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getShorts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a short array.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
@typing.overload
def getStrings(self, string: str) -> typing.List[str]: ...
@typing.overload
def getStrings(self, string: str, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getStrings(self, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getStrings(self) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getStrings`
Returns the value being interpreted as a String array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type String array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getStrings`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a String array.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setBooleans(self, string: str, booleanArray: typing.List[bool]) -> None: ...
@typing.overload
def setBooleans(self, booleanArray: typing.List[bool]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBooleans`
Sets the value being a boolean array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBooleans` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setBooleans`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (boolean[]): the boolean array value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setBytes(self, string: str, byteArray: typing.List[int]) -> None: ...
@typing.overload
def setBytes(self, byteArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBytes`
Sets the value being a byte array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (byte[]): the byte array value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setDoubles(self, string: str, doubleArray: typing.List[float]) -> None: ...
@typing.overload
def setDoubles(self, doubleArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDoubles`
Sets the value being a double array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDoubles` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setDoubles`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (double[]): the double array value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setFloats(self, string: str, floatArray: typing.List[float]) -> None: ...
@typing.overload
def setFloats(self, floatArray: typing.List[float]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloats`
Sets the value being a float array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setFloats`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (float[]): the float array value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setInts(self, string: str, intArray: typing.List[int]) -> None: ...
@typing.overload
def setInts(self, intArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInts`
Sets the value being a int array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setInts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (int[]): the int array value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setLongs(self, string: str, longArray: typing.List[int]) -> None: ...
@typing.overload
def setLongs(self, longArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLongs`
Sets the value being a long array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setLongs`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (long[]): the long array value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setShorts(self, string: str, shortArray: typing.List[int]) -> None: ...
@typing.overload
def setShorts(self, shortArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShorts`
Sets the value being a short array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setShorts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (short[]): the short array value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
@typing.overload
def setStrings(self, string: str, stringArray: typing.List[str]) -> None: ...
@typing.overload
def setStrings(self, stringArray: typing.List[str]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setStrings`
Sets the value being a String array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setStrings`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`[]): the String array value.
"""
...
class FloatArrayValue(AbstractArrayValue, java.io.Serializable, java.lang.Cloneable):
"""
public class FloatArrayValue extends :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a float array.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, floatArray: typing.List[float]): ...
@typing.overload
def __init__(self, floatArray: typing.List[float], intArray: typing.List[int]): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getByte(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getDouble(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloats(self, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloats(self, string: str) -> typing.List[float]: ...
@typing.overload
def getFloats(self, string: str, int: int, int2: int) -> typing.List[float]: ...
@typing.overload
def getFloats(self) -> typing.List[float]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloats`
Returns the value being interpreted as a float array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type float array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloats` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getFloats`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
the value being interpreted as a float array.
"""
...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getLength(self, string: str) -> int: ...
@typing.overload
def getLength(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLength`
Returns the length of the array if the value is an array. In case the value is not an array the value returned is 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLength` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getObject(self, string: str) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getString(self) -> str: ...
@typing.overload
def getString(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
def setEnumItemsImpl(self, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setEnumItemsImpl`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
class FloatValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class FloatValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a float.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, float: float): ...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
class IntArrayValue(AbstractArrayValue, java.io.Serializable, java.lang.Cloneable):
"""
public class IntArrayValue extends :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a int array.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, intArray: typing.List[int]): ...
@typing.overload
def __init__(self, intArray: typing.List[int], intArray2: typing.List[int]): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getByte(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getDouble(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getInts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInts`
Returns the value being interpreted as a int array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type int array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getInts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
the value being interpreted as a int array.
"""
...
@typing.overload
def getLength(self, string: str) -> int: ...
@typing.overload
def getLength(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLength`
Returns the length of the array if the value is an array. In case the value is not an array the value returned is 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLength` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getObject(self, string: str) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getString(self) -> str: ...
@typing.overload
def getString(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
def setEnumItemsImpl(self, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setEnumItemsImpl`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
class IntValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class IntValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a int.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, int: int): ...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
class LongArrayValue(AbstractArrayValue, java.io.Serializable, java.lang.Cloneable):
"""
public class LongArrayValue extends :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a long array.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, longArray: typing.List[int]): ...
@typing.overload
def __init__(self, longArray: typing.List[int], intArray: typing.List[int]): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getByte(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getDouble(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getLength(self, string: str) -> int: ...
@typing.overload
def getLength(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLength`
Returns the length of the array if the value is an array. In case the value is not an array the value returned is 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLength` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLongs(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self, string: str) -> typing.List[int]: ...
@typing.overload
def getLongs(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLongs`
Returns the value being interpreted as a long array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type long array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getLongs`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
the value being interpreted as a long array.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getString(self) -> str: ...
@typing.overload
def getString(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
def setEnumItemsImpl(self, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setEnumItemsImpl`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
class LongValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class LongValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a LONG.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, long: int): ...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
class ShortArrayValue(AbstractArrayValue, java.io.Serializable, java.lang.Cloneable):
"""
public class ShortArrayValue extends :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a short array.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, shortArray: typing.List[int]): ...
@typing.overload
def __init__(self, shortArray: typing.List[int], intArray: typing.List[int]): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getByte(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getDouble(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getLength(self, string: str) -> int: ...
@typing.overload
def getLength(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLength`
Returns the length of the array if the value is an array. In case the value is not an array the value returned is 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLength` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getObject(self, string: str) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShorts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getShorts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getShorts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getShorts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShorts`
Returns the value being interpreted as a short array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type short array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShorts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getShorts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
the value being interpreted as a short array.
"""
...
@typing.overload
def getString(self) -> str: ...
@typing.overload
def getString(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
def setEnumItemsImpl(self, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setEnumItemsImpl`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
class ShortValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class ShortValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a short.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, short: int): ...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
class StringArrayValue(AbstractArrayValue, java.io.Serializable, java.lang.Cloneable):
"""
public class StringArrayValue extends :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a string array.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, stringArray: typing.List[str]): ...
@typing.overload
def __init__(self, stringArray: typing.List[str], intArray: typing.List[int]): ...
def clone(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.clone`
Returns a deep copy of this ParameterValue. The copy is guarantee to be deep.
Specified by:
:meth:`~cern.japc.value.ParameterValue.clone` in interface :class:`~cern.japc.value.ParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.core.ParameterValueImpl.clone`Â in
class :class:`~cern.japc.value.spi.value.core.ParameterValueImpl`
Returns:
a deep copy of this ParameterValue.
Also see:
`null <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Object.html?is-external=true#clone()>`
"""
...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool: ...
@typing.overload
def getByte(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int: ...
@typing.overload
def getBytes(self, string: str) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns a sub array of the value being interpreted as a boolean array. The subarray starts at startIndex and contains
the number of element given by length. If startIndex+length is greater than the number of values in the underlying array
an exception is thrown. If the value is not an array, the value is returned encapsulated in an array of size 1, ignoring
the arguments.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Parameters:
startIndex (int): the index of the first element of the array to return
length (int): the number of elements in the array to return (starting from startIndex)
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getBytes(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns the value being interpreted as a byte array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type byte array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getBytes(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getDouble(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float: ...
@typing.overload
def getFloat(self) -> float: ...
@typing.overload
def getFloat(self, string: str) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getInt(self) -> int: ...
@typing.overload
def getInt(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getLength(self, string: str) -> int: ...
@typing.overload
def getLength(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLength`
Returns the length of the array if the value is an array. In case the value is not an array the value returned is 1.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLength` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the length of the array or 1 in case of a scalar.
"""
...
@typing.overload
def getLong(self) -> int: ...
@typing.overload
def getLong(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getObject(self, string: str) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an Object. The value returned is the nth one from the array where n is given by the index. If the
underlying value is not an array the index is ignored the the value is returned. If the value is an array the nth value
will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getShort(self) -> int: ...
@typing.overload
def getShort(self, string: str) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. The value returned is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an array
the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getString(self) -> str: ...
@typing.overload
def getString(self, string: str) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getString`
Returns the value being interpreted as a String. The value returned is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored the the value is returned. If the value is an
array the nth value will be returned where n is given by index.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index in the array at which to get the value
Returns:
the nth value of the array
"""
...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getStrings(self, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getStrings(self, string: str) -> typing.List[str]: ...
@typing.overload
def getStrings(self, string: str, int: int, int2: int) -> typing.List[str]: ...
@typing.overload
def getStrings(self) -> typing.List[str]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getStrings`
Returns the value being interpreted as a String array. The array returned is not linked to the underlying array stored
in this value. Only in the case this value is of type String array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getStrings` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.getStrings`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
Returns:
the value being interpreted as a String array.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value at the given index to the given boolean. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (boolean): the boolean value to set at the given index.
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value at the given index to the given byte. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (byte): the byte value to set at the given index.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value at the given index to the given double. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (double): the double value to set at the given index.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
def setEnumItemsImpl(self, enumItemArray: typing.List[cern.japc.value.EnumItem]) -> None:
"""
Specified by:
:meth:`~cern.japc.value.spi.value.simple.AbstractArrayValue.setEnumItemsImpl`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractArrayValue`
"""
...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value at the given index to the given float. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (float): the float value to set at the given index.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value at the given index to the given int. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (int): the int value to set at the given index.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value at the given index to the given long. The value set is the nth one from the array where n is given by the
index. If the underlying value is not an array the index is ignored and the value is set. If this value is not mutable
an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (long): the long value to set at the given index.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value at the given index to the given short. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (short): the short value to set at the given index.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value at the given index to the given String. The value set is the nth one from the array where n is given by
the index. If the underlying value is not an array the index is ignored and the value is set. If this value is not
mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
index (int): the index where to set the value in the array
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value to set at the given index.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
class StringValue(AbstractScalarValue, java.io.Serializable, java.lang.Cloneable):
"""
public class StringValue extends :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue` implements `Serializable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/io/Serializable.html?is-external=true>`, `Cloneable <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/Cloneable.html?is-external=true>`
Parameter value representing a string.
Also see:
:meth:`~serialized`
"""
@typing.overload
def __init__(self): ...
@typing.overload
def __init__(self, string: str): ...
def equals(self, object: typing.Any) -> bool:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.equals`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def getBoolean(self, string: str) -> bool: ...
@typing.overload
def getBoolean(self, string: str, int: int) -> bool: ...
@typing.overload
def getBoolean(self, int: int) -> bool: ...
@typing.overload
def getBoolean(self) -> bool:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBoolean`
Returns the value being interpreted as a boolean. If the value is an array only the first value of the array is
returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a boolean.
"""
...
@typing.overload
def getByte(self, string: str) -> int: ...
@typing.overload
def getByte(self, string: str, int: int) -> int: ...
@typing.overload
def getByte(self, int: int) -> int: ...
@typing.overload
def getByte(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getByte`
Returns the value being interpreted as a byte. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a byte.
"""
...
@typing.overload
def getBytes(self, string: str) -> typing.List[int]: ...
@typing.overload
def getBytes(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getBytes(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getBytes`
Returns the value being interpreted as a byte array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type byte array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a byte array.
"""
...
@typing.overload
def getDiscreteFunction(self, string: str) -> cern.japc.value.DiscreteFunction: ...
@typing.overload
def getDiscreteFunction(self) -> cern.japc.value.DiscreteFunction:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`
Returns the value being interpreted as a discrete function. If the value can't be represented as a discrete function a
ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function.
"""
...
@typing.overload
def getDiscreteFunctionList(self, string: str) -> cern.japc.value.DiscreteFunctionList: ...
@typing.overload
def getDiscreteFunctionList(self) -> cern.japc.value.DiscreteFunctionList:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`
Returns the value being interpreted as a discrete function list. If the value can't be represented as a discrete
function list a ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a discrete function list.
"""
...
@typing.overload
def getDouble(self, string: str) -> float: ...
@typing.overload
def getDouble(self, string: str, int: int) -> float: ...
@typing.overload
def getDouble(self, int: int) -> float: ...
@typing.overload
def getDouble(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getDouble`
Returns the value being interpreted as a double. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a double.
"""
...
@typing.overload
def getEnumItem(self, string: str) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self, int: int) -> cern.japc.value.EnumItem: ...
@typing.overload
def getEnumItem(self) -> cern.japc.value.EnumItem:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItem`
Returns the value being interpreted as an enumeration item. If the value can't be represented as an enumeration item
(value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item.
"""
...
@typing.overload
def getEnumItemSet(self, string: str) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self, int: int) -> cern.japc.value.EnumItemSet: ...
@typing.overload
def getEnumItemSet(self) -> cern.japc.value.EnumItemSet:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`
Returns the value being interpreted as an enumeration item set. If the value can't be represented as an enumeration item
set (value is boolean, array or there is no information about enumeration type, etc) an ValueConversionException is
thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as an enumeration item set.
"""
...
@typing.overload
def getFloat(self, string: str) -> float: ...
@typing.overload
def getFloat(self, string: str, int: int) -> float: ...
@typing.overload
def getFloat(self, int: int) -> float: ...
@typing.overload
def getFloat(self) -> float:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getFloat`
Returns the value being interpreted as a float. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a float.
"""
...
@typing.overload
def getInt(self, string: str) -> int: ...
@typing.overload
def getInt(self, string: str, int: int) -> int: ...
@typing.overload
def getInt(self, int: int) -> int: ...
@typing.overload
def getInt(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInt`
Returns the value being interpreted as a int. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a int.
"""
...
@typing.overload
def getInts(self, string: str) -> typing.List[int]: ...
@typing.overload
def getInts(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getInts(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getInts`
Returns the value being interpreted as a int array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type int array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getInts` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getInts`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a int array.
"""
...
@typing.overload
def getLong(self, string: str) -> int: ...
@typing.overload
def getLong(self, string: str, int: int) -> int: ...
@typing.overload
def getLong(self, int: int) -> int: ...
@typing.overload
def getLong(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLong`
Returns the value being interpreted as a long. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a long.
"""
...
@typing.overload
def getLongs(self, string: str) -> typing.List[int]: ...
@typing.overload
def getLongs(self, string: str, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self, int: int, int2: int) -> typing.List[int]: ...
@typing.overload
def getLongs(self) -> typing.List[int]:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getLongs`
Returns the value being interpreted as a long array. The array returned is not linked to the underlying array stored in
this value. Only in the case this value is of type long array and is mutable, the array returned is actually the
underlying one. In that last case, changes in the returned array directly affect this value. If the value is not an
array it is encapsulated in an array of size 1
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getLongs` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.getLongs`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Returns:
the value being interpreted as a long array.
"""
...
@typing.overload
def getObject(self, string: str) -> typing.Any: ...
@typing.overload
def getObject(self, string: str, int: int) -> typing.Any: ...
@typing.overload
def getObject(self, int: int) -> typing.Any: ...
@typing.overload
def getObject(self) -> typing.Any:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getObject`
Returns the value as an object. This method returns the scalar type in their wrapping Object type, arrays and string
without change and 2D-arrays as :class:`~cern.japc.value.Array2D`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getObject` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value as an object.
"""
...
@typing.overload
def getShort(self, string: str) -> int: ...
@typing.overload
def getShort(self, string: str, int: int) -> int: ...
@typing.overload
def getShort(self, int: int) -> int: ...
@typing.overload
def getShort(self) -> int:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.getShort`
Returns the value being interpreted as a short. If the value is an array only the first value of the array is returned.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.getShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Returns:
the value being interpreted as a short.
"""
...
@typing.overload
def getString(self, string: str) -> str: ...
@typing.overload
def getString(self, string: str, int: int) -> str: ...
@typing.overload
def getString(self, int: int) -> str: ...
@typing.overload
def getString(self) -> str:
"""
Description copied from interface: :meth:`~cern.japc.value.ParameterValue.getString`
Returns the value as a string. This method should be specially useful for client that just want to display the value
without any interpretation. The string returned should be as useful as possible for the clients.
Specified by:
:meth:`~cern.japc.value.ParameterValue.getString` in interface :class:`~cern.japc.value.ParameterValue`
Returns:
a string representing the value as a string.
"""
...
def hashCode(self) -> int:
"""
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractSimpleValue.hashCode`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractSimpleValue`
"""
...
@typing.overload
def setBoolean(self, string: str, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, string: str, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, int: int, boolean: bool) -> None: ...
@typing.overload
def setBoolean(self, boolean: bool) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBoolean`
Sets the value being a boolean. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBoolean` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (boolean): the boolean value.
"""
...
@typing.overload
def setByte(self, string: str, byte: int) -> None: ...
@typing.overload
def setByte(self, string: str, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, int: int, byte: int) -> None: ...
@typing.overload
def setByte(self, byte: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setByte`
Sets the value being a byte. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setByte` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (byte): the byte value.
"""
...
@typing.overload
def setBytes(self, string: str, byteArray: typing.List[int]) -> None: ...
@typing.overload
def setBytes(self, byteArray: typing.List[int]) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setBytes`
Sets the value being a byte array. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setBytes` in interface :class:`~cern.japc.value.SimpleParameterValue`
Overrides:
:meth:`~cern.japc.value.spi.value.simple.AbstractScalarValue.setBytes`Â in
class :class:`~cern.japc.value.spi.value.simple.AbstractScalarValue`
Parameters:
value (byte[]): the byte array value.
"""
...
@typing.overload
def setDiscreteFunction(self, string: str, discreteFunction: cern.japc.value.DiscreteFunction) -> None: ...
@typing.overload
def setDiscreteFunction(self, discreteFunction: cern.japc.value.DiscreteFunction) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`
Sets the value being an :class:`~cern.japc.value.DiscreteFunction`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunction`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunction`): the DiscreteFunction value.
"""
...
@typing.overload
def setDiscreteFunctionList(self, string: str, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None: ...
@typing.overload
def setDiscreteFunctionList(self, discreteFunctionList: cern.japc.value.DiscreteFunctionList) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`
Sets the value being an :class:`~cern.japc.value.DiscreteFunctionList`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDiscreteFunctionList`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.DiscreteFunctionList`): the DiscreteFunctionList value.
"""
...
@typing.overload
def setDouble(self, string: str, double: float) -> None: ...
@typing.overload
def setDouble(self, string: str, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, int: int, double: float) -> None: ...
@typing.overload
def setDouble(self, double: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setDouble`
Sets the value being a double. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setDouble` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (double): the double value.
"""
...
@typing.overload
def setEnumItem(self, string: str, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, int: int, enumItem: cern.japc.value.EnumItem) -> None: ...
@typing.overload
def setEnumItem(self, enumItem: cern.japc.value.EnumItem) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItem`
Sets the value being an :class:`~cern.japc.value.EnumItem`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItem` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItem`): the EnumItem value.
"""
...
@typing.overload
def setEnumItemSet(self, string: str, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, int: int, enumItemSet: cern.japc.value.EnumItemSet) -> None: ...
@typing.overload
def setEnumItemSet(self, enumItemSet: cern.japc.value.EnumItemSet) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`
Sets the value being an :class:`~cern.japc.value.EnumItemSet`.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setEnumItemSet`Â in
interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (:class:`~cern.japc.value.EnumItemSet`): the EnumItemSet value.
"""
...
@typing.overload
def setFloat(self, string: str, float: float) -> None: ...
@typing.overload
def setFloat(self, string: str, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, int: int, float: float) -> None: ...
@typing.overload
def setFloat(self, float: float) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setFloat`
Sets the value being a float. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setFloat` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (float): the float value.
"""
...
@typing.overload
def setInt(self, string: str, int: int) -> None: ...
@typing.overload
def setInt(self, string: str, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int, int2: int) -> None: ...
@typing.overload
def setInt(self, int: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setInt`
Sets the value being a int. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setInt` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (int): the int value.
"""
...
@typing.overload
def setLong(self, string: str, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, string: str, long: int) -> None: ...
@typing.overload
def setLong(self, int: int, long: int) -> None: ...
@typing.overload
def setLong(self, long: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setLong`
Sets the value being a long. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setLong` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (long): the long value.
"""
...
@typing.overload
def setShort(self, string: str, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, string: str, short: int) -> None: ...
@typing.overload
def setShort(self, int: int, short: int) -> None: ...
@typing.overload
def setShort(self, short: int) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setShort`
Sets the value being a short. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setShort` in interface :class:`~cern.japc.value.SimpleParameterValue`
Parameters:
value (short): the short value.
"""
...
@typing.overload
def setString(self, string: str, int: int, string2: str) -> None: ...
@typing.overload
def setString(self, string: str, string2: str) -> None: ...
@typing.overload
def setString(self, int: int, string: str) -> None: ...
@typing.overload
def setString(self, string: str) -> None:
"""
Description copied from interface: :meth:`~cern.japc.value.SimpleParameterValue.setString`
Sets the value being a String. If this value is not mutable an exception is thrown.
Specified by:
:meth:`~cern.japc.value.SimpleParameterValue.setString` in interface :class:`~cern.japc.value.SimpleParameterValue`
Specified by:
:meth:`~cern.japc.value.spi.value.simple.UpdatableParameterValue.setString`Â in
interface :class:`~cern.japc.value.spi.value.simple.UpdatableParameterValue`
Parameters:
value (`String <http://bewww.cern.ch/ap/dist/java/jdk/1.8/docs/api/java/lang/String.html?is-external=true>`): the String value.
"""
...
class __module_protocol__(typing.Protocol):
# A module protocol which reflects the result of ``jp.JPackage("cern.japc.value.spi.value.simple")``.
AbstractArrayValue: typing.Type[AbstractArrayValue]
AbstractMapSimpleValue: typing.Type[AbstractMapSimpleValue]
AbstractScalarValue: typing.Type[AbstractScalarValue]
AbstractSimpleValue: typing.Type[AbstractSimpleValue]
Array2DImpl: typing.Type[Array2DImpl]
BooleanArrayValue: typing.Type[BooleanArrayValue]
BooleanValue: typing.Type[BooleanValue]
ByteArrayValue: typing.Type[ByteArrayValue]
ByteValue: typing.Type[ByteValue]
DiscreteFunctionListValue: typing.Type[DiscreteFunctionListValue]
DiscreteFunctionValue: typing.Type[DiscreteFunctionValue]
DoubleArrayValue: typing.Type[DoubleArrayValue]
DoubleValue: typing.Type[DoubleValue]
EnumArrayValue: typing.Type[EnumArrayValue]
EnumSetArrayValue: typing.Type[EnumSetArrayValue]
EnumSetValue: typing.Type[EnumSetValue]
EnumValue: typing.Type[EnumValue]
FloatArrayValue: typing.Type[FloatArrayValue]
FloatValue: typing.Type[FloatValue]
IntArrayValue: typing.Type[IntArrayValue]
IntValue: typing.Type[IntValue]
LongArrayValue: typing.Type[LongArrayValue]
LongValue: typing.Type[LongValue]
ObsoleteFunctionCodec: typing.Type[ObsoleteFunctionCodec]
ShortArrayValue: typing.Type[ShortArrayValue]
ShortValue: typing.Type[ShortValue]
StringArrayValue: typing.Type[StringArrayValue]
StringValue: typing.Type[StringValue]
UpdatableParameterValue: typing.Type[UpdatableParameterValue]
ValueConverter: typing.Type[ValueConverter]
|
[
"[email protected]"
] | |
d47af8dbdf1a77b0a251514121261421f9fa680b
|
7477ca97110f1a173b04029a4ad710cf15627b63
|
/prep.py
|
6d57d22a683d4e2e8e918b9ba7bb57661a68c339
|
[] |
no_license
|
bkj/nbsgd
|
d51e64ad269c94b85f4b6397de66bc00066126d0
|
0cf58b28322e8a213ebbc00b6f9e878be092dad5
|
refs/heads/master
| 2021-09-19T10:18:36.946661 | 2018-07-26T17:48:35 | 2018-07-26T17:48:35 | 113,483,964 | 1 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 2,655 |
py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
nbsgd.py
"""
from __future__ import print_function, division
import os
import re
import sys
import string
import argparse
import numpy as np
from scipy.sparse import coo_matrix, csr_matrix
from sklearn.feature_extraction.text import CountVectorizer
# --
# Helpers
def texts_from_folders(src, names):
texts, labels = [], []
for idx, name in enumerate(names):
path = os.path.join(src, name)
for fname in sorted(os.listdir(path)):
fpath = os.path.join(path, fname)
texts.append(open(fpath).read())
labels.append(idx)
return texts,np.array(labels)
def bow2adjlist(X, maxcols=None):
x = coo_matrix(X)
_, counts = np.unique(x.row, return_counts=True)
pos = np.hstack([np.arange(c) for c in counts])
adjlist = csr_matrix((x.col + 1, (x.row, pos)))
datlist = csr_matrix((x.data, (x.row, pos)))
if maxcols is not None:
adjlist, datlist = adjlist[:,:maxcols], datlist[:,:maxcols]
return adjlist, datlist
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--max-features', type=int, default=200000)
parser.add_argument('--max-words', type=int, default=1000)
parser.add_argument('--ngram-range', type=str, default='1,3')
return parser.parse_args()
if __name__ == "__main__":
args = parse_args()
# --
# IO
print("prep.py: loading", file=sys.stderr)
text_train, y_train = texts_from_folders('data/aclImdb/train', ['neg', 'pos'])
text_val, y_val = texts_from_folders('data/aclImdb/test', ['neg', 'pos'])
# --
# Preprocess
print("prep.py: preprocessing", file=sys.stderr)
re_tok = re.compile('([%s“”¨«»®´·º½¾¿¡§£₤‘’])' % string.punctuation)
tokenizer = lambda x: re_tok.sub(r' \1 ', x).split()
vectorizer = CountVectorizer(
ngram_range=tuple(map(int, args.ngram_range.split(','))),
tokenizer=tokenizer,
max_features=args.max_features
)
X_train = vectorizer.fit_transform(text_train)
X_val = vectorizer.transform(text_val)
X_train_words, _ = bow2adjlist(X_train, maxcols=args.max_words)
X_val_words, _ = bow2adjlist(X_val, maxcols=args.max_words)
# --
# Save
print("prep.py: saving", file=sys.stderr)
np.save('./data/aclImdb/X_train', X_train)
np.save('./data/aclImdb/X_val', X_val)
np.save('./data/aclImdb/X_train_words', X_train_words)
np.save('./data/aclImdb/X_val_words', X_val_words)
np.save('./data/aclImdb/y_train', y_train)
np.save('./data/aclImdb/y_val', y_val)
|
[
"[email protected]"
] | |
4990c1d685cea7f2caba13a5affda77fb5f63742
|
0bf6ecbdebc7424a8946b29127d55c5bc1e7442e
|
/wetLab/migrations/0018_auto_20161107_1627.py
|
8aaf712e6292ab09e4a16ebf06b67cda88e4bf56
|
[] |
no_license
|
dekkerlab/cLIMS
|
2351a9c81f3e3ba982e073500a4a5cf2fd38ed51
|
e76731032a5707027b53746a8f2cc9b01ab7c04e
|
refs/heads/master
| 2021-03-27T06:28:49.718401 | 2017-10-10T19:22:33 | 2017-10-10T19:22:33 | 71,837,345 | 1 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 483 |
py
|
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-11-07 16:27
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('wetLab', '0017_auto_20161107_1626'),
]
operations = [
migrations.RenameField(
model_name='treatmentrnai',
old_name='treatmentRnai_targetNucleotide_seq',
new_name='treatmentRnai_nucleotide_seq',
),
]
|
[
"[email protected]"
] | |
40550862ebcc5009dd432daf15c8a6c3f4ecfb55
|
e94c3e02b390b7c37214218083e4c5b2ad622f60
|
/算法与数据结构/LeetCode/逻辑与数学(Logic&Math)/679.24-点游戏.py
|
cf02b656c4d06bed7d5028e03cd98f9322998e85
|
[
"MIT"
] |
permissive
|
nomore-ly/Job
|
1160e341d9c78c2f99846995893f0289f4e56cf6
|
ff4fd24447e30e2d17f15696842e214fba7ad61b
|
refs/heads/master
| 2023-06-21T00:23:47.594204 | 2021-07-23T07:29:47 | 2021-07-23T07:29:47 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 869 |
py
|
#
# @lc app=leetcode.cn id=679 lang=python3
#
# [679] 24 点游戏
#
# @lc code=start
class Solution:
def judgePoint24(self, nums: List[int]) -> bool:
if not nums: return False
def helper(nums):
if len(nums) == 1: return abs(nums[0]-24) < 1e-6
for i in range(len(nums)):
for j in range(len(nums)):
if i != j:
newnums = [nums[k] for k in range(len(nums)) if i != k != j]
if helper(newnums + [nums[i]+nums[j]]): return True
if helper(newnums + [nums[i]-nums[j]]): return True
if helper(newnums + [nums[i]*nums[j]]): return True
if nums[j] != 0 and helper(newnums + [nums[i]/nums[j]]): return True
return False
return helper(nums)
# @lc code=end
|
[
"[email protected]"
] | |
b914cb6d66206ebc1109e2bea312dded0e148325
|
b2d3bd39b2de8bcc3b0f05f4800c2fabf83d3c6a
|
/examples/pwr_run/checkpointing/nonpc_short/timed_feedback/job45.py
|
93e06ba131127884d7597be0b085b07ce2087fd4
|
[
"MIT"
] |
permissive
|
boringlee24/keras_old
|
3bf7e3ef455dd4262e41248f13c04c071039270e
|
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
|
refs/heads/master
| 2021-11-21T03:03:13.656700 | 2021-11-11T21:57:54 | 2021-11-11T21:57:54 | 198,494,579 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 6,902 |
py
|
"""
#Trains a ResNet on the CIFAR10 dataset.
"""
from __future__ import print_function
import keras
from keras.layers import Dense, Conv2D, BatchNormalization, Activation
from keras.layers import AveragePooling2D, Input, Flatten
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRateScheduler
from keras.callbacks import ReduceLROnPlateau, TensorBoard
from keras.preprocessing.image import ImageDataGenerator
from keras.regularizers import l2
from keras import backend as K
from keras.models import Model
from keras.datasets import cifar10
from keras.applications.mobilenet_v2 import MobileNetV2
from keras import models, layers, optimizers
from datetime import datetime
import tensorflow as tf
import numpy as np
import os
import pdb
import sys
import argparse
import time
import signal
import glob
import json
import send_signal
parser = argparse.ArgumentParser(description='Tensorflow Cifar10 Training')
parser.add_argument('--tc', metavar='TESTCASE', type=str, help='specific testcase name')
parser.add_argument('--resume', dest='resume', action='store_true', help='if True, resume training from a checkpoint')
parser.add_argument('--gpu_num', metavar='GPU_NUMBER', type=str, help='select which gpu to use')
parser.add_argument('--node', metavar='HOST_NODE', type=str, help='node of the host (scheduler)')
parser.set_defaults(resume=False)
args = parser.parse_args()
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]=args.gpu_num
# Training parameters
batch_size = 32
args_lr = 0.003
epoch_begin_time = 0
job_name = sys.argv[0].split('.')[0]
save_files = '/scratch/li.baol/checkpoint_feedback/' + job_name + '*'
total_epochs = 95
starting_epoch = 0
# first step is to update the PID
pid_dict = {}
with open('pid_lock.json', 'r') as fp:
pid_dict = json.load(fp)
pid_dict[job_name] = os.getpid()
json_file = json.dumps(pid_dict)
with open('pid_lock.json', 'w') as fp:
fp.write(json_file)
os.rename('pid_lock.json', 'pid.json')
if args.resume:
save_file = glob.glob(save_files)[0]
# epochs = int(save_file.split('/')[4].split('_')[1].split('.')[0])
starting_epoch = int(save_file.split('/')[4].split('.')[0].split('_')[-1])
data_augmentation = True
num_classes = 10
# Subtracting pixel mean improves accuracy
subtract_pixel_mean = True
n = 3
# Model name, depth and version
model_type = args.tc #'P100_resnet50_he_256_1'
# Load the CIFAR10 data.
(x_train, y_train), (x_test, y_test) = cifar10.load_data()
# Normalize data.
x_train = x_train.astype('float32') / 255
x_test = x_test.astype('float32') / 255
# If subtract pixel mean is enabled
if subtract_pixel_mean:
x_train_mean = np.mean(x_train, axis=0)
x_train -= x_train_mean
x_test -= x_train_mean
print('x_train shape:', x_train.shape)
print(x_train.shape[0], 'train samples')
print(x_test.shape[0], 'test samples')
print('y_train shape:', y_train.shape)
# Convert class vectors to binary class matrices.
y_train = keras.utils.to_categorical(y_train, num_classes)
y_test = keras.utils.to_categorical(y_test, num_classes)
if args.resume:
print('resume from checkpoint')
model = keras.models.load_model(save_file)
else:
print('train from start')
model = models.Sequential()
base_model = MobileNetV2(weights=None, include_top=False, input_shape=(32, 32, 3), pooling=None)
#base_model.summary()
#pdb.set_trace()
model.add(base_model)
model.add(layers.Flatten())
#model.add(layers.BatchNormalization())
#model.add(layers.Dense(128, activation='relu'))
#model.add(layers.Dropout(0.5))
#model.add(layers.BatchNormalization())
#model.add(layers.Dense(64, activation='relu'))
#model.add(layers.Dropout(0.5))
#model.add(layers.BatchNormalization())
model.add(layers.Dense(10, activation='softmax'))
model.compile(loss='categorical_crossentropy',
optimizer=Adam(lr=args_lr),
metrics=['accuracy'])
#model.summary()
print(model_type)
#pdb.set_trace()
current_epoch = 0
################### connects interrupt signal to the process #####################
def terminateProcess(signalNumber, frame):
# first record the wasted epoch time
global epoch_begin_time
if epoch_begin_time == 0:
epoch_waste_time = 0
else:
epoch_waste_time = int(time.time() - epoch_begin_time)
epoch_waste_dict = {}
with open('epoch_waste.json', 'r') as fp:
epoch_waste_dict = json.load(fp)
epoch_waste_dict[job_name] += epoch_waste_time
json_file3 = json.dumps(epoch_waste_dict)
with open('epoch_waste.json', 'w') as fp:
fp.write(json_file3)
print('checkpointing the model triggered by kill -15 signal')
# delete whatever checkpoint that already exists
for f in glob.glob(save_files):
os.remove(f)
model.save('/scratch/li.baol/checkpoint_feedback/' + job_name + '_' + str(current_epoch) + '.h5')
print ('(SIGTERM) terminating the process')
checkpoint_dict = {}
with open('checkpoint.json', 'r') as fp:
checkpoint_dict = json.load(fp)
checkpoint_dict[job_name] = 1
json_file3 = json.dumps(checkpoint_dict)
with open('checkpoint.json', 'w') as fp:
fp.write(json_file3)
sys.exit()
signal.signal(signal.SIGTERM, terminateProcess)
#################################################################################
logdir = '/scratch/li.baol/tsrbrd_log/job_runs/' + model_type + '/' + job_name
tensorboard_callback = TensorBoard(log_dir=logdir)#, update_freq='batch')
class PrintEpoch(keras.callbacks.Callback):
def on_epoch_begin(self, epoch, logs=None):
global current_epoch
#remaining_epochs = epochs - epoch
current_epoch = epoch
print('current epoch ' + str(current_epoch))
global epoch_begin_time
epoch_begin_time = time.time()
def on_epoch_end(self, epoch, logs=None):
# send message of epoch end
message = job_name + ' epoch_end'
send_signal.send(args.node, 10002, message)
my_callback = PrintEpoch()
callbacks = [tensorboard_callback, my_callback]
#[checkpoint, lr_reducer, lr_scheduler, tensorboard_callback]
# Run training
# send signal to indicate checkpoint is qualified
message = job_name + ' ckpt_qual'
send_signal.send(args.node, 10002, message)
model.fit(x_train, y_train,
batch_size=batch_size,
epochs=round(total_epochs/2),
validation_data=(x_test, y_test),
shuffle=True,
callbacks=callbacks,
initial_epoch=starting_epoch,
verbose=1
)
# Score trained model.
scores = model.evaluate(x_test, y_test, verbose=1)
print('Test loss:', scores[0])
print('Test accuracy:', scores[1])
# send signal to indicate job has finished
message = job_name + ' finish'
send_signal.send(args.node, 10002, message)
|
[
"[email protected]"
] | |
e58c556098cbe8831eb24b68a3f714a0be5f5068
|
084c3246c44c2e5ae5a0dd38522cb19ac993fe35
|
/commands/cmd_inpart.py
|
452945864ed9a09ac3933101280315646afc25b9
|
[] |
no_license
|
archivest/PythonWars-1996
|
5bafaca65764ca0d0999b063a5411c53cdbbb0eb
|
b2b301233d72334cfd9b4404b32a45ac22f0b248
|
refs/heads/master
| 2023-02-06T09:53:32.464771 | 2020-12-30T07:37:03 | 2020-12-30T07:37:03 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 6,137 |
py
|
# PythonWars copyright © 2020 by Paul Penner. All rights reserved. In order to
# use this codebase you must comply with all licenses.
#
# Original Diku Mud copyright © 1990, 1991 by Sebastian Hammer,
# Michael Seifert, Hans Henrik Stærfeldt, Tom Madsen, and Katja Nyboe.
#
# Merc Diku Mud improvements copyright © 1992, 1993 by Michael
# Chastain, Michael Quan, and Mitchell Tse.
#
# GodWars improvements copyright © 1995, 1996 by Richard Woolcock.
#
# ROM 2.4 is copyright 1993-1998 Russ Taylor. ROM has been brought to
# you by the ROM consortium: Russ Taylor ([email protected]),
# Gabrielle Taylor ([email protected]), and Brian Moore ([email protected]).
#
# Ported to Python by Davion of MudBytes.net using Miniboa
# (https://code.google.com/p/miniboa/).
#
# In order to use any part of this Merc Diku Mud, you must comply with
# both the original Diku license in 'license.doc' as well the Merc
# license in 'license.txt'. In particular, you may not remove either of
# these copyright notices.
#
# Much time and thought has gone into this software, and you are
# benefiting. We hope that you share your changes too. What goes
# around, comes around.
import game_utils
import interp
import merc
def cmd_inpart(ch, argument):
argument, arg1 = game_utils.read_word(argument)
argument, arg2 = game_utils.read_word(argument)
if ch.is_npc():
return
if not ch.is_demon() and not ch.special.is_set(merc.SPC_CHAMPION):
ch.huh()
return
if not arg1 or not arg2:
ch.send("Syntax: Inpart <person> <power>\n"
"Fangs (2500), Claws (2500), Horns (2500), Hooves (1500), Nightsight (3000),\n"
"Wings (1000), Might (7500), Toughness (7500), Speed (7500), Travel (1500),\n"
"Scry (7500), Shadowsight (7500), Move (500), Leap (500), Magic (1000),\n"
"Lifespan (100), Pact (0), Prince (0), Longsword (0), Shortsword (0).\n")
return
victim = ch.get_char_world(arg1)
if not victim:
ch.not_here(arg1)
return
if victim.is_npc():
ch.not_npc()
return
if victim.level != merc.LEVEL_AVATAR or (victim != ch and not victim.special.is_set(merc.SPC_CHAMPION)):
ch.send("Only on a champion.\n")
return
if victim != ch and not game_utils.str_cmp(victim.lord, ch.name) and not game_utils.str_cmp(victim.lord, ch.lord) and victim.lord:
ch.send("They are not your champion.\n")
return
if game_utils.str_cmp(arg2, "pact"):
if ch == victim:
ch.not_self()
return
if victim.is_immortal():
ch.not_imm()
return
if victim.special.is_set(merc.SPC_SIRE):
victim.send("You have lost the power to make pacts!\n")
ch.send("You remove their power to make pacts.\n")
victim.special.rem_bit(merc.SPC_SIRE)
else:
victim.send("You have been granted the power to make pacts!\n")
ch.send("You grant them the power to make pacts.\n")
victim.special.set_bit(merc.SPC_SIRE)
victim.save(force=True)
return
if game_utils.str_cmp(arg2, "prince"):
if ch == victim:
ch.not_self()
return
if not ch.is_demon():
ch.send("Only the Demon Lord has the power to make princes.\n")
return
if victim.special.is_set(merc.SPC_PRINCE):
victim.send("You have lost your princehood!\n")
ch.send("You remove their princehood.\n")
victim.special.rem_bit(merc.SPC_PRINCE)
else:
victim.send("You have been made a prince!\n")
ch.send("You make them a prince.\n")
victim.special.set_bit(merc.SPC_PRINCE)
victim.save(force=True)
return
if game_utils.str_cmp(arg2, "longsword"):
victim.send("You have been granted the power to transform into a demonic longsword!\n")
ch.send("You grant them the power to transform into a demonic longsword.\n")
victim.powers[merc.DPOWER_OBJ_VNUM] = 29662
victim.save(force=True)
return
if game_utils.str_cmp(arg2, "shortsword"):
victim.send("You have been granted the power to transform into a demonic shortsword!\n")
ch.send("You grant them the power to transform into a demonic shortsword.\n")
victim.powers[merc.DPOWER_OBJ_VNUM] = 29663
victim.save(force=True)
return
inpart_list = [("fangs", merc.DEM_FANGS, 2500), ("claws", merc.DEM_CLAWS, 2500), ("horns", merc.DEM_HORNS, 2500), ("hooves", merc.DEM_HOOVES, 1500),
("nightsight", merc.DEM_EYES, 3000), ("wings", merc.DEM_WINGS, 1000), ("might", merc.DEM_MIGHT, 7500),
("toughness", merc.DEM_TOUGH, 7500), ("speed", merc.DEM_SPEED, 7500), ("travel", merc.DEM_TRAVEL, 1500),
("scry", merc.DEM_SCRY, 7500), ("shadowsight", merc.DEM_SHADOWSIGHT, 3000), ("move", merc.DEM_MOVE, 500),
("leap", merc.DEM_LEAP, 500), ("magic", merc.DEM_MAGIC, 1000), ("lifespan", merc.DEM_LIFESPAN, 100)]
for (aa, bb, cc) in inpart_list:
if game_utils.str_cmp(arg2, aa):
inpart = bb
cost = cc
break
else:
ch.inpart("")
return
if victim.dempower.is_set(inpart):
ch.send("They have already got that power.\n")
return
if ch.powers[merc.DEMON_TOTAL] < cost or ch.powers[merc.DEMON_CURRENT] < cost:
ch.send("You have insufficient power to inpart that gift.\n")
return
victim.dempower.set_bit(inpart)
ch.powers[merc.DEMON_TOTAL] -= cost
ch.powers[merc.DEMON_CURRENT] -= cost
if victim != ch:
victim.send("You have been granted a demonic gift from your patron!\n")
victim.save(force=True)
ch.send("Ok.\n")
ch.save(force=True)
interp.register_command(
interp.CmdType(
name="inpart",
cmd_fun=cmd_inpart,
position=merc.POS_STANDING, level=3,
log=merc.LOG_NORMAL, show=True,
default_arg=""
)
)
|
[
"[email protected]"
] | |
d96eb9b3821ed394ea1288a7137a1556bca79eb5
|
67a217b360c29ac52da4f09b227f89f3265f57ea
|
/aizynthfinder/interfaces/aizynthapp.py
|
dc1a2a08caaee71d6dfb0ea615e6d6d687b84866
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
almohajer/aizynthfinder
|
ab404b9ec7bfb6b505cee7dfe509e7530986ceaa
|
42f83c9eb9fed3fe80dc966bb7b25ccacf1dc022
|
refs/heads/master
| 2023-08-18T08:18:38.960473 | 2021-09-20T10:56:21 | 2021-09-20T10:56:21 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 14,748 |
py
|
""" Module containing classes and routines for the GUI interface
"""
import tempfile
import signal
import subprocess
import os
import argparse
import logging
from typing import TYPE_CHECKING
import ipywidgets as widgets
import jupytext
from ipywidgets import (
HBox,
Label,
VBox,
Text,
Output,
Checkbox,
IntText,
FloatText,
Button,
Dropdown,
BoundedIntText,
BoundedFloatText,
)
from rdkit import Chem
from IPython.display import display, HTML
from aizynthfinder.aizynthfinder import AiZynthFinder
from aizynthfinder.utils.logging import setup_logger
if TYPE_CHECKING:
from aizynthfinder.utils.type_utils import StrDict
class AiZynthApp:
"""
Interface class to be used in a Jupyter Notebook.
Provides a basic GUI to setup and analyze the tree search.
Should be instantiated with the path of a yaml file with configuration:
.. code-block::
from aizynthfinder.interfaces import AiZynthApp
configfile = "/path/to/configfile.yaml"
app = AiZynthApp(configfile)
:ivar finder: the finder instance
:param configfile: the path to yaml file with configuration
:param setup: if True will create and display the GUI on instantiation, defaults to True
"""
def __init__(self, configfile: str, setup: bool = True) -> None:
# pylint: disable=used-before-assignment
setup_logger(logging.INFO)
self.finder = AiZynthFinder(configfile=configfile)
self._input: StrDict = dict()
self._output: StrDict = dict()
self._buttons: StrDict = dict()
if setup:
self.setup()
def setup(self) -> None:
"""
Create the widgets and display the GUI.
This is typically done on instantiation, but this method
if for more advanced uses.
"""
self._create_input_widgets()
self._create_search_widgets()
self._create_route_widgets()
def _create_input_widgets(self) -> None:
self._input["smiles"] = Text(description="SMILES", continuous_update=False)
self._input["smiles"].observe(self._show_mol, names="value")
display(self._input["smiles"])
self._output["smiles"] = Output(
layout={"border": "1px solid silver", "width": "50%", "height": "180px"}
)
display(self._output["smiles"])
self._input["stocks"] = [
Checkbox(
value=True,
description=key,
style={"description_width": "initial"},
layout={"justify": "left"},
)
for key in self.finder.stock.items
]
list_ = [Label("Limit atom occurrences")]
self._input["stocks_atom_count_on"] = []
self._input["stocks_atom_count"] = []
current_criteria = self.finder.stock.stop_criteria.get("counts", {})
for atom in ["C", "O", "N"]:
chk_box = Checkbox(
value=atom in current_criteria,
description=atom,
layout={"justify": "left", "width": "80px"},
style={"description_width": "initial"},
)
self._input["stocks_atom_count_on"].append(chk_box)
inpt = BoundedIntText(
value=current_criteria.get(atom, 0),
min=0,
layout={"width": "80px"},
)
self._input["stocks_atom_count"].append(inpt)
list_.append(HBox([chk_box, inpt]))
box_stocks = VBox(
[Label("Stocks")] + self._input["stocks"] + list_,
layout={"border": "1px solid silver"},
)
self._input["policy"] = widgets.Dropdown(
options=self.finder.expansion_policy.items,
description="Expansion Policy:",
style={"description_width": "initial"},
)
self._input["filter"] = widgets.Dropdown(
options=["None"] + self.finder.filter_policy.items,
description="Filter Policy:",
style={"description_width": "initial"},
)
max_time_box = self._make_slider_input("time_limit", "Time (min)", 1, 120)
self._input["time_limit"].value = self.finder.config.time_limit / 60
max_iter_box = self._make_slider_input(
"iteration_limit", "Max Iterations", 100, 2000
)
self._input["iteration_limit"].value = self.finder.config.iteration_limit
self._input["return_first"] = widgets.Checkbox(
value=self.finder.config.return_first,
description="Return first solved route",
)
vbox = VBox(
[
self._input["policy"],
self._input["filter"],
max_time_box,
max_iter_box,
self._input["return_first"],
]
)
box_options = HBox([box_stocks, vbox])
self._input["C"] = FloatText(description="C", value=self.finder.config.C)
self._input["max_transforms"] = BoundedIntText(
description="Max steps for substrates",
min=1,
max=6,
value=self.finder.config.max_transforms,
style={"description_width": "initial"},
)
self._input["cutoff_cumulative"] = BoundedFloatText(
description="Policy cutoff cumulative",
min=0,
max=1,
value=self.finder.config.cutoff_cumulative,
style={"description_width": "initial"},
)
self._input["cutoff_number"] = BoundedIntText(
description="Policy cutoff number",
min=1,
max=1000,
value=self.finder.config.cutoff_number,
style={"description_width": "initial"},
)
self._input["filter_cutoff"] = BoundedFloatText(
description="Filter cutoff",
min=0,
max=1,
value=self.finder.config.filter_cutoff,
style={"description_width": "initial"},
)
self._input["exclude_target_from_stock"] = widgets.Checkbox(
value=self.finder.config.exclude_target_from_stock,
description="Exclude target from stock",
)
box_advanced = VBox(
[
self._input["C"],
self._input["max_transforms"],
self._input["cutoff_cumulative"],
self._input["cutoff_number"],
self._input["filter_cutoff"],
self._input["exclude_target_from_stock"],
]
)
children = [box_options, box_advanced]
tab = widgets.Tab()
tab.children = children
tab.set_title(0, "Options")
tab.set_title(1, "Advanced")
display(tab)
def _create_route_widgets(self) -> None:
self._input["scorer"] = widgets.Dropdown(
options=self.finder.scorers.names(),
description="Reorder by:",
style={"description_width": "initial"},
)
self._input["scorer"].observe(self._on_change_scorer)
self._buttons["show_routes"] = Button(description="Show Reactions")
self._buttons["show_routes"].on_click(self._on_display_button_clicked)
self._input["route"] = Dropdown(
options=[],
description="Routes: ",
)
self._input["route"].observe(self._on_change_route_option)
display(
HBox(
[
self._buttons["show_routes"],
self._input["route"],
self._input["scorer"],
]
)
)
self._output["routes"] = widgets.Output(
layout={"border": "1px solid silver", "width": "99%"}
)
display(self._output["routes"])
def _create_search_widgets(self) -> None:
self._buttons["execute"] = Button(description="Run Search")
self._buttons["execute"].on_click(self._on_exec_button_clicked)
self._buttons["extend"] = widgets.Button(description="Extend Search")
self._buttons["extend"].on_click(self._on_extend_button_clicked)
display(HBox([self._buttons["execute"], self._buttons["extend"]]))
self._output["tree_search"] = widgets.Output(
layout={
"border": "1px solid silver",
"width": "99%",
"height": "320px",
"overflow": "auto",
}
)
display(self._output["tree_search"])
def _make_slider_input(self, label, description, min_val, max_val) -> HBox:
label_widget = Label(description)
slider = widgets.IntSlider(
continuous_update=True, min=min_val, max=max_val, readout=False
)
self._input[label] = IntText(continuous_update=True, layout={"width": "80px"})
widgets.link((self._input[label], "value"), (slider, "value"))
return HBox([label_widget, slider, self._input[label]])
def _on_change_route_option(self, change) -> None:
if change["name"] != "index":
return
self._show_route(self._input["route"].index)
def _on_change_scorer(self, change) -> None:
if self.finder.routes is None or change["name"] != "index":
return
scorer = self.finder.scorers[self._input["scorer"].value]
self.finder.routes.rescore(scorer)
self._show_route(self._input["route"].index)
def _on_exec_button_clicked(self, _) -> None:
self._toggle_button(False)
self._prepare_search()
self._tree_search()
self._toggle_button(True)
def _on_extend_button_clicked(self, _) -> None:
self._toggle_button(False)
self._tree_search()
self._toggle_button(True)
def _on_display_button_clicked(self, _) -> None:
self._toggle_button(False)
self.finder.build_routes()
self.finder.routes.make_images()
self.finder.routes.compute_scores(*self.finder.scorers.objects())
self._input["route"].options = [
f"Option {i}" for i, _ in enumerate(self.finder.routes, 1) # type: ignore
]
self._show_route(0)
self._toggle_button(True)
def _prepare_search(self) -> None:
self._output["tree_search"].clear_output()
with self._output["tree_search"]:
selected_stocks = [
cb.description for cb in self._input["stocks"] if cb.value
]
self.finder.stock.select(selected_stocks)
atom_count_limits = {}
for cb_input, value_input in zip(
self._input["stocks_atom_count_on"], self._input["stocks_atom_count"]
):
if cb_input.value:
atom_count_limits[cb_input.description] = value_input.value
self.finder.stock.set_stop_criteria({"counts": atom_count_limits})
self.finder.expansion_policy.select(self._input["policy"].value)
if self._input["filter"].value == "None":
self.finder.filter_policy.deselect()
else:
self.finder.filter_policy.select(self._input["policy"].value)
self.finder.config.properties = {
"C": self._input["C"].value,
"max_transforms": self._input["max_transforms"].value,
"cutoff_cumulative": self._input["cutoff_cumulative"].value,
"cutoff_number": int(self._input["cutoff_number"].value),
"return_first": self._input["return_first"].value,
"time_limit": self._input["time_limit"].value * 60,
"iteration_limit": self._input["iteration_limit"].value,
"filter_cutoff": self._input["filter_cutoff"].value,
"exclude_target_from_stock": self._input[
"exclude_target_from_stock"
].value,
}
smiles = self._input["smiles"].value
print("Setting target molecule with smiles: %s" % smiles)
self.finder.target_smiles = smiles
self.finder.prepare_tree()
def _show_mol(self, change) -> None:
self._output["smiles"].clear_output()
with self._output["smiles"]:
mol = Chem.MolFromSmiles(change["new"])
display(mol)
def _show_route(self, index) -> None:
if (
index is None
or self.finder.routes is None
or index >= len(self.finder.routes)
):
return
route = self.finder.routes[index]
state = route["node"].state
status = "Solved" if state.is_solved else "Not Solved"
self._output["routes"].clear_output()
with self._output["routes"]:
display(HTML("<H2>%s" % status))
table_content = "".join(
f"<tr><td>{name}</td><td>{score:.4f}</td></tr>"
for name, score in route["all_score"].items()
)
display(HTML(f"<table>{table_content}</table>"))
display(HTML("<H2>Compounds to Procure"))
display(state.to_image())
display(HTML("<H2>Steps"))
display(self.finder.routes[index]["image"])
def _toggle_button(self, on_) -> None:
for button in self._buttons.values():
button.disabled = not on_
def _tree_search(self) -> None:
with self._output["tree_search"]:
self.finder.tree_search(show_progress=True)
display(HTML("<b>Tree search completed!</b>"))
def _get_arguments() -> argparse.Namespace:
parser = argparse.ArgumentParser("aizynthapp")
parser.add_argument(
"--config", required=True, help="the filename of a configuration file"
)
parser.add_argument("--output", help="the filename of the Jupyter notebook")
return parser.parse_args()
def main() -> None:
"""Entry point for the aizynthapp command"""
args = _get_arguments()
commands = "\n".join(
[
"from aizynthfinder.interfaces import AiZynthApp",
f'configfile=r"{os.path.abspath(args.config)}"',
"app = AiZynthApp(configfile)",
]
)
notebook = jupytext.reads(commands, fmt="py:percent")
if args.output:
filename = args.output
else:
_, filename = tempfile.mkstemp(suffix=".ipynb")
jupytext.write(notebook, filename, fmt="ipynb")
if args.output:
print(f"Notebook saved to {filename}. It can now be open with Jupyter notebook")
return
try:
proc = subprocess.Popen(f"jupyter notebook {filename}".split())
proc.communicate()
except KeyboardInterrupt:
proc.send_signal(signal.SIGINT)
if __name__ == "__main__":
main()
|
[
"[email protected]"
] | |
b92702a1b5b0504d907b5fcb0501caa038e81947
|
d8ea695288010f7496c8661bfc3a7675477dcba0
|
/django/nmq/nmq/wsgi.py
|
b82b5a963bfae62f596fb2edf68fab7627d0e166
|
[] |
no_license
|
dabolau/demo
|
de9c593dabca26144ef8098c437369492797edd6
|
212f4c2ec6b49baef0ef5fcdee6f178fa21c5713
|
refs/heads/master
| 2021-01-17T16:09:48.381642 | 2018-10-08T10:12:45 | 2018-10-08T10:12:45 | 90,009,236 | 1 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 383 |
py
|
"""
WSGI config for nmq project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nmq.settings")
application = get_wsgi_application()
|
[
"[email protected]"
] | |
24e54a2ea97767851ac33f66c7cf051b025cca23
|
afd3ff42313acba5cd9c00b987441465606cf24e
|
/Chapter6-SetsDics/mySets.py
|
5dcf1cf909c06124ae077db3a199bb96de3a887a
|
[] |
no_license
|
sweet23/oreillyPython1
|
a2978d26e620daeacfd6bb6e4bfd9b7042bd808f
|
81923c6c2597226ef420330a06385a030fb99bfa
|
refs/heads/master
| 2020-12-11T03:36:08.799756 | 2015-10-25T18:20:36 | 2015-10-25T18:20:36 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 344 |
py
|
'''
Created on Jan 31, 2015
@author: jay wilner 3
'''
print ({1, 2, 3, 1, 2, 3, 1, 2, 3, 1});
languages = {"perl", "python", "c++", "ruby"}
print(languages);
languages.add('php')
print(languages)
print('is Perl in languages?')
print('Perl' in languages)
print(" is {'python', 'ruby'} < languages ?")
print({'python', 'java'} < languages)
|
[
"[email protected]"
] | |
06a3e9a59e86df3bfc73abeaf8421a85968339c6
|
5be58a04fbbafa83e366d6919df8673ae6897fca
|
/services/python_services/app.py
|
fb226279da5ae1b8f5eef8c1df2433cb5f6b5a3f
|
[] |
no_license
|
EricSchles/domain-scan-orchestration
|
37d5b28d7f7f03e9bd46ce539dd98a288a5fccc1
|
802e473536aec97cb4fce73881277a9d4f82e1f3
|
refs/heads/master
| 2021-01-23T07:08:49.940954 | 2017-09-07T19:09:12 | 2017-09-07T19:09:12 | 102,497,544 | 0 | 0 | null | 2017-09-05T15:19:35 | 2017-09-05T15:19:35 | null |
UTF-8
|
Python
| false | false | 783 |
py
|
from flask import Flask, request
import json
import subprocess
from web_design_standards_check import uswds_checker
app = Flask(__name__)
@app.route("/", methods=["GET","POST"])
def index():
return "whatever"
@app.route("/services/web-design-standards", methods=["GET", "POST"])
def services():
domain = request.args.get("domain")
return json.dumps(uswds_checker(domain))
@app.route("/services/pshtt", methods=["GET","POST"])
def pshtt():
result = subprocess.run(["pshtt", "whitehouse.gov"], stdout=subprocess.PIPE)
return result.stdout
@app.route("/services/command_test", methods=["GET","POST"])
def command_test():
result = subprocess.run(["test_command"], stdout=subprocess.PIPE)
return result.stdout
if __name__ == '__main__':
app.run()
|
[
"[email protected]"
] | |
6174b3ff1f5145c9194d22165d25a2ab7a393321
|
8b2435044491c4f1887bcce6fdd3989b2f55be88
|
/meddet/data/pipelines/loading.py
|
c443b22b15fb1775e9a2da44e92638d33240bb79
|
[] |
no_license
|
JoeeYF/MedDetection
|
ed169c481ff628a771966ba5e5290f799ac2323b
|
8c183d8bf632fe6bf54841ac20db19955331f336
|
refs/heads/main
| 2023-06-12T00:26:13.537943 | 2021-07-06T02:32:42 | 2021-07-06T02:32:42 | 382,782,483 | 2 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 10,102 |
py
|
import os.path as osp
from typing import List
import numpy as np
import gc
from ..registry import PIPELINES
from ..utils import ImageIO
from .aug_base import Stage, OperationStage
@PIPELINES.register_module
class LoadPrepare(object):
"""
Not a class inherited from Stage. It's used to prepare the format of result.
"""
def __init__(self, debug=False):
self.debug = debug
def __repr__(self):
return self.__class__.__name__ + f'(debug={self.debug})'
def __call__(self, image_path, label_path='', **kwargs):
result = {
'filename': osp.basename(image_path),
'image_path': image_path,
'label_path': label_path,
'img_fields': [],
'cls_fields': [],
'seg_fields': [],
'det_fields': [],
'history': [],
'time': [],
'_debug_': self.debug
}
result.update(kwargs)
return [result]
@PIPELINES.register_module
class LoadImageFromFile(Stage):
def __init__(self, to_float32=True):
super().__init__()
self.to_float32 = to_float32
def __repr__(self):
return self.__class__.__name__ + '(to_float32={})'.format(self.to_float32)
def _forward(self, result):
image_path = result['image_path']
image, image_dim, image_spacing, image_origin = ImageIO.loadArray(image_path)
if self.to_float32:
image = image.astype(np.float32)
result['img'] = image
result['img_dim'] = image_dim
result['img_shape'] = image.shape
result['img_spacing'] = image_spacing
result['img_origin'] = image_origin
result['ori_shape'] = image.shape
result['ori_spacing'] = image_spacing
result['img_fields'].append('img')
gc.collect()
return result
@PIPELINES.register_module
class LoadAnnotations(Stage):
def __init__(self,
with_cls=False,
with_seg=False,
with_det=False):
super().__init__()
self.with_cls = with_cls # for classification
self.with_seg = with_seg # for segmentation
self.with_det = with_det # for detection
assert self.with_cls or with_seg or self.with_det
def __repr__(self):
repr_str = self.__class__.__name__
repr_str += '(with_cls={}, with_seg={}, with_det={})'.format(self.with_cls, self.with_seg, self.with_det)
return repr_str
def _forward(self, result):
if self.with_cls:
self._load_cls(result)
elif self.with_seg:
self._load_seg(result)
elif self.with_det:
self._load_det(result)
return result
@staticmethod
def _load_cls(result):
""" class is 1 based number"""
assert isinstance(result['label_path'], int), 'with label must contain a <int> label'
result['gt_cls'] = result['label_path']
result['cls_fields'].append('gt_cls')
@staticmethod
def _load_seg(result):
""" seg is [1, d, h, w] """
label_path = result['label_path']
assert osp.exists(label_path), 'label path must exist'
seg, seg_dim, _, _ = ImageIO.loadArray(label_path)
# assert result['img_dim'] == seg_dim, f"img is {result['img_dim']}D while label is {seg_dim}D"
if np.max(seg) > 64: # it should be a cv image, such as jpg
# the classes should less than 64
# if 'ISIC2018' in label_path:
# seg = (seg > 127.5).astype(np.float32)
classes = np.unique(seg)
assert len(classes) < 64, "there maybe some error ?"
for tag, val in enumerate(classes):
if tag == val:
continue
seg[seg == val] = tag
result['gt_seg'] = seg.astype(np.int32)
result['seg_shape'] = seg.shape
result['seg_fields'].append('gt_seg')
gc.collect()
@staticmethod
def _load_det(result):
""" [n, (x,y,x,y, cls, score) | (x,y,z,x,y,z, cls, score)] """
dim = result['img_dim']
pseudo_mask = np.zeros_like(result['img'][[0], ...])
det = []
for ann in result['label_path']:
# ann['bbox']: (x,y,w,h) | (x,y,z,w,h,d)
# ann['category_id']: int, 1 based
det.append(ann['bbox'] + [ann['category_id'], 1.00]) # the last one is score
# draw pseudo mask
bbox = np.array(ann['bbox']).astype(np.float32)
bbox[dim:] = bbox[:dim] + bbox[dim:]
slices = list(map(slice, reversed(np.int32(bbox[:dim])), reversed(np.int32(bbox[dim:]))))
slices = [slice(None)] + slices
pseudo_mask[tuple(slices)] = ann['category_id']
det = np.array(det).astype(np.float32)
if len(det) != 0:
# RoIAlign will contains start and stop elements, but width should not contain
# for example: 0123456 start is 1, and stop is 4, width = 4 - 1 + 1 = 4
# _####__
det[:, dim: 2*dim] = det[:, :dim] + det[:, dim: 2*dim] - 1
result['gt_det'] = det
result['det_fields'].append('gt_det')
result['pseudo_mask'] = pseudo_mask
result['seg_shape'] = pseudo_mask.shape
result['seg_fields'].append('pseudo_mask')
# @PIPELINES.register_module
# class LoadCoordinate(Stage):
# def __repr__(self):
# repr_str = self.__class__.__name__ + '()'
# return repr_str
#
# def _forward(self, result):
# img_shape = result['img'].shape[1:]
# zz, yy, xx = np.meshgrid(
# np.linspace(-0.5, 0.5, img_shape[0]),
# np.linspace(-0.5, 0.5, img_shape[1]),
# np.linspace(-0.5, 0.5, img_shape[2]),
# indexing='ij')
# coord = np.stack([zz, yy, xx], 0).astype('float32')
#
# result['gt_coord'] = coord
# result['seg_fields'].append('gt_coord')
# return result
@PIPELINES.register_module
class LoadCoordinate(OperationStage):
def __repr__(self):
repr_str = self.__class__.__name__ + '()'
return repr_str
@property
def canBackward(self):
return True
def _forward(self, result):
img_shape = result['img'].shape[1:]
zz, yy, xx = np.meshgrid(
np.linspace(-0.5, 0.5, img_shape[0]),
np.linspace(-0.5, 0.5, img_shape[1]),
np.linspace(-0.5, 0.5, img_shape[2]),
indexing='ij')
coord = np.stack([zz, yy, xx], 0).astype('float32')
result['gt_coord'] = coord
result['seg_fields'].append('gt_coord')
return result
@PIPELINES.register_module
class LoadPseudoAsSeg(Stage):
def __repr__(self):
repr_str = self.__class__.__name__ + '()'
return repr_str
def _forward(self, result):
result['gt_seg'] = result.pop('pseudo_mask')
result['seg_fields'].remove('pseudo_mask')
result['seg_fields'].append('gt_seg')
return result
@PIPELINES.register_module
class LoadSegAsImg(Stage):
def __repr__(self):
repr_str = self.__class__.__name__ + '()'
return repr_str
def _forward(self, result):
result['filename'] = osp.basename(result['label_path'])
result['image_path'] = result['label_path']
return result
@PIPELINES.register_module
class LoadWeights(Stage):
def __repr__(self):
repr_str = self.__class__.__name__ + '()'
return repr_str
def _forward(self, result):
dist, _, _, _ = ImageIO.loadArray(result['weight_path'])
result['pixel_weight'] = dist
return result
@PIPELINES.register_module
class LoadPredictions(Stage):
def __init__(self,
with_cls=False,
with_seg=False,
with_det=False):
super().__init__()
self.with_cls = with_cls # for classification
self.with_seg = with_seg # for segmentation
self.with_det = with_det # for detection
assert self.with_cls or with_seg or self.with_det
def __repr__(self):
repr_str = self.__class__.__name__
repr_str += '(with_cls={}, with_seg={}, with_det={})'.format(self.with_cls, self.with_seg, self.with_det)
return repr_str
def _forward(self, result):
if self.with_cls:
self._load_cls(result)
elif self.with_seg:
self._load_seg(result)
elif self.with_det:
self._load_det(result)
return result
@staticmethod
def _load_cls(result):
result['pred_cls'] = -1
result['cls_fields'].append('pred_cls')
@staticmethod
def _load_seg(result):
result['pred_seg'] = np.zeros_like(result['img'][[0], ...])
result['seg_fields'].append('pred_seg')
@staticmethod
def _load_det(result):
dim = result['img_dim']
result['pred_det'] = np.ones([500, 2 * dim + 2]) * -1.
result['det_fields'].append('pred_det')
@PIPELINES.register_module
class WorldVoxelConversion(Stage):
def __init__(self, reverse=False):
super(WorldVoxelConversion, self).__init__()
self.reverse = reverse
def __repr__(self):
repr_str = self.__class__.__name__
repr_str += '(reverse={})'.format(self.reverse)
return repr_str
@staticmethod
def worldToVoxelCoord(worldCoord, origin, spacing):
stretchedVoxelCoord = np.absolute(worldCoord - origin)
voxelCoord = stretchedVoxelCoord / spacing
return voxelCoord
@staticmethod
def VoxelToWorldCoord(voxelCoord, origin, spacing):
stretchedVoxelCoord = voxelCoord * spacing
worldCoord = stretchedVoxelCoord + origin
return worldCoord
def convert(self):
np.concatenate(
self.VoxelToWorldCoord(result['gt_det'][:, :3], result['img_spacing'], result['origin']),
self.VoxelToWorldCoord(result['gt_det'][:, 3:], result['img_spacing'], result['origin']))
def _forward(self, result: dict):
pass
|
[
"[email protected]"
] | |
c40feab46c498feab832014eeb2903169b874151
|
f07a42f652f46106dee4749277d41c302e2b7406
|
/Data Set/bug-fixing-1/011eac1d9242903f4e2db5ccccc74d97ad1e7cb9-<update_subscriptions>-bug.py
|
4e65c2c1b62f17801bf04586a963ae137d2cf185
|
[] |
no_license
|
wsgan001/PyFPattern
|
e0fe06341cc5d51b3ad0fe29b84098d140ed54d1
|
cc347e32745f99c0cd95e79a18ddacc4574d7faa
|
refs/heads/main
| 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 721 |
py
|
def update_subscriptions():
try:
f = open(options.stream_file_path, 'r')
public_streams = simplejson.loads(f.read())
f.close()
except:
logger.exception('Error reading public streams:')
return
classes_to_subscribe = set()
for stream in public_streams:
zephyr_class = stream.encode('utf-8')
if ((options.shard is not None) and (not hashlib.sha1(zephyr_class).hexdigest().startswith(options.shard))):
continue
if (zephyr_class in current_zephyr_subs):
continue
classes_to_subscribe.add((zephyr_class, '*', '*'))
if (len(classes_to_subscribe) > 0):
zephyr_bulk_subscribe(list(classes_to_subscribe))
|
[
"[email protected]"
] | |
f5c955619eac91433d16f01da67789e821c60523
|
5b37d86af518b90cb848233c7f5f53befc15a5ed
|
/training_xvector.py
|
9208238a0b168e05113d2f68ecb2aa7f345b1813
|
[
"MIT"
] |
permissive
|
taalua/x-vector-pytorch
|
45fce3606eeb0b9a996179a1e0242d62e8393bcd
|
7d86f78a1a70974df490ef7d2629de2d71dd1558
|
refs/heads/master
| 2023-07-21T04:47:45.596582 | 2021-08-25T17:58:58 | 2021-08-25T17:58:58 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 263 |
py
|
from x_vectors.trainer import Trainer, Args
args=Args()
args.get_args()
args.loss_fun='AngleLoss'
# args.loss_fun='CrossEntropyLoss'
# args.loss_fun='AngularLoss'
# args.loss_fun='AdMSoftmaxLoss'
args.batch_size=3
trainer=Trainer(args)
#train
trainer.train(10)
|
[
"[email protected]"
] | |
81768dc5d05076cdf91074bb336ea3aa70e5612b
|
55a4d7ed3ad3bdf89e995eef2705719ecd989f25
|
/main/law/spark_part/spark_part_limai_and_wenshu_origin/spark_part_main_74_102_laws_doc_judgment2_keshihua.py
|
d13cf17bf5872bc4381c7c87c4960e72bad18244
|
[] |
no_license
|
ichoukou/Bigdata
|
31c1169ca742de5ab8c5671d88198338b79ab901
|
537d90ad24eff4742689eeaeabe48c6ffd9fae16
|
refs/heads/master
| 2020-04-17T04:58:15.532811 | 2018-12-11T08:56:42 | 2018-12-11T08:56:42 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 4,921 |
py
|
# -*- coding: utf-8 -*-
"""
对抓取的文书内容进行数据提取
"""
import re
from pyspark import SparkContext,SparkConf
from pyspark.sql import SQLContext
from pyspark.sql.types import *
import json
import pymysql
from lxml import etree
import HTMLParser
import uuid as UUID
import time
if __name__ == "__main__":
# PYSPARK_PYTHON = "C:\\Python27\\python.exe" #多版本python情况下,需要配置这个变量指定使用哪个版本
# os.environ["PYSPARK_PYTHON"] = PYSPARK_PYTHON
conf = SparkConf()
sc = SparkContext(conf=conf)
sqlContext = SQLContext(sc)
# sc.setLogLevel("ERROR") # ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN '(select id,uuid,plaintiff_info,defendant_info from tmp_lawyers ) tmp'
# df = sqlContext.read.jdbc(url='jdbc:mysql://192.168.10.22:3306/laws_doc', table='(select id,uuid,doc_content from adjudication_civil where id >= 1010 and id <= 1041 and doc_from = "limai" ) tmp',column='id',lowerBound=1,upperBound=1800000,numPartitions=1,properties={"user": "tzp", "password": "123456"})
df = sqlContext.read.jdbc(url='jdbc:mysql://192.168.74.102:3306/laws_doc2', table='(select id,uuid,province,city,if_surrender,if_nosuccess,if_guity,if_accumulate,if_right,if_team,if_adult,age_year,org_plaintiff,org_defendant,dispute,court_cate,if_delay,duration,history,history_title,plaintiff_id,defendant_id,lawyer_id,lawyer from judgment2_main_etl ) tmp',column='id',lowerBound=1,upperBound=42588,numPartitions=10,properties={"user": "weiwc", "password": "HHly2017."})
def p(x):
print type(x),x
# print type(x[0]),type(x[1]),type(x[2]),type(x[3]),type(x[4])
# if len(x) >6:
# print x[0],x[1],x[2],x[3],x[4],x[5],x[6]
# else:print x[0],x[1],x[2],x[3],x[4],x[5]
def filter_(x):
if x :
return True
return False
def doc_items(items):
uuid = unicode(UUID.uuid3(UUID.NAMESPACE_DNS2, items[1].encode("utf8"))).replace("-", "")
return (items[0],uuid,items[2],items[3],items[4],
items[5],items[6],items[7],items[8],items[9],
items[10],items[11],items[12],items[13],items[14],
items[15],items[16],items[17],items[18],
items[19],items[20],items[21],items[22],items[23])
lawyer_k_v = df.map(lambda x:x).map(lambda x:doc_items(x))
# id, uuid, province, city, if_surrender, \
# if_nosuccess, if_guity, if_accumulate, if_right, \
# if_team, if_adult, age_year, org_plaintiff, org_defendant,\
# dispute, court_cate, if_delay, age_min, duration, history, \
# history_title, judge, plaintiff_id,\
# defendant_id, lawyer_id, lawyer,
schema = StructType([StructField("id", IntegerType(), False)
,StructField("uuid", StringType(), False)
,StructField("province", StringType(), True)
,StructField("city", StringType(), True)
,StructField("if_surrender", StringType(), True)
,StructField("if_nosuccess", StringType(), True)
,StructField("if_guity", StringType(), True)
,StructField("if_accumulate", StringType(), True)
,StructField("if_right", StringType(), True)
, StructField("if_team", StringType(), True)
, StructField("if_adult", StringType(), True)
, StructField("age_year", StringType(), True)
, StructField("org_plaintiff", StringType(), True)
, StructField("org_defendant", StringType(), True)
, StructField("dispute", StringType(), True)
, StructField("court_cate", StringType(), True)
, StructField("if_delay", StringType(), True)
, StructField("duration", StringType(), True)
, StructField("history", StringType(), True)
, StructField("history_title", StringType(), True)
, StructField("plaintiff_id", StringType(), True)
, StructField("defendant_id", StringType(), True)
, StructField("lawyer_id", StringType(), True)
, StructField("lawyer", StringType(), True)
])
f = sqlContext.createDataFrame(lawyer_k_v, schema=schema)
# f.show()
# , mode = "overwrite"
# useUnicode = true & characterEncoding = utf8,指定写入mysql时的数据编码,否则会乱码。
f.write.jdbc(url='jdbc:mysql://cdh5-slave2:3306/laws_doc_judgment?useUnicode=true&characterEncoding=utf8', table='judgment2_keshihua_only',properties={"user": "weiwc", "password": "HHly2017."})
sc.stop()
|
[
"[email protected]"
] | |
8760e551048186bc85514da491a6a322ad8c4336
|
e44ff4069f5b559954e7a66685c86b054a70de7a
|
/Practice Codes/CRDGAME2.py
|
05854a976dad0fa141abd93f375f7b9e5497db8c
|
[] |
no_license
|
SayanDutta001/Competitive-Programming-Codes
|
2912985e037f83bcde8e7fcb0036f1e31fa626df
|
6dac061c0a4b1c5e82b99ec134e9e77606508e15
|
refs/heads/master
| 2023-03-17T04:25:47.507594 | 2021-03-05T16:23:09 | 2021-03-05T16:23:09 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 688 |
py
|
from math import pow
def trumpcard(n, a):
global mod
maxi = max(a)
turn = 1
cmaxi = a.count(maxi)
res = int(pow(2, n))%mod
if(cmaxi%2==0):
mini = min(cmaxi//2, cmaxi-cmaxi//2)
for i in range(mini):
turn = int(((turn%mod)*(cmaxi-i)%mod))%mod
turn = int(((turn%mod) * (pow(i+1, mod-2)%mod)))%mod
res -= ((pow(2, n-cmaxi)%mod)*(turn)%mod)%mod
if(res<0):
return (int(res)+mod)%mod
return int(res)%mod
test = int(input())
mod = 1000000007
for i in range(test):
n = int(input())
a = list(map(int, input().split()))
if(n==1):
print(2)
continue
print(trumpcard(n, a))
|
[
"[email protected]"
] | |
368e1d63d8dc911340339dc2b8dd3dbdb2a87eed
|
40b42ccf2b6959d6fce74509201781be96f04475
|
/tools/data/textdet/ic11_converter.py
|
84f0099bad10425a4b6d5f8639b3a75a5cab47a0
|
[
"Apache-2.0"
] |
permissive
|
xdxie/WordArt
|
2f1414d8e4edaa89333353d0b28e5096e1f87263
|
89bf8a218881b250d0ead7a0287526c69586c92a
|
refs/heads/main
| 2023-05-23T02:04:22.185386 | 2023-03-06T11:51:43 | 2023-03-06T11:51:43 | 515,485,694 | 106 | 12 | null | null | null | null |
UTF-8
|
Python
| false | false | 4,860 |
py
|
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os
import os.path as osp
import mmcv
from PIL import Image
from mmocr.utils import convert_annotations
def convert_gif(img_path):
"""Convert the gif image to png format.
Args:
img_path (str): The path to the gif image
"""
img = Image.open(img_path)
dst_path = img_path.replace('gif', 'png')
img.save(dst_path)
os.remove(img_path)
print(f'Convert {img_path} to {dst_path}')
def collect_files(img_dir, gt_dir):
"""Collect all images and their corresponding groundtruth files.
Args:
img_dir (str): The image directory
gt_dir (str): The groundtruth directory
Returns:
files (list): The list of tuples (img_file, groundtruth_file)
"""
assert isinstance(img_dir, str)
assert img_dir
assert isinstance(gt_dir, str)
assert gt_dir
ann_list, imgs_list = [], []
for img in os.listdir(img_dir):
img_path = osp.join(img_dir, img)
# mmcv cannot read gif images, so convert them to png
if img.endswith('gif'):
convert_gif(img_path)
img_path = img_path.replace('gif', 'png')
imgs_list.append(img_path)
ann_list.append(osp.join(gt_dir, 'gt_' + img.split('.')[0] + '.txt'))
files = list(zip(sorted(imgs_list), sorted(ann_list)))
assert len(files), f'No images found in {img_dir}'
print(f'Loaded {len(files)} images from {img_dir}')
return files
def collect_annotations(files, nproc=1):
"""Collect the annotation information.
Args:
files (list): The list of tuples (image_file, groundtruth_file)
nproc (int): The number of process to collect annotations
Returns:
images (list): The list of image information dicts
"""
assert isinstance(files, list)
assert isinstance(nproc, int)
if nproc > 1:
images = mmcv.track_parallel_progress(
load_img_info, files, nproc=nproc)
else:
images = mmcv.track_progress(load_img_info, files)
return images
def load_img_info(files):
"""Load the information of one image.
Args:
files (tuple): The tuple of (img_file, groundtruth_file)
Returns:
img_info (dict): The dict of the img and annotation information
"""
assert isinstance(files, tuple)
img_file, gt_file = files
# read imgs while ignoring orientations
img = mmcv.imread(img_file, 'unchanged')
img_info = dict(
file_name=osp.join(osp.basename(img_file)),
height=img.shape[0],
width=img.shape[1],
segm_file=osp.join(osp.basename(gt_file)))
if osp.splitext(gt_file)[1] == '.txt':
img_info = load_txt_info(gt_file, img_info)
else:
raise NotImplementedError
return img_info
def load_txt_info(gt_file, img_info):
"""Collect the annotation information.
The annotation format is as the following:
left, top, right, bottom, "transcription"
Args:
gt_file (str): The path to ground-truth
img_info (dict): The dict of the img and annotation information
Returns:
img_info (dict): The dict of the img and annotation information
"""
anno_info = []
with open(gt_file, 'r') as f:
lines = f.readlines()
for line in lines:
xmin, ymin, xmax, ymax = line.split(',')[0:4]
x = max(0, int(xmin))
y = max(0, int(ymin))
w = int(xmax) - x
h = int(ymax) - y
bbox = [x, y, w, h]
segmentation = [x, y, x + w, y, x + w, y + h, x, y + h]
anno = dict(
iscrowd=0,
category_id=1,
bbox=bbox,
area=w * h,
segmentation=[segmentation])
anno_info.append(anno)
img_info.update(anno_info=anno_info)
return img_info
def parse_args():
parser = argparse.ArgumentParser(
description='Generate training and test set of IC11')
parser.add_argument('root_path', help='Root dir path of IC11')
parser.add_argument(
'--nproc', default=1, type=int, help='Number of process')
args = parser.parse_args()
return args
def main():
args = parse_args()
root_path = args.root_path
for split in ['training', 'test']:
print(f'Processing {split} set...')
with mmcv.Timer(print_tmpl='It takes {}s to convert annotation'):
files = collect_files(
osp.join(root_path, 'imgs', split),
osp.join(root_path, 'annotations', split))
image_infos = collect_annotations(files, nproc=args.nproc)
convert_annotations(
image_infos, osp.join(root_path,
'instances_' + split + '.json'))
if __name__ == '__main__':
main()
|
[
"[email protected]"
] | |
01f5dde1701543d02a96075a4da8cbe8ec20d8aa
|
ca7aa979e7059467e158830b76673f5b77a0f5a3
|
/Python_codes/p03457/s520758102.py
|
5d402c644ef6ae585d4175be890b33171eb27682
|
[] |
no_license
|
Aasthaengg/IBMdataset
|
7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901
|
f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8
|
refs/heads/main
| 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 328 |
py
|
N = int(input())
t = [list(map(int,input().split())) for _ in range(N)]
x,k,y = 0,0,0
for i in range(N):
if (abs(t[i][1] - x) + abs(t[i][2] - y) > t[i][0] - k
or (abs(t[i][1] - x) + abs(t[i][2] - y))%2 != (t[i][0] - k)%2):
print("No")
exit()
x = t[i][1]
y = t[i][2]
k = t[i][0]
print("Yes")
|
[
"[email protected]"
] | |
a225b24ca6b6653b80377df6786f767eae4f51ab
|
01017443bb892f4f3a2d1f1fd1e9aa693312865c
|
/home_connect_api/api/status_events_api.py
|
88059aed212a5d2f8f4d58147d3a3bf8a71caf0c
|
[
"MIT"
] |
permissive
|
biberhund/home-connect-api
|
d088b995e0d7d1b588894059330c91c9a29a87d3
|
62cca9c0faee9a18210ef7f7a94d2e6dafb97524
|
refs/heads/master
| 2023-03-23T03:25:39.040078 | 2020-04-16T05:14:50 | 2020-04-16T05:14:50 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 25,686 |
py
|
# coding: utf-8
"""
Home Connect API
This API provides access to home appliances enabled by Home Connect (https://home-connect.com). Through the API programs can be started and stopped, or home appliances configured and monitored. For instance, you can start a cotton program on a washer and get a notification when the cycle is complete. To get started with this web client, visit https://developer.home-connect.com and register an account. An application with a client ID for this API client will be automatically generated for you. In order to use this API in your own client, you need an OAuth 2 client implementing the authorization code grant flow (https://developer.home-connect.com/docs/authorization/flow). More details can be found here: https://www.rfc-editor.org/rfc/rfc6749.txt Authorization URL: https://api.home-connect.com/security/oauth/authorize Token URL: https://api.home-connect.com/security/oauth/token # noqa: E501
OpenAPI spec version: 1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from home_connect_api.api_client import ApiClient
class StatusEventsApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def get_all_events(self, **kwargs): # noqa: E501
"""Get stream of events for all appliances - NOT WORKING WITH SWAGGER # noqa: E501
Server Sent Events are available as Eventsource API in JavaScript and are implemented by various HTTP client libraries and tools including curl. Unfortunately, SSE is not compatible to OpenAPI specs and can therefore not be properly specified within this API description. An SSE event contains three parts separated by linebreaks: event, data and id. Different events are separated by empty lines. The event field can be one of these types: KEEP-ALIVE, STATUS, EVENT, NOTIFY, DISCONNECTED, CONNECTED. In case of the event type being STATUS, EVENT or NOTIFY, the \"data\" field is populated with the JSON object defined below. The id contains the home appliance ID. Further documentation can be found here: * [Events availability matrix](https://developer.home-connect.com/docs/monitoring/availabilitymatrix) * [Program changes](https://developer.home-connect.com/docs/monitoring/program_option_changes) * [Option changes](https://developer.home-connect.com/docs/monitoring/option_changes) * [Program progress changes](https://developer.home-connect.com/docs/monitoring/program_progress_changes) * [Home appliance state changes](https://developer.home-connect.com/docs/monitoring/appliance_state_changes) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_events(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str accept_language: Language for localized assets
:return: ArrayOfEvents
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_all_events_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.get_all_events_with_http_info(**kwargs) # noqa: E501
return data
def get_all_events_with_http_info(self, **kwargs): # noqa: E501
"""Get stream of events for all appliances - NOT WORKING WITH SWAGGER # noqa: E501
Server Sent Events are available as Eventsource API in JavaScript and are implemented by various HTTP client libraries and tools including curl. Unfortunately, SSE is not compatible to OpenAPI specs and can therefore not be properly specified within this API description. An SSE event contains three parts separated by linebreaks: event, data and id. Different events are separated by empty lines. The event field can be one of these types: KEEP-ALIVE, STATUS, EVENT, NOTIFY, DISCONNECTED, CONNECTED. In case of the event type being STATUS, EVENT or NOTIFY, the \"data\" field is populated with the JSON object defined below. The id contains the home appliance ID. Further documentation can be found here: * [Events availability matrix](https://developer.home-connect.com/docs/monitoring/availabilitymatrix) * [Program changes](https://developer.home-connect.com/docs/monitoring/program_option_changes) * [Option changes](https://developer.home-connect.com/docs/monitoring/option_changes) * [Program progress changes](https://developer.home-connect.com/docs/monitoring/program_progress_changes) * [Home appliance state changes](https://developer.home-connect.com/docs/monitoring/appliance_state_changes) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_all_events_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str accept_language: Language for localized assets
:return: ArrayOfEvents
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['accept_language'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_all_events" % key
)
params[key] = val
del params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
if 'accept_language' in params:
header_params['Accept-Language'] = params['accept_language'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['text/event-stream']) # noqa: E501
# Authentication setting
auth_settings = ['homeconnect_auth'] # noqa: E501
return self.api_client.call_api(
'/homeappliances/events', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ArrayOfEvents', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_events(self, haid, **kwargs): # noqa: E501
"""Get stream of events for one appliance - NOT WORKING WITH SWAGGER # noqa: E501
If you want to do a one-time query of the current status, you can ask for the content-type `application/vnd.bsh.sdk.v1+json` and get the status as normal HTTP response. If you want an ongoing stream of events in real time, ask for the content type `text/event-stream` and you'll get a stream as Server Sent Events. Server Sent Events are available as Eventsource API in JavaScript and are implemented by various HTTP client libraries and tools including curl. Unfortunately, SSE is not compatible to OpenAPI specs and can therefore not be properly specified within this API description. An SSE event contains three parts separated by linebreaks: event, data and id. Different events are separated by empty lines. The event field can be one of these types: KEEP-ALIVE, STATUS, EVENT, NOTIFY, DISCONNECTED, CONNECTED. In case of the event type being STATUS, EVENT or NOTIFY, the \"data\" field is populated with the JSON object defined below. The id contains the home appliance ID. Further documentation can be found here: * [Events availability matrix](https://developer.home-connect.com/docs/monitoring/availabilitymatrix) * [Program changes](https://developer.home-connect.com/docs/monitoring/program_option_changes) * [Option changes](https://developer.home-connect.com/docs/monitoring/option_changes) * [Program progress changes](https://developer.home-connect.com/docs/monitoring/program_progress_changes) * [Home appliance state changes](https://developer.home-connect.com/docs/monitoring/appliance_state_changes) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_events(haid, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str haid: ID of home appliance (required)
:param str accept_language: Language for localized assets
:param str accept:
:return: ArrayOfEvents
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_events_with_http_info(haid, **kwargs) # noqa: E501
else:
(data) = self.get_events_with_http_info(haid, **kwargs) # noqa: E501
return data
def get_events_with_http_info(self, haid, **kwargs): # noqa: E501
"""Get stream of events for one appliance - NOT WORKING WITH SWAGGER # noqa: E501
If you want to do a one-time query of the current status, you can ask for the content-type `application/vnd.bsh.sdk.v1+json` and get the status as normal HTTP response. If you want an ongoing stream of events in real time, ask for the content type `text/event-stream` and you'll get a stream as Server Sent Events. Server Sent Events are available as Eventsource API in JavaScript and are implemented by various HTTP client libraries and tools including curl. Unfortunately, SSE is not compatible to OpenAPI specs and can therefore not be properly specified within this API description. An SSE event contains three parts separated by linebreaks: event, data and id. Different events are separated by empty lines. The event field can be one of these types: KEEP-ALIVE, STATUS, EVENT, NOTIFY, DISCONNECTED, CONNECTED. In case of the event type being STATUS, EVENT or NOTIFY, the \"data\" field is populated with the JSON object defined below. The id contains the home appliance ID. Further documentation can be found here: * [Events availability matrix](https://developer.home-connect.com/docs/monitoring/availabilitymatrix) * [Program changes](https://developer.home-connect.com/docs/monitoring/program_option_changes) * [Option changes](https://developer.home-connect.com/docs/monitoring/option_changes) * [Program progress changes](https://developer.home-connect.com/docs/monitoring/program_progress_changes) * [Home appliance state changes](https://developer.home-connect.com/docs/monitoring/appliance_state_changes) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_events_with_http_info(haid, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str haid: ID of home appliance (required)
:param str accept_language: Language for localized assets
:param str accept:
:return: ArrayOfEvents
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['haid', 'accept_language', 'accept'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_events" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'haid' is set
if ('haid' not in params or
params['haid'] is None):
raise ValueError("Missing the required parameter `haid` when calling `get_events`") # noqa: E501
collection_formats = {}
path_params = {}
if 'haid' in params:
path_params['haid'] = params['haid'] # noqa: E501
query_params = []
header_params = {}
if 'accept_language' in params:
header_params['Accept-Language'] = params['accept_language'] # noqa: E501
if 'accept' in params:
header_params['Accept'] = params['accept'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/vnd.bsh.sdk.v1+json', 'text/event-stream']) # noqa: E501
# Authentication setting
auth_settings = ['homeconnect_auth'] # noqa: E501
return self.api_client.call_api(
'/homeappliances/{haid}/events', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ArrayOfEvents', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_status(self, haid, **kwargs): # noqa: E501
"""Get current status of home appliance # noqa: E501
A detailed description of the available status can be found here: * [Remote control activation state](https://developer.home-connect.com/docs/api/status/remotecontrolactivationstate) * [Remote start allowance state](https://developer.home-connect.com/docs/api/status/remotestartallowancestate) * [Local control state](https://developer.home-connect.com/docs/api/status/localcontrolstate) * [Operation state](https://developer.home-connect.com/docs/status/operation_state) * [Door state](https://developer.home-connect.com/docs/status/door_state) Several more device-specific states can be found [in the documentation](https://developer.home-connect.com/docs/api/status/remotecontrolactivationstate). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_status(haid, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str haid: ID of home appliance (required)
:param str accept_language: Language for localized assets
:return: ArrayOfStatus
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_status_with_http_info(haid, **kwargs) # noqa: E501
else:
(data) = self.get_status_with_http_info(haid, **kwargs) # noqa: E501
return data
def get_status_with_http_info(self, haid, **kwargs): # noqa: E501
"""Get current status of home appliance # noqa: E501
A detailed description of the available status can be found here: * [Remote control activation state](https://developer.home-connect.com/docs/api/status/remotecontrolactivationstate) * [Remote start allowance state](https://developer.home-connect.com/docs/api/status/remotestartallowancestate) * [Local control state](https://developer.home-connect.com/docs/api/status/localcontrolstate) * [Operation state](https://developer.home-connect.com/docs/status/operation_state) * [Door state](https://developer.home-connect.com/docs/status/door_state) Several more device-specific states can be found [in the documentation](https://developer.home-connect.com/docs/api/status/remotecontrolactivationstate). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_status_with_http_info(haid, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str haid: ID of home appliance (required)
:param str accept_language: Language for localized assets
:return: ArrayOfStatus
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['haid', 'accept_language'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_status" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'haid' is set
if ('haid' not in params or
params['haid'] is None):
raise ValueError("Missing the required parameter `haid` when calling `get_status`") # noqa: E501
collection_formats = {}
path_params = {}
if 'haid' in params:
path_params['haid'] = params['haid'] # noqa: E501
query_params = []
header_params = {}
if 'accept_language' in params:
header_params['Accept-Language'] = params['accept_language'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/vnd.bsh.sdk.v1+json']) # noqa: E501
# Authentication setting
auth_settings = ['homeconnect_auth'] # noqa: E501
return self.api_client.call_api(
'/homeappliances/{haid}/status', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ArrayOfStatus', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_status_value(self, haid, statuskey, **kwargs): # noqa: E501
"""Get current status of home appliance # noqa: E501
A detailed description of the available status can be found here: * [Remote control activation state](https://developer.home-connect.com/docs/api/status/remotecontrolactivationstate) * [Remote start allowance state](https://developer.home-connect.com/docs/api/status/remotestartallowancestate) * [Local control state](https://developer.home-connect.com/docs/api/status/localcontrolstate) * [Operation state](https://developer.home-connect.com/docs/status/operation_state) * [Door state](https://developer.home-connect.com/docs/status/door_state) Several more device-specific states can be found [in the documentation](https://developer.home-connect.com/docs/api/status/remotecontrolactivationstate). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_status_value(haid, statuskey, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str haid: ID of home appliance (required)
:param str statuskey: key of the specific status to get (required)
:param str accept_language: Language for localized assets
:return: Status
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_status_value_with_http_info(haid, statuskey, **kwargs) # noqa: E501
else:
(data) = self.get_status_value_with_http_info(haid, statuskey, **kwargs) # noqa: E501
return data
def get_status_value_with_http_info(self, haid, statuskey, **kwargs): # noqa: E501
"""Get current status of home appliance # noqa: E501
A detailed description of the available status can be found here: * [Remote control activation state](https://developer.home-connect.com/docs/api/status/remotecontrolactivationstate) * [Remote start allowance state](https://developer.home-connect.com/docs/api/status/remotestartallowancestate) * [Local control state](https://developer.home-connect.com/docs/api/status/localcontrolstate) * [Operation state](https://developer.home-connect.com/docs/status/operation_state) * [Door state](https://developer.home-connect.com/docs/status/door_state) Several more device-specific states can be found [in the documentation](https://developer.home-connect.com/docs/api/status/remotecontrolactivationstate). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_status_value_with_http_info(haid, statuskey, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str haid: ID of home appliance (required)
:param str statuskey: key of the specific status to get (required)
:param str accept_language: Language for localized assets
:return: Status
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['haid', 'statuskey', 'accept_language'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_status_value" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'haid' is set
if ('haid' not in params or
params['haid'] is None):
raise ValueError("Missing the required parameter `haid` when calling `get_status_value`") # noqa: E501
# verify the required parameter 'statuskey' is set
if ('statuskey' not in params or
params['statuskey'] is None):
raise ValueError("Missing the required parameter `statuskey` when calling `get_status_value`") # noqa: E501
collection_formats = {}
path_params = {}
if 'haid' in params:
path_params['haid'] = params['haid'] # noqa: E501
if 'statuskey' in params:
path_params['statuskey'] = params['statuskey'] # noqa: E501
query_params = []
header_params = {}
if 'accept_language' in params:
header_params['Accept-Language'] = params['accept_language'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/vnd.bsh.sdk.v1+json']) # noqa: E501
# Authentication setting
auth_settings = ['homeconnect_auth'] # noqa: E501
return self.api_client.call_api(
'/homeappliances/{haid}/status/{statuskey}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Status', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
|
[
"[email protected]"
] | |
2c8b64938a70966035ad6d45f9492406d100d4df
|
f914e863f4eae0c6474f8b8150a40969fc8e1a86
|
/pyblast/blast/blast_parser.py
|
3e1dc1285381ce2dcd7ae4dd27266f19fd316c5e
|
[
"MIT"
] |
permissive
|
jvrana/pyblast
|
0ff430f3f1f51d5b2118e1749f74e1dc8ff3b67f
|
0f7ee7575e97470bfd05a2373d9c68247ec4ead0
|
refs/heads/master
| 2021-06-03T23:04:03.734484 | 2020-09-11T22:46:31 | 2020-09-11T22:46:31 | 102,554,910 | 0 | 0 |
MIT
| 2020-09-11T20:15:01 | 2017-09-06T02:49:51 |
Python
|
UTF-8
|
Python
| false | false | 4,153 |
py
|
"""blast_parser."""
import re
class BlastResultParser:
"""Parses blast results."""
@staticmethod
def str_to_f_to_i(v):
try:
return int(v)
except ValueError:
try:
return float(v)
except ValueError:
pass
return v
@staticmethod
def _extract_metadata(r, delim):
"""Extracts information from the raw text file BLAST produces."""
g = re.search(
"#\\s*(?P<blast_ver>.+)\n"
+ "# Query:\\s*(?P<query>.*)\n"
+ "# Database:\\s*(?P<database>.+)\n"
+ r"(?:# Fields:\s*(?P<fields>.+))?",
r,
)
metadata = g.groupdict()
if metadata["fields"] is None:
return metadata
fields_array = re.split(r"\s*{}\s*".format(delim), metadata["fields"])
metadata["fields"] = fields_array
return metadata
@staticmethod
def _get_alignment_rows(r):
"""Split text into alignment rows."""
return re.findall("\n([^#].*)", r)
@classmethod
def _validate_matches(cls, raw_matches, fields):
"""Create a dictionary from the fields and rows."""
match_dicts = []
for m in raw_matches:
values = [cls.str_to_f_to_i(v) for v in m.split("\t")]
match_dicts.append(dict(list(zip(fields, values))))
return match_dicts
@staticmethod
def __convert_strand_label(strand_lable):
if strand_lable.strip().lower() != "plus":
return -1
return 1
@classmethod
def __clean_json(cls, data_list):
for data in data_list:
query = dict()
subject = dict()
query["start"] = data["q. start"]
query["end"] = data["q. end"]
query["bases"] = data["query seq"]
query["strand"] = cls.__convert_strand_label(
data.get("query strand", "plus")
)
query["length"] = data["query length"]
query["sequence_id"] = data["query acc."]
subject["start"] = data["s. start"]
subject["end"] = data["s. end"]
subject["bases"] = data["subject seq"]
subject["strand"] = cls.__convert_strand_label(data["subject strand"])
subject["length"] = data["subject length"]
subject["sequence_id"] = data["subject acc."]
meta = dict(data)
yield {"query": query, "subject": subject, "meta": meta}
@classmethod
def raw_results_to_json(cls, raw_text, delim=","):
"""Converts raw BLAST text into a flatten dictionary.
:param raw_text: raw text from BLAST results
:type raw_text: basestring
:param delim: delimiter for parsing
:type delim: basestring
:return: flattened dictionary
:rtype: dict
"""
if raw_text.strip() == "":
return []
meta = cls._extract_metadata(raw_text, delim)
fields = meta["fields"]
if fields is None:
return []
alignment_rows = cls._get_alignment_rows(raw_text)
match_dicts = cls._validate_matches(alignment_rows, tuple(fields))
data = list(cls.__clean_json(match_dicts))
return data
@staticmethod
def get_perfect(data):
"""Returns only exact matches.
:return:
:rtype:
"""
def no_gaps(x):
return x["meta"]["gaps"] == 0
def no_gap_opens(x):
return x["meta"]["gap opens"] == 0
def identical(x):
return x["meta"]["identical"] == x["meta"]["alignment length"]
def perfect(x):
return all([no_gaps(x), no_gap_opens(x), identical(x)])
return [r for r in data if perfect(r)]
@staticmethod
def get_with_perfect_subjects(data):
"""Returns only parsed alignments with 100% of the subject aligning to
the query.
:return: perfect alignments
:rtype:
"""
def f(x):
return x["meta"]["alignment_length"] == x["subject"]["length"]
return [r for r in data if f(r)]
|
[
"[email protected]"
] | |
9d18bc90a2fcc735b729a64bea157f50ea910245
|
d8fd66452f17be82b964f9a93577dbaa2fa23451
|
/ProxyPool/crawlers/BaseCrawler.py
|
5c4d2652c82ed3aec63fcf89a522c66eea07f0e0
|
[] |
no_license
|
Dawinia/gp_DA_movie
|
8b7575a54502896f5658538563f3f1f8cfe38772
|
e0253cc8bc16daf1d32b9c861f7fcb03510937f6
|
refs/heads/master
| 2023-05-25T11:49:39.422657 | 2021-12-14T03:26:35 | 2021-12-14T03:26:35 | 233,504,205 | 3 | 0 | null | 2023-05-22T22:44:11 | 2020-01-13T03:33:48 |
Python
|
UTF-8
|
Python
| false | false | 868 |
py
|
# encoding: utf-8
"""
@author: dawinia
@time: 2020/4/21 上午1:13
@file: BaseCrawler.py
@desc:
"""
import requests
from lxml import etree
from ProxyPool.settings import HEADER
from retrying import retry
class BaseCrawler:
urls = []
def __init__(self):
self.headers = HEADER
@retry(stop_max_attempt_number=3, retry_on_result=lambda x: x is None)
def fetch(self, url, **kwargs):
try:
response = requests.get(url, headers=self.headers)
if response.status_code == 200:
return etree.HTML(response.text)
except requests.ConnectionError:
return
def crawl(self):
"""
get proxy from xicidaili
:return:
"""
for url in self.urls:
html = self.fetch(url)
for proxy in self.parse(html):
yield proxy
|
[
"[email protected]"
] | |
79fe76b827309eee2f6df01bef6251ef2dbceb1c
|
2e9e994e17456ed06970dccb55c18dc0cad34756
|
/atcoder/atc/001/C/C.py
|
e26a176e3c2dfcaa0b078813657c68e6a49a2f95
|
[] |
no_license
|
ksomemo/Competitive-programming
|
a74e86b5e790c6e68e9642ea9e5332440cb264fc
|
2a12f7de520d9010aea1cd9d61b56df4a3555435
|
refs/heads/master
| 2020-12-02T06:46:13.666936 | 2019-05-27T04:08:01 | 2019-05-27T04:08:01 | 96,894,691 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 30 |
py
|
../c_fast_fourier_transform.py
|
[
"[email protected]"
] | |
a63cb2d245bffaf953cf535d4278eb62d911c3b9
|
3c7057226c7bb01cd493cde5742b3979cf030f94
|
/tests/unit/cli/commands/test_config.py
|
f0925fbe071a7bfee708495483c65fb2ccab507a
|
[
"Apache-2.0"
] |
permissive
|
sharadc2001/lmctl
|
2d047f776d1bbee811801ccc5454a097b1484841
|
a220a3abeef5fc1f7c0a9410524625c2ff895a0a
|
refs/heads/master
| 2023-05-27T06:14:49.425793 | 2021-04-29T20:08:52 | 2021-04-29T20:08:52 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 5,908 |
py
|
from .command_testing import CommandTestCase
from lmctl.cli.entry import cli
from lmctl.config import ConfigParser, Config
from unittest.mock import patch
import tempfile
import os
import shutil
test_config = '''\
environments:
default:
tnco:
address: http://example
secure: True
client_id: Tester
'''
class TestConfigTarget(CommandTestCase):
def setUp(self):
super().setUp()
self.tmp_dir = tempfile.mkdtemp()
def tearDown(self):
if os.path.exists(self.tmp_dir):
shutil.rmtree(self.tmp_dir)
def test_created_config_is_parsable(self):
target_path = os.path.join(self.tmp_dir, 'config.yaml')
result = self.runner.invoke(cli, ['create', 'config', '--path', target_path])
self.assertTrue(os.path.exists(target_path), msg='Config file not created')
config = ConfigParser().from_file(target_path)
self.assertIsInstance(config, Config)
self.assertIn('default', config.environments)
def test_create_at_path(self):
target_path = os.path.join(self.tmp_dir, 'config.yaml')
result = self.runner.invoke(cli, ['create', 'config', '--path', target_path])
self.assertTrue(os.path.exists(target_path), msg='Config file not created')
def test_create_at_path_overwrite(self):
target_path = os.path.join(self.tmp_dir, 'config.yaml')
with open(target_path, 'w') as f:
f.write('Existing content')
result = self.runner.invoke(cli, ['create', 'config', '--path', target_path, '--overwrite'])
config = ConfigParser().from_file(target_path)
self.assertIsInstance(config, Config)
def test_create_at_path_that_exists_fails(self):
target_path = os.path.join(self.tmp_dir, 'config.yaml')
with open(target_path, 'w') as f:
f.write('Existing content')
result = self.runner.invoke(cli, ['create', 'config', '--path', target_path])
self.assert_has_system_exit(result)
expected_output = f'Error: Cannot create configuration file at path "{target_path}" because there is already a file there and "--overwrite" was not set'
self.assert_output(result, expected_output)
def test_create_also_creates_directory(self):
target_dir = os.path.join(self.tmp_dir, 'somedir')
target_path = os.path.join(target_dir, 'config.yaml')
result = self.runner.invoke(cli, ['create', 'config', '--path', target_path])
self.assertTrue(os.path.exists(target_dir), msg='Config directory not created')
self.assertTrue(os.path.isdir(target_dir), msg='Expected a directory to be created')
self.assertTrue(os.path.exists(target_path), msg='Config file not created')
config = ConfigParser().from_file(target_path)
self.assertIsInstance(config, Config)
def test_create_ok_with_existing_directory(self):
target_dir = os.path.join(self.tmp_dir, 'somedir')
os.makedirs(target_dir)
target_path = os.path.join(target_dir, 'config.yaml')
some_other_file = os.path.join(target_dir, 'someotherfile.yaml')
with open(some_other_file, 'w') as f:
f.write('Original content')
result = self.runner.invoke(cli, ['create', 'config', '--path', target_path])
self.assertTrue(os.path.exists(target_path), msg='Config file not created')
config = ConfigParser().from_file(target_path)
self.assertIsInstance(config, Config)
self.assertTrue(os.path.exists(some_other_file), msg='Existing file should not have been removed')
with open(some_other_file, 'r') as f:
content = f.read()
self.assertEqual(content, 'Original content')
@patch('lmctl.cli.commands.targets.config.ConfigFinder')
def test_create_at_default_directory(self, mock_finder):
default_dir = os.path.join(self.tmp_dir, 'defaultdir')
os.makedirs(default_dir)
default_path = os.path.join(default_dir, 'config.yaml')
mock_finder.return_value.get_default_config_path.return_value = default_path
result = self.runner.invoke(cli, ['create', 'config'])
self.assertTrue(os.path.exists(default_path), msg='Config file not created')
config = ConfigParser().from_file(default_path)
self.assertIsInstance(config, Config)
@patch('lmctl.cli.commands.targets.config.get_config')
def test_get(self, mock_get_config):
config_path = os.path.join(self.tmp_dir, 'config.yaml')
with open(config_path, 'w') as f:
f.write(test_config)
mock_get_config.return_value = (Config(), config_path)
result = self.runner.invoke(cli, ['get', 'config'])
self.assert_no_errors(result)
self.assert_output(result, test_config)
@patch('lmctl.cli.commands.targets.config.get_config')
def test_get_print_path(self, mock_get_config):
config_path = os.path.join(self.tmp_dir, 'config.yaml')
with open(config_path, 'w') as f:
f.write(test_config)
mock_get_config.return_value = (Config(), config_path)
result = self.runner.invoke(cli, ['get', 'config', '--print-path'])
self.assert_no_errors(result)
expected_output = f'Path: {config_path}'
expected_output += '\n---\n'
expected_output += test_config
self.assert_output(result, expected_output)
@patch('lmctl.cli.commands.targets.config.get_config')
def test_get_print_path_only(self, mock_get_config):
config_path = os.path.join(self.tmp_dir, 'config.yaml')
with open(config_path, 'w') as f:
f.write(test_config)
mock_get_config.return_value = (Config(), config_path)
result = self.runner.invoke(cli, ['get', 'config', '--path-only'])
self.assert_no_errors(result)
expected_output = config_path
self.assert_output(result, expected_output)
|
[
"[email protected]"
] | |
45b0809ced71943fe3f93497370ba9b6d5210ffd
|
fd63eec60cb9386cae6e786565c64a590a077dfb
|
/planet_bot/bottieverse/natural_language_processor.py
|
48efd0639ff567a442241c6f7009bafb790e5c1c
|
[] |
no_license
|
opemipoVRB/Planet-Bot
|
a8fd0b848331fdac675ffd38780ad93f9b83a356
|
ac46aaec3b05021d1185ad3248faebaebbffe471
|
refs/heads/master
| 2020-04-01T09:55:39.962697 | 2019-01-15T21:25:09 | 2019-01-15T21:25:09 | 153,095,324 | 1 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 3,665 |
py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$...........................................................................$$
$$..........................$$$$$$$$$$$$$....................................$$
$$.......................$$$$$$$$$$$$$$$$$$$.................................$$
$$.....................$$$$$$$$$$$$$$$$$$$$$$$...............................$$
$$....................$$$$$$$$$$$$$$$$$$$$$$$$$..............................$$
$$...................$$$$$$$$$$$$$$$$$$$$$$.$$...............................$$
$$...................$$$$$$$$$$$$$$$$$$$$$...$$..............................$$
$$...................$$$$$$$$$$$$$$$$$$.$$...$$$.............................$$
$$...................$$$$$$$$$$$$$$$$$$$$$$$$$$..............................$$
$$....................$$$$$$$$$$$$$.....$$$$$$$$$............................$$
$$......................$$$$$$$$$$$$$$$$..$$$$$$$............................$$
$$...................................$$$.....................................$$
$$.................$$................$$$$ $$$$$$$........$...................$$
$$...............$$$$$$..............$$$$$$$$$$$$$...$$$$$$..................$$
$$............$$$$..$$$$$.........................$$$$$$$$$..................$$
$$............$$$$...$$$$$$$....................$$$$$$.$$.$$.................$$
$$...............$$$$$$$$$$$$$$............$$$$$$$$..........................$$
$$.........................$$$$$$$$$...$$$$$$$...............................$$
$$..............................$$$$$$$$$$...................................$$
$$..........................$$$$$....$$$$$$$$$...............................$$
$$............$$.$$$$$$$$$$$$$............$$$$$$$$$$$$$$$$$..................$$
$$............$$.$$..$$$$.....................$$$$$$$$$$$$$$.................$$
$$..............$$$$$$............................$$.$$$$$$$.................$$
$$.................. ......................$$
$$.................. @@@ @@@ @@@@@@@ @@@@@@@ .......................$$
$$.................. @@@ @@@ @@@ @@@@ @@@ @@@@.....................$$
$$.................. @@! @@@ @@! !@@ @@! !@@......................$$
$$.................. !@! @!@ !@! !@! !@! !@!......................$$
$$.................. @!@ !@! !!@!@!!@@! !!@!@!!@@!.....................$$
$$.................. !@! !!! !!! !!! !!! !!!....................$$
$$.................. :!: !!: !!: :!! !!: :::....................$$
$$................... ::!!:! :!: :!: :!: :::....................$$
$$.................... :::: ::: ::: ::: :::....................$$
$$...................... : : : ::::::: ....................$$
$$...........................................................................$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$***************************************************************************$$
$$ natural_language_processor.py Created by Durodola Opemipo 2018 $$
$$ Personal Email : <[email protected]> $$
$$ Telephone Number: +2348182104309 $$
$$***************************************************************************$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
"""
|
[
"[email protected]"
] | |
49928abcbf8e7654bb4b23c2267fac3bd0d1f900
|
221b2221703f9cddeee7054c5dc426b81a3f53bd
|
/venv/lib/python3.9/site-packages/pony/orm/tests/pony_test_config.py
|
e17371c536e0109962126cacbc698ed946a963f4
|
[] |
no_license
|
ch3p4ll3/Royal-Racing-Bot
|
37c998a650078e4b5f5c3b34b8c081d52b018944
|
eab5baf61a9782fbedd42ddf35b7e11cbae9ec22
|
refs/heads/main
| 2023-06-26T03:34:58.104068 | 2021-07-30T17:36:14 | 2021-07-30T17:36:14 | 348,089,837 | 1 | 0 | null | 2021-03-20T11:32:46 | 2021-03-15T18:59:39 |
Python
|
UTF-8
|
Python
| false | false | 277 |
py
|
settings = dict(
provider = 'sqlite', filename = ':memory:'
# provider='postgres', user='pony', password='pony', host='localhost', port='5432', database='pony',
# provider='cockroach', user='root', host='localhost', port=26257, sslmode='disable', database='test'
)
|
[
"[email protected]"
] | |
5cba62895872e9e701325e7cebcfc0a76dd17ea5
|
6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4
|
/gPJTSqmJ4qQPxRg5a_9.py
|
589335772716b843414d88eabf4a6847eb7b156a
|
[] |
no_license
|
daniel-reich/ubiquitous-fiesta
|
26e80f0082f8589e51d359ce7953117a3da7d38c
|
9af2700dbe59284f5697e612491499841a6c126f
|
refs/heads/master
| 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 147 |
py
|
def func(num):
a=(list(str(num)))
b = len(a)
count = 0
for i in a:
count = count + (int(i)-b)
return count
|
[
"[email protected]"
] | |
600e60daec5c92452a456f9c96b11e8c7a7a69b7
|
58f81a20e6a22d17af626d423c6e1a5b160f784c
|
/services/core-api/app/api/now_applications/resources/unit_type_resource.py
|
77fae773c5205096cf655c783f068ce023dbdfa0
|
[
"Apache-2.0"
] |
permissive
|
cryptobuks1/mds
|
5e115c641dfa2d1a91097d49de9eeba1890f2b34
|
6e3f7006aeb5a93f061717e90846b2b0d620d616
|
refs/heads/master
| 2022-04-23T21:11:37.124243 | 2020-04-14T17:55:39 | 2020-04-14T17:55:39 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 611 |
py
|
from flask_restplus import Resource
from app.extensions import api
from app.api.utils.access_decorators import requires_role_view_all
from app.api.utils.resources_mixins import UserMixin
from app.api.now_applications.models.unit_type import UnitType
from app.api.now_applications.response_models import UNIT_TYPES
class UnitTypeResource(Resource, UserMixin):
@api.doc(description='Get a list of units and their codes. (ie degrees, meters etc)', params={})
@requires_role_view_all
@api.marshal_with(UNIT_TYPES, code=200, envelope='records')
def get(self):
return UnitType.get_active()
|
[
"[email protected]"
] | |
62d171c9fc4af70e1cf3e93ca45a9173eed86f05
|
05341db2b66b544f1241eac8d459f90505c20e37
|
/pyqt_distutils/__init__.py
|
c90267b7f0fee8e8fc5519470f35a931c4fb14a0
|
[
"MIT"
] |
permissive
|
xushoucai/pyqt_distutils
|
4c9ee16113fcfa7d8f107933a6f99a4cc1e69554
|
83c95b6b7a37b612509f3caac98c715f10703724
|
refs/heads/master
| 2021-01-12T14:27:46.875463 | 2016-06-20T06:36:18 | 2016-06-20T06:36:18 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 147 |
py
|
"""
A set of PyQt distutils extensions for build qt ui files in a pythonic way:
- build_ui: build qt ui/qrc files
"""
__version__ = '0.7.2'
|
[
"[email protected]"
] | |
f60ead416927933ce228c614991c92f42be50ac9
|
bb2c530d891a95a5e93668ac3aa3bf71472c5909
|
/PracticeWithFunctionsTestCases/test_coin_flip.py
|
d3cbac9ebe999bba7903143430fb6fc641e13217
|
[] |
no_license
|
http403/CS121
|
3e069805e53f2cda19427100225c3c4103f24f48
|
210fbd2d47fcdd63b7cb4c7b9ab1c9ef08c24b7a
|
refs/heads/master
| 2023-03-06T06:41:33.546807 | 2020-03-09T21:09:08 | 2020-03-09T21:09:08 | 235,925,919 | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 443 |
py
|
# YOU CAN IGNORE THIS FILE ENTIRELY
from unittest import TestCase
from unittest.mock import patch
from functions import coin_flip
class TestCoinFlip(TestCase):
@patch('functions.print')
def test_coin_flip(self, mock_print):
coin_flip()
try:
mock_print.assert_called_with('Coin flip result is heads.')
except AssertionError:
mock_print.assert_called_with('Coin flip result is tails.')
|
[
"[email protected]"
] | |
db60f3e520b11c519fdd8ddbcc98fe1cae1eadea
|
e82b761f53d6a3ae023ee65a219eea38e66946a0
|
/All_In_One/addons/learnbgame_cats/tools/armature_manual.py
|
b52d77641383e51c1d5456b942f85c7c4daf329f
|
[] |
no_license
|
2434325680/Learnbgame
|
f3a050c28df588cbb3b14e1067a58221252e2e40
|
7b796d30dfd22b7706a93e4419ed913d18d29a44
|
refs/heads/master
| 2023-08-22T23:59:55.711050 | 2021-10-17T07:26:07 | 2021-10-17T07:26:07 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Python
| false | false | 46,425 |
py
|
# MIT License
# Copyright (c) 2017 GiveMeAllYourCats
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Code author: Hotox
# Repo: https://github.com/michaeldegroot/cats-blender-plugin
# Edits by: GiveMeAllYourCats
import bpy
from . import common as Common
from . import eyetracking as Eyetracking
from .common import version_2_79_or_older
from .register import register_wrap
mmd_tools_installed = False
try:
import mmd_tools_local
mmd_tools_installed = True
except:
pass
@register_wrap
class StartPoseMode(bpy.types.Operator):
bl_idname = 'cats_manual.start_pose_mode'
bl_label = 'Start Pose Mode'
bl_description = 'Starts the pose mode.\n' \
'This lets you test how your model will move'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
if Common.get_armature() is None:
return False
return True
def execute(self, context):
saved_data = Common.SavedData()
current = ""
if bpy.context.active_object and bpy.context.active_object.mode == 'EDIT' and bpy.context.active_object.type == 'ARMATURE' and len(
bpy.context.selected_editable_bones) > 0:
current = bpy.context.selected_editable_bones[0].name
if version_2_79_or_older():
bpy.context.space_data.use_pivot_point_align = False
bpy.context.space_data.show_manipulator = True
else:
pass
# TODO
armature = Common.set_default_stage()
Common.switch('POSE')
armature.data.pose_position = 'POSE'
for mesh in Common.get_meshes_objects():
if Common.has_shapekeys(mesh):
for shape_key in mesh.data.shape_keys.key_blocks:
shape_key.value = 0
for pb in armature.data.bones:
pb.select = True
bpy.ops.pose.rot_clear()
bpy.ops.pose.scale_clear()
bpy.ops.pose.transforms_clear()
bone = armature.data.bones.get(current)
if bone is not None:
for pb in armature.data.bones:
if bone.name != pb.name:
pb.select = False
else:
for index, pb in enumerate(armature.data.bones):
if index != 0:
pb.select = False
if version_2_79_or_older():
bpy.context.space_data.transform_manipulators = {'ROTATE'}
else:
bpy.ops.wm.tool_set_by_id(name="builtin.rotate")
saved_data.load(hide_only=True)
Common.hide(armature, False)
return {'FINISHED'}
@register_wrap
class StopPoseMode(bpy.types.Operator):
bl_idname = 'cats_manual.stop_pose_mode'
bl_label = 'Stop Pose Mode'
bl_description = 'Stops the pose mode and resets the pose to normal'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
if Common.get_armature() is None:
return False
return True
def execute(self, context):
saved_data = Common.SavedData()
armature = Common.get_armature()
Common.set_active(armature)
Common.hide(armature, False)
for pb in armature.data.bones:
pb.hide = False
pb.select = True
bpy.ops.pose.rot_clear()
bpy.ops.pose.scale_clear()
bpy.ops.pose.transforms_clear()
for pb in armature.data.bones:
pb.select = False
armature = Common.set_default_stage()
armature.data.pose_position = 'REST'
for mesh in Common.get_meshes_objects():
if Common.has_shapekeys(mesh):
for shape_key in mesh.data.shape_keys.key_blocks:
shape_key.value = 0
if version_2_79_or_older():
bpy.context.space_data.transform_manipulators = {'TRANSLATE'}
else:
bpy.ops.wm.tool_set_by_id(name="builtin.select_box")
Eyetracking.eye_left = None
saved_data.load(hide_only=True)
return {'FINISHED'}
@register_wrap
class PoseToShape(bpy.types.Operator):
bl_idname = 'cats_manual.pose_to_shape'
bl_label = 'Pose to Shape Key'
bl_description = 'This saves your current pose as a new shape key.' \
'\nThe new shape key will be at the bottom of your shape key list of the mesh'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
armature = Common.get_armature()
return armature and armature.mode == 'POSE'
def execute(self, context):
# pose_to_shapekey('Pose')
bpy.ops.cats_manual.pose_name_popup('INVOKE_DEFAULT')
return {'FINISHED'}
def pose_to_shapekey(name):
saved_data = Common.SavedData()
for mesh in Common.get_meshes_objects():
Common.unselect_all()
Common.set_active(mesh)
Common.switch('EDIT')
bpy.ops.mesh.select_all(action='DESELECT')
bpy.ops.mesh.remove_doubles(threshold=0)
Common.switch('OBJECT')
# Apply armature mod
mod = mesh.modifiers.new(name, 'ARMATURE')
mod.object = Common.get_armature()
bpy.ops.object.modifier_apply(apply_as='SHAPE', modifier=mod.name)
armature = Common.set_default_stage()
Common.switch('POSE')
armature.data.pose_position = 'POSE'
saved_data.load(ignore=armature.name)
return armature
@register_wrap
class PoseNamePopup(bpy.types.Operator):
bl_idname = "cats_manual.pose_name_popup"
bl_label = "Give this shapekey a name:"
bl_description = 'Sets the shapekey name. Press anywhere outside to skip'
bpy.types.Scene.pose_to_shapekey_name = bpy.props.StringProperty(name="Pose Name")
def execute(self, context):
name = context.scene.pose_to_shapekey_name
if not name:
name = 'Pose'
pose_to_shapekey(name)
self.report({'INFO'}, 'Pose successfully saved as shape key.')
return {'FINISHED'}
def invoke(self, context, event):
context.scene.pose_to_shapekey_name = 'Pose'
dpi_value = Common.get_user_preferences().system.dpi
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 4, height=-550)
def check(self, context):
# Important for changing options
return True
def draw(self, context):
layout = self.layout
col = layout.column(align=True)
row = col.row(align=True)
row.scale_y = 1.3
row.prop(context.scene, 'pose_to_shapekey_name')
@register_wrap
class PoseToRest(bpy.types.Operator):
bl_idname = 'cats_manual.pose_to_rest'
bl_label = 'Apply as Rest Pose'
bl_description = 'This applies the current pose position as the new rest position.' \
'\n' \
'\nIf you scale the bones equally on each axis the shape keys will be scaled correctly as well!' \
'\nWARNING: This can have unwanted effects on shape keys, so be careful when modifying the head with this'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
armature = Common.get_armature()
return armature and armature.mode == 'POSE'
def execute(self, context):
saved_data = Common.SavedData()
armature = Common.get_armature()
scales = {}
# Find out how much each bone is scaled
for bone in armature.pose.bones:
scale_x = bone.scale[0]
scale_y = bone.scale[1]
scale_z = bone.scale[2]
if armature.data.bones.get(bone.name).use_inherit_scale:
def check_parent(child, scale_x_tmp, scale_y_tmp, scale_z_tmp):
if child.parent:
parent = child.parent
scale_x_tmp *= parent.scale[0]
scale_y_tmp *= parent.scale[1]
scale_z_tmp *= parent.scale[2]
if armature.data.bones.get(parent.name).use_inherit_scale:
scale_x_tmp, scale_y_tmp, scale_z_tmp = check_parent(parent, scale_x_tmp, scale_y_tmp,
scale_z_tmp)
return scale_x_tmp, scale_y_tmp, scale_z_tmp
scale_x, scale_y, scale_z = check_parent(bone, scale_x, scale_y, scale_z)
if scale_x == scale_y == scale_z != 1:
scales[bone.name] = scale_x
pose_to_shapekey('PoseToRest')
bpy.ops.pose.armature_apply()
for mesh in Common.get_meshes_objects():
Common.unselect_all()
Common.set_active(mesh)
mesh.active_shape_key_index = len(mesh.data.shape_keys.key_blocks) - 1
bpy.ops.cats_shapekey.shape_key_to_basis()
# Remove old basis shape key from shape_key_to_basis operation
for index in range(len(mesh.data.shape_keys.key_blocks) - 1, 0, -1):
mesh.active_shape_key_index = index
if 'PoseToRest - Reverted' in mesh.active_shape_key.name:
bpy.ops.object.shape_key_remove(all=False)
mesh.active_shape_key_index = 0
# Find out which bones scale which shapekeys and set it to the highest scale
print('\nSCALED BONES:')
shapekey_scales = {}
for bone_name, scale in scales.items():
print(bone_name, scale)
vg = mesh.vertex_groups.get(bone_name)
if not vg:
continue
for vertex in mesh.data.vertices:
for g in vertex.groups:
if g.group == vg.index and g.weight == 1:
for i, shapekey in enumerate(mesh.data.shape_keys.key_blocks):
if i == 0:
continue
if shapekey.data[vertex.index].co != mesh.data.shape_keys.key_blocks[0].data[
vertex.index].co:
if shapekey.name in shapekey_scales:
shapekey_scales[shapekey.name] = max(shapekey_scales[shapekey.name], scale)
else:
shapekey_scales[shapekey.name] = scale
break
# Mix every shape keys with itself with the slider set to the new scale
for index in range(0, len(mesh.data.shape_keys.key_blocks)):
mesh.active_shape_key_index = index
shapekey = mesh.active_shape_key
if shapekey.name in shapekey_scales:
print('Fixed shapekey', shapekey.name)
shapekey.slider_max = min(shapekey_scales[shapekey.name], 10)
shapekey.value = shapekey.slider_max
mesh.shape_key_add(name=shapekey.name + '-New', from_mix=True)
shapekey.value = 0
# Remove all the old shapekeys
for index in reversed(range(0, len(mesh.data.shape_keys.key_blocks))):
mesh.active_shape_key_index = index
shapekey = mesh.active_shape_key
if shapekey.name in shapekey_scales:
bpy.ops.object.shape_key_remove(all=False)
# Fix the names of the new shapekeys
for index, shapekey in enumerate(mesh.data.shape_keys.key_blocks):
if shapekey and shapekey.name.endswith('-New'):
shapekey.name = shapekey.name[:-4]
# Repair important shape key order
Common.repair_shapekey_order(mesh.name)
# Stop pose mode after operation
bpy.ops.cats_manual.stop_pose_mode()
saved_data.load(hide_only=True)
self.report({'INFO'}, 'Pose successfully applied as rest pose.')
return {'FINISHED'}
@register_wrap
class JoinMeshes(bpy.types.Operator):
bl_idname = 'cats_manual.join_meshes'
bl_label = 'Join Meshes'
bl_description = 'Joins all meshes of this model together.' \
'\nIt also:' \
'\n - Reorders all shape keys correctly' \
'\n - Applies all transformations' \
'\n - Repairs broken armature modifiers' \
'\n - Applies all decimation and mirror modifiers' \
'\n - Merges UV maps correctly'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
meshes = Common.get_meshes_objects(check=False)
return meshes and len(meshes) > 0
def execute(self, context):
saved_data = Common.SavedData()
mesh = Common.join_meshes()
if not mesh:
saved_data.load()
self.report({'ERROR'}, 'Meshes could not be joined!')
return {'CANCELLED'}
saved_data.load()
Common.unselect_all()
Common.set_active(mesh)
self.report({'INFO'}, 'Meshes joined.')
return {'FINISHED'}
@register_wrap
class JoinMeshesSelected(bpy.types.Operator):
bl_idname = 'cats_manual.join_meshes_selected'
bl_label = 'Join Selected Meshes'
bl_description = 'Joins all selected meshes of this model together.' \
'\nIt also:' \
'\n - Reorders all shape keys correctly' \
'\n - Applies all transformations' \
'\n - Repairs broken armature modifiers' \
'\n - Applies all decimation and mirror modifiers' \
'\n - Merges UV maps correctly'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
meshes = Common.get_meshes_objects(check=False)
return meshes and len(meshes) > 0
def execute(self, context):
saved_data = Common.SavedData()
if not Common.get_meshes_objects(mode=3):
saved_data.load()
self.report({'ERROR'}, 'No meshes selected! Please select the meshes you want to join in the hierarchy!')
return {'FINISHED'}
mesh = Common.join_meshes(mode=1)
if not mesh:
saved_data.load()
self.report({'ERROR'}, 'Selected meshes could not be joined!')
return {'CANCELLED'}
saved_data.load()
Common.unselect_all()
Common.set_active(mesh)
self.report({'INFO'}, 'Selected meshes joined.')
return {'FINISHED'}
@register_wrap
class SeparateByMaterials(bpy.types.Operator):
bl_idname = 'cats_manual.separate_by_materials'
bl_label = 'Separate by Materials'
bl_description = 'Separates selected mesh by materials.\n' \
'\n' \
'Warning: Never decimate something where you might need the shape keys later (face, mouth, eyes..)'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
obj = context.active_object
if obj and obj.type == 'MESH':
return True
meshes = Common.get_meshes_objects(check=False)
return meshes and len(meshes) >= 1
def execute(self, context):
saved_data = Common.SavedData()
obj = context.active_object
if not obj or (obj and obj.type != 'MESH'):
Common.unselect_all()
meshes = Common.get_meshes_objects()
if len(meshes) == 0:
saved_data.load()
self.report({'ERROR'}, 'No meshes found!')
return {'FINISHED'}
if len(meshes) > 1:
saved_data.load()
self.report({'ERROR'}, 'Multiple meshes found!'
'\nPlease select the mesh you want to separate!')
return {'FINISHED'}
obj = meshes[0]
obj_name = obj.name
Common.separate_by_materials(context, obj)
saved_data.load(ignore=[obj_name])
self.report({'INFO'}, 'Successfully separated by materials.')
return {'FINISHED'}
@register_wrap
class SeparateByLooseParts(bpy.types.Operator):
bl_idname = 'cats_manual.separate_by_loose_parts'
bl_label = 'Separate by Loose Parts'
bl_description = 'Separates selected mesh by loose parts.\n' \
'This acts like separating by materials but creates more meshes for more precision'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
obj = context.active_object
if obj and obj.type == 'MESH':
return True
meshes = Common.get_meshes_objects(check=False)
return meshes
def execute(self, context):
saved_data = Common.SavedData()
obj = context.active_object
if not obj or (obj and obj.type != 'MESH'):
Common.unselect_all()
meshes = Common.get_meshes_objects()
if len(meshes) == 0:
saved_data.load()
self.report({'ERROR'}, 'No meshes found!')
return {'FINISHED'}
if len(meshes) > 1:
saved_data.load()
self.report({'ERROR'}, 'Multiple meshes found!'
'\nPlease select the mesh you want to separate!')
return {'FINISHED'}
obj = meshes[0]
obj_name = obj.name
Common.separate_by_loose_parts(context, obj)
saved_data.load(ignore=[obj_name])
self.report({'INFO'}, 'Successfully separated by loose parts.')
return {'FINISHED'}
@register_wrap
class SeparateByShapekeys(bpy.types.Operator):
bl_idname = 'cats_manual.separate_by_shape_keys'
bl_label = 'Separate by Shape Keys'
bl_description = 'Separates selected mesh into two parts,' \
'\ndepending on whether it is effected by a shape key or not.' \
'\n' \
'\nVery useful for manual decimation'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
obj = context.active_object
if obj and obj.type == 'MESH':
return True
meshes = Common.get_meshes_objects(check=False)
return meshes
def execute(self, context):
saved_data = Common.SavedData()
obj = context.active_object
if not obj or (obj and obj.type != 'MESH'):
Common.unselect_all()
meshes = Common.get_meshes_objects()
if len(meshes) == 0:
saved_data.load()
self.report({'ERROR'}, 'No meshes found!')
return {'FINISHED'}
if len(meshes) > 1:
saved_data.load()
self.report({'ERROR'}, 'Multiple meshes found!'
'\nPlease select the mesh you want to separate!')
return {'FINISHED'}
obj = meshes[0]
obj_name = obj.name
Common.separate_by_shape_keys(context, obj)
saved_data.load(ignore=[obj_name])
self.report({'INFO'}, 'Successfully separated by shape keys.')
return {'FINISHED'}
@register_wrap
class MergeWeights(bpy.types.Operator):
bl_idname = 'cats_manual.merge_weights'
bl_label = 'Merge Weights'
bl_description = 'Deletes the selected bones and adds their weight to their respective parents.' \
'\n' \
'\nOnly available in Edit or Pose Mode with bones selected'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
active_obj = bpy.context.active_object
if not active_obj or not bpy.context.active_object.type == 'ARMATURE':
return False
if active_obj.mode == 'EDIT' and bpy.context.selected_editable_bones:
return True
if active_obj.mode == 'POSE' and bpy.context.selected_pose_bones:
return True
return False
def execute(self, context):
saved_data = Common.SavedData()
armature = bpy.context.object
Common.switch('EDIT')
# Find which bones to work on and put their name and their parent in a list
parenting_list = {}
for bone in bpy.context.selected_editable_bones:
parent = bone.parent
while parent and parent.parent and parent in bpy.context.selected_editable_bones:
parent = parent.parent
if not parent:
continue
parenting_list[bone.name] = parent.name
# Merge all the bones in the parenting list
merge_weights(armature, parenting_list)
saved_data.load()
self.report({'INFO'}, 'Deleted ' + str(len(parenting_list)) + ' bones and added their weights to their parents.')
return {'FINISHED'}
@register_wrap
class MergeWeightsToActive(bpy.types.Operator):
bl_idname = 'cats_manual.merge_weights_to_active'
bl_label = 'Merge Weights'
bl_description = 'Deletes the selected bones except the active one and adds their weights to the active bone.' \
'\nThe active bone is the one you selected last.' \
'\n' \
'\nOnly available in Edit or Pose Mode with bones selected'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
active_obj = bpy.context.active_object
if not active_obj or not bpy.context.active_object.type == 'ARMATURE':
return False
if active_obj.mode == 'EDIT' and bpy.context.selected_editable_bones and len(bpy.context.selected_editable_bones) > 1:
if bpy.context.active_bone in bpy.context.selected_editable_bones:
return True
elif active_obj.mode == 'POSE' and bpy.context.selected_pose_bones and len(bpy.context.selected_pose_bones) > 1:
if bpy.context.active_pose_bone in bpy.context.selected_pose_bones:
return True
return False
def execute(self, context):
saved_data = Common.SavedData()
armature = bpy.context.object
Common.switch('EDIT')
# Find which bones to work on and put their name and their parent in a list and parent the bones to the active one
parenting_list = {}
for bone in bpy.context.selected_editable_bones:
if bone.name == bpy.context.active_bone.name:
continue
parenting_list[bone.name] = bpy.context.active_bone.name
bone.parent = bpy.context.active_bone
# Merge all the bones in the parenting list
merge_weights(armature, parenting_list)
# Load original modes
saved_data.load()
self.report({'INFO'}, 'Deleted ' + str(len(parenting_list)) + ' bones and added their weights to the active bone.')
return {'FINISHED'}
def merge_weights(armature, parenting_list):
Common.switch('OBJECT')
# Merge the weights on the meshes
for mesh in Common.get_meshes_objects(armature_name=armature.name):
Common.set_active(mesh)
for bone, parent in parenting_list.items():
if not mesh.vertex_groups.get(bone):
continue
if not mesh.vertex_groups.get(parent):
mesh.vertex_groups.new(name=parent)
Common.mix_weights(mesh, bone, parent)
# Select armature
Common.unselect_all()
Common.set_active(armature)
Common.switch('EDIT')
# Delete merged bones
for bone in parenting_list.keys():
armature.data.edit_bones.remove(armature.data.edit_bones.get(bone))
@register_wrap
class ApplyTransformations(bpy.types.Operator):
bl_idname = 'cats_manual.apply_transformations'
bl_label = 'Apply Transformations'
bl_description = "Applies the position, rotation and scale to the armature and it's meshes"
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
if Common.get_armature():
return True
return False
def execute(self, context):
saved_data = Common.SavedData()
Common.apply_transforms()
saved_data.load()
self.report({'INFO'}, 'Transformations applied.')
return {'FINISHED'}
@register_wrap
class RemoveZeroWeight(bpy.types.Operator):
bl_idname = 'cats_manual.remove_zero_weight'
bl_label = 'Remove Zero Weight Bones'
bl_description = "Cleans up the bones hierarchy, deleting all bones that don't directly affect any vertices\n" \
"Don't use this if you plan to use 'Fix Model'"
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
if Common.get_armature():
return True
return False
def execute(self, context):
saved_data = Common.SavedData()
Common.set_default_stage()
count = Common.delete_zero_weight()
Common.set_default_stage()
saved_data.load()
self.report({'INFO'}, 'Deleted ' + str(count) + ' zero weight bones.')
return {'FINISHED'}
@register_wrap
class RemoveConstraints(bpy.types.Operator):
bl_idname = 'cats_manual.remove_constraints'
bl_label = 'Remove Bone Constraints'
bl_description = "Removes constrains between bones causing specific bone movement as these are not used by VRChat"
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
if Common.get_armature():
return True
return False
def execute(self, context):
saved_data = Common.SavedData()
Common.set_default_stage()
Common.delete_bone_constraints()
Common.set_default_stage()
saved_data.load()
self.report({'INFO'}, 'Removed all bone constraints.')
return {'FINISHED'}
@register_wrap
class RecalculateNormals(bpy.types.Operator):
bl_idname = 'cats_manual.recalculate_normals'
bl_label = 'Recalculate Normals'
bl_description = "Don't use this on good looking meshes as this can screw them up.\n" \
"Makes normals point inside of the selected mesh.\n" \
"Use this if there are random inverted or darker faces on the mesh"
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
obj = context.active_object
if obj and obj.type == 'MESH':
return True
meshes = Common.get_meshes_objects(check=False)
return meshes
def execute(self, context):
saved_data = Common.SavedData()
obj = context.active_object
if not obj or (obj and obj.type != 'MESH'):
Common.unselect_all()
meshes = Common.get_meshes_objects()
if len(meshes) == 0:
saved_data.load()
return {'FINISHED'}
obj = meshes[0]
mesh = obj
Common.unselect_all()
Common.set_active(mesh)
Common.switch('EDIT')
Common.switch('EDIT')
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.normals_make_consistent(inside=False)
Common.set_default_stage()
saved_data.load()
self.report({'INFO'}, 'Recalculated all normals.')
return {'FINISHED'}
@register_wrap
class FlipNormals(bpy.types.Operator):
bl_idname = 'cats_manual.flip_normals'
bl_label = 'Flip Normals'
bl_description = "Flips the direction of the faces' normals of the selected mesh.\n" \
"Use this if all normals are inverted"
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
obj = context.active_object
if obj and obj.type == 'MESH':
return True
meshes = Common.get_meshes_objects(check=False)
return meshes
def execute(self, context):
saved_data = Common.SavedData()
obj = context.active_object
if not obj or (obj and obj.type != 'MESH'):
Common.unselect_all()
meshes = Common.get_meshes_objects()
if len(meshes) == 0:
saved_data.load()
return {'FINISHED'}
obj = meshes[0]
mesh = obj
Common.unselect_all()
Common.set_active(mesh)
Common.switch('EDIT')
Common.switch('EDIT')
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.flip_normals()
Common.set_default_stage()
saved_data.load()
self.report({'INFO'}, 'Flipped all normals.')
return {'FINISHED'}
@register_wrap
class RemoveDoubles(bpy.types.Operator):
bl_idname = 'cats_manual.remove_doubles'
bl_label = 'Remove Doubles'
bl_description = "Merges duplicated faces and vertices of the selected meshes." \
"\nThis is more save than doing it manually:" \
"\n - leaves shape keys completely untouched" \
"\n - but removes less doubles overall"
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
obj = context.active_object
if obj and obj.type == 'MESH':
return True
meshes = Common.get_meshes_objects(check=False)
return meshes
def execute(self, context):
saved_data = Common.SavedData()
removed_tris = 0
meshes = Common.get_meshes_objects(mode=3)
if not meshes:
meshes = [Common.get_meshes_objects()[0]]
Common.set_default_stage()
for mesh in meshes:
removed_tris += Common.remove_doubles(mesh, 0.0001, save_shapes=True)
Common.set_default_stage()
saved_data.load()
self.report({'INFO'}, 'Removed ' + str(removed_tris) + ' vertices.')
return {'FINISHED'}
@register_wrap
class RemoveDoublesNormal(bpy.types.Operator):
bl_idname = 'cats_manual.remove_doubles_normal'
bl_label = 'Remove Doubles Normally'
bl_description = "Merges duplicated faces and vertices of the selected meshes." \
"\nThis is exactly like doing it manually"
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
obj = context.active_object
if obj and obj.type == 'MESH':
return True
meshes = Common.get_meshes_objects(check=False)
return meshes
def execute(self, context):
saved_data = Common.SavedData()
removed_tris = 0
meshes = Common.get_meshes_objects(mode=3)
if not meshes:
meshes = [Common.get_meshes_objects()[0]]
Common.set_default_stage()
for mesh in meshes:
removed_tris += Common.remove_doubles(mesh, 0.0001, save_shapes=True)
Common.set_default_stage()
saved_data.load()
self.report({'INFO'}, 'Removed ' + str(removed_tris) + ' vertices.')
return {'FINISHED'}
@register_wrap
class FixVRMShapesButton(bpy.types.Operator):
bl_idname = 'cats_manual.fix_vrm_shapes'
bl_label = 'Fix Koikatsu Shapekeys'
bl_description = "Fixes the shapekeys of Koikatsu models"
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
return Common.get_meshes_objects(check=False)
def execute(self, context):
saved_data = Common.SavedData()
mesh = Common.get_meshes_objects()[0]
slider_max_eyes = 0.33333
slider_max_mouth = 0.94
if not Common.has_shapekeys(mesh):
self.report({'INFO'}, 'No shapekeys detected!')
saved_data.load()
return {'CANCELLED'}
Common.set_active(mesh)
bpy.ops.object.shape_key_clear()
shapekeys = enumerate(mesh.data.shape_keys.key_blocks)
# Find shapekeys to merge
shapekeys_to_merge_eyes = {}
shapekeys_to_merge_mouth = {}
for index, shapekey in enumerate(mesh.data.shape_keys.key_blocks):
if index == 0:
continue
# Set max slider
if shapekey.name.startswith('eye_'):
shapekey.slider_max = slider_max_eyes
else:
shapekey.slider_max = slider_max_mouth
# Split name
name_split = shapekey.name.split('00')
if len(name_split) < 2:
continue
pre_name = name_split[0]
post_name = name_split[1]
# Put shapekey in corresponding list
if pre_name == "eye_face.f":
shapekeys_to_merge_eyes[post_name] = []
elif pre_name == "kuti_face.f":
shapekeys_to_merge_mouth[post_name] = []
# Add all matching shapekeys to the merge list
for index, shapekey in enumerate(mesh.data.shape_keys.key_blocks):
if index == 0:
continue
name_split = shapekey.name.split('00')
if len(name_split) < 2:
continue
pre_name = name_split[0]
post_name = name_split[1]
if post_name in shapekeys_to_merge_eyes.keys():
if pre_name == 'eye_face.f' or pre_name == 'eye_siroL.sL' or pre_name == 'eye_line_u.elu':
shapekeys_to_merge_eyes[post_name].append(shapekey.name)
elif post_name in shapekeys_to_merge_mouth.keys():
if pre_name == 'kuti_face.f' or pre_name == 'kuti_ha.ha' or pre_name == 'kuti_sita.t':
shapekeys_to_merge_mouth[post_name].append(shapekey.name)
# Merge all the shape keys
shapekeys_used = []
for name, shapekeys_merge in shapekeys_to_merge_eyes.items():
if len(shapekeys_merge) <= 1:
continue
for shapekey_name in shapekeys_merge:
mesh.data.shape_keys.key_blocks[shapekey_name].value = slider_max_eyes
shapekeys_used.append(shapekey_name)
mesh.shape_key_add(name='eyes_' + name[1:], from_mix=True)
mesh.active_shape_key_index = len(mesh.data.shape_keys.key_blocks) - 1
bpy.ops.object.shape_key_move(type='TOP')
bpy.ops.object.shape_key_clear()
for name, shapekeys_merge in shapekeys_to_merge_mouth.items():
if len(shapekeys_merge) <= 1:
continue
for shapekey_name in shapekeys_merge:
mesh.data.shape_keys.key_blocks[shapekey_name].value = slider_max_mouth
shapekeys_used.append(shapekey_name)
mesh.shape_key_add(name='mouth_' + name[1:], from_mix=True)
mesh.active_shape_key_index = len(mesh.data.shape_keys.key_blocks) - 1
bpy.ops.object.shape_key_move(type='TOP')
bpy.ops.object.shape_key_clear()
# Remove all the used shapekeys
for index in reversed(range(0, len(mesh.data.shape_keys.key_blocks))):
mesh.active_shape_key_index = index
shapekey = mesh.active_shape_key
if shapekey.name in shapekeys_used:
bpy.ops.object.shape_key_remove(all=False)
saved_data.load()
self.report({'INFO'}, 'Fixed VRM shapekeys.')
return {'FINISHED'}
@register_wrap
class FixFBTButton(bpy.types.Operator):
bl_idname = 'cats_manual.fix_fbt'
bl_label = 'Fix Full Body Tracking'
bl_description = "Applies a general fix for Full Body Tracking." \
"\n" \
'\nCan potentially reduce the knee bending of this avatar in VRChat.' \
'\nIgnore the "Spine length zero" warning in Unity.' \
'\n' \
'\nRequires bones:' \
'\n - Hips, Spine, Left leg, Right leg'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
return Common.get_armature()
def execute(self, context):
saved_data = Common.SavedData()
armature = Common.set_default_stage()
Common.switch('EDIT')
x_cord, y_cord, z_cord, fbx = Common.get_bone_orientations(armature)
hips = armature.data.edit_bones.get('Hips')
spine = armature.data.edit_bones.get('Spine')
left_leg = armature.data.edit_bones.get('Left leg')
right_leg = armature.data.edit_bones.get('Right leg')
left_leg_new = armature.data.edit_bones.get('Left leg 2')
right_leg_new = armature.data.edit_bones.get('Right leg 2')
left_leg_new_alt = armature.data.edit_bones.get('Left_Leg_2')
right_leg_new_alt = armature.data.edit_bones.get('Right_Leg_2')
if not hips or not spine or not left_leg or not right_leg:
self.report({'ERROR'}, 'Required bones could not be found!'
'\nPlease make sure that your armature contains the following bones:'
'\n - Hips, Spine, Left leg, Right leg'
'\nExact names are required!')
saved_data.load()
return {'CANCELLED'}
# FBT Fix
# Disconnect bones
for child in hips.children:
child.use_connect = False
for child in left_leg.children:
child.use_connect = False
for child in right_leg.children:
child.use_connect = False
# Flip hips
hips.head = spine.head
hips.tail = spine.head
hips.tail[z_cord] = left_leg.head[z_cord]
if hips.tail[z_cord] > hips.head[z_cord]:
hips.tail[z_cord] -= 0.1
# Create new leg bones and put them at the old location
if not left_leg_new:
print("DEBUG 1")
if left_leg_new_alt:
left_leg_new = left_leg_new_alt
left_leg_new.name = 'Left leg 2'
print("DEBUG 1.1")
else:
left_leg_new = armature.data.edit_bones.new('Left leg 2')
print("DEBUG 1.2")
if not right_leg_new:
print("DEBUG 2")
if right_leg_new_alt:
right_leg_new = right_leg_new_alt
right_leg_new.name = 'Right leg 2'
print("DEBUG 2.1")
else:
right_leg_new = armature.data.edit_bones.new('Right leg 2')
print("DEBUG 2.2")
left_leg_new.head = left_leg.head
left_leg_new.tail = left_leg.tail
right_leg_new.head = right_leg.head
right_leg_new.tail = right_leg.tail
# Set new location for old leg bones
left_leg.tail = left_leg.head
left_leg.tail[z_cord] = left_leg.head[z_cord] + 0.1
right_leg.tail = right_leg.head
right_leg.tail[z_cord] = right_leg.head[z_cord] + 0.1
left_leg_new.parent = left_leg
right_leg_new.parent = right_leg
# Fixes bones disappearing, prevents bones from having their tail and head at the exact same position
for bone in armature.data.edit_bones:
if round(bone.head[x_cord], 5) == round(bone.tail[x_cord], 5) \
and round(bone.head[y_cord], 5) == round(bone.tail[y_cord], 5) \
and round(bone.head[z_cord], 5) == round(bone.tail[z_cord], 5):
if bone.name == 'Hips':
bone.tail[z_cord] -= 0.1
else:
bone.tail[z_cord] += 0.1
Common.switch('OBJECT')
context.scene.full_body = True
saved_data.load()
self.report({'INFO'}, 'Successfully applied the Full Body Tracking fix.')
return {'FINISHED'}
@register_wrap
class RemoveFBTButton(bpy.types.Operator):
bl_idname = 'cats_manual.remove_fbt'
bl_label = 'Remove Full Body Tracking'
bl_description = "Removes the fix for Full Body Tracking." \
'\n' \
'\nRequires bones:' \
'\n - Hips, Spine, Left leg, Right leg, Left leg 2, Right leg 2'
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
return Common.get_armature()
def execute(self, context):
saved_data = Common.SavedData()
armature = Common.set_default_stage()
Common.switch('EDIT')
x_cord, y_cord, z_cord, fbx = Common.get_bone_orientations(armature)
hips = armature.data.edit_bones.get('Hips')
spine = armature.data.edit_bones.get('Spine')
left_leg = armature.data.edit_bones.get('Left leg')
right_leg = armature.data.edit_bones.get('Right leg')
left_leg_new = armature.data.edit_bones.get('Left leg 2')
right_leg_new = armature.data.edit_bones.get('Right leg 2')
if not hips or not spine or not left_leg or not right_leg:
saved_data.load()
self.report({'ERROR'}, 'Required bones could not be found!'
'\nPlease make sure that your armature contains the following bones:'
'\n - Hips, Spine, Left leg, Right leg, Left leg 2, Right leg 2'
'\nExact names are required!')
saved_data.load()
return {'CANCELLED'}
if not left_leg_new or not right_leg_new:
saved_data.load()
self.report({'ERROR'}, 'The Full Body Tracking Fix is not applied!')
return {'CANCELLED'}
# Remove FBT Fix
# Corrects hips
if hips.head[z_cord] > hips.tail[z_cord]:
middle_x = (right_leg.head[x_cord] + left_leg.head[x_cord]) / 2
hips.head[x_cord] = middle_x
hips.tail[x_cord] = middle_x
hips.head[y_cord] = right_leg.head[y_cord]
hips.tail[y_cord] = right_leg.head[y_cord]
hips.head[z_cord] = right_leg.head[z_cord]
hips.tail[z_cord] = spine.head[z_cord]
# Put the original legs at their old location
left_leg.head = left_leg_new.head
left_leg.tail = left_leg_new.tail
right_leg.head = right_leg_new.head
right_leg.tail = right_leg_new.tail
# Remove second leg bones
armature.data.edit_bones.remove(left_leg_new)
armature.data.edit_bones.remove(right_leg_new)
# Fixes bones disappearing, prevents bones from having their tail and head at the exact same position
for bone in armature.data.edit_bones:
if round(bone.head[x_cord], 5) == round(bone.tail[x_cord], 5) \
and round(bone.head[y_cord], 5) == round(bone.tail[y_cord], 5) \
and round(bone.head[z_cord], 5) == round(bone.tail[z_cord], 5):
bone.tail[z_cord] += 0.1
Common.switch('OBJECT')
context.scene.full_body = False
saved_data.load()
self.report({'INFO'}, 'Successfully removed the Full Body Tracking fix.')
return {'FINISHED'}
@register_wrap
class DuplicateBonesButton(bpy.types.Operator):
bl_idname = 'cats_manual.duplicate_bones'
bl_label = 'Duplicate Bones'
bl_description = "Duplicates the selected bones including their weight and renames them to _L and _R"
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
@classmethod
def poll(cls, context):
active_obj = bpy.context.active_object
if not active_obj or not bpy.context.active_object.type == 'ARMATURE':
return False
if active_obj.mode == 'EDIT' and bpy.context.selected_editable_bones:
return True
elif active_obj.mode == 'POSE' and bpy.context.selected_pose_bones:
return True
return False
def execute(self, context):
saved_data = Common.SavedData()
armature = bpy.context.object
Common.switch('EDIT')
bone_count = len(bpy.context.selected_editable_bones)
# Create the duplicate bones
duplicate_vertex_groups = {}
for bone in bpy.context.selected_editable_bones:
separator = '_'
if bone.name.endswith('_'):
separator = ''
bone_new = armature.data.edit_bones.new(bone.name + separator + 'copy')
bone_new.parent = bone.parent
bone_new.head = bone.head
bone_new.tail = bone.tail
duplicate_vertex_groups[bone.name] = bone_new.name
# Fix bone parenting
for bone_name in duplicate_vertex_groups.values():
bone = armature.data.edit_bones.get(bone_name)
if bone.parent.name in duplicate_vertex_groups.keys():
bone.parent = armature.data.edit_bones.get(duplicate_vertex_groups[bone.parent.name])
# Create the missing vertex groups and duplicate the weight
Common.switch('OBJECT')
for mesh in Common.get_meshes_objects(armature_name=armature.name):
Common.set_active(mesh)
for bone_from, bone_to in duplicate_vertex_groups.items():
mesh.vertex_groups.new(name=bone_to)
Common.mix_weights(mesh, bone_from, bone_to, delete_old_vg=False)
saved_data.load()
self.report({'INFO'}, 'Successfully duplicated ' + str(bone_count) + ' bones.')
return {'FINISHED'}
|
[
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.