code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public static streamselector get(nitro_service service, String name) throws Exception{
streamselector obj = new streamselector();
obj.set_name(name);
streamselector response = (streamselector) obj.get_resource(service);
return response;
} | java |
public static appfwglobal_appfwpolicy_binding[] get(nitro_service service) throws Exception{
appfwglobal_appfwpolicy_binding obj = new appfwglobal_appfwpolicy_binding();
appfwglobal_appfwpolicy_binding response[] = (appfwglobal_appfwpolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static appfwprofile_fieldconsistency_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_fieldconsistency_binding obj = new appfwprofile_fieldconsistency_binding();
obj.set_name(name);
appfwprofile_fieldconsistency_binding response[] = (appfwprofile_fieldconsistency_binding[]) ... | java |
public static base_response update(nitro_service client, dnsparameter resource) throws Exception {
dnsparameter updateresource = new dnsparameter();
updateresource.retries = resource.retries;
updateresource.minttl = resource.minttl;
updateresource.maxttl = resource.maxttl;
updateresource.cacherecords = resour... | java |
public static base_response unset(nitro_service client, dnsparameter resource, String[] args) throws Exception{
dnsparameter unsetresource = new dnsparameter();
return unsetresource.unset_resource(client,args);
} | java |
public static dnsparameter get(nitro_service service) throws Exception{
dnsparameter obj = new dnsparameter();
dnsparameter[] response = (dnsparameter[])obj.get_resources(service);
return response[0];
} | java |
private static HashSet<String> stringToStringValues(String stringValue)
throws IOException {
// should be improved to support escaped characters
HashSet<String> stringValues = new HashSet<>();
JSONParser jsonParser = new JSONParser(stringValue);
int event = jsonParser.nextEvent();
if (event ==... | java |
public static systemglobal_binding get(nitro_service service) throws Exception{
systemglobal_binding obj = new systemglobal_binding();
systemglobal_binding response = (systemglobal_binding) obj.get_resource(service);
return response;
} | java |
protected IntDependency intern(IntTaggedWord headTW, IntTaggedWord argTW, boolean leftHeaded, short dist) {
Map<IntDependency,IntDependency> map = expandDependencyMap;
IntDependency internTempDependency = new IntDependency(itwInterner.intern(headTW), itwInterner.intern(argTW), leftHeaded, dist);
IntDepen... | java |
public static Analyzer getAnalyzer() {
if (analyzer == null ) initAnalyzer();
if (!analyzer.enableGuessing)
System.err.println("Morphologic analyzer has disabled out-of-vocabulary guessing - this will reduce tagging accuracy");
return analyzer;
} | java |
private static void applyLVmorphoanalysis(CoreLabel wi, Collection<String> answerAttributes) {
Word analysis = analyzer.analyze(wi.word());
applyLVmorphoanalysis(wi, analysis, answerAttributes);
} | java |
public static sslpolicy_sslglobal_binding[] get(nitro_service service, String name) throws Exception{
sslpolicy_sslglobal_binding obj = new sslpolicy_sslglobal_binding();
obj.set_name(name);
sslpolicy_sslglobal_binding response[] = (sslpolicy_sslglobal_binding[]) obj.get_resources(service);
return response;
} | java |
public MtasDataItemNumberComparator<T> recomputeBoundary(int n)
throws IOException {
if (sortDirection.equals(CodecUtil.SORT_DESC)) {
if (value instanceof Integer) {
return new MtasDataItemNumberComparator(
Math.floorDiv((Integer) value, n), sortDirection);
} else if (value ins... | java |
public static authenticationradiuspolicy_binding get(nitro_service service, String name) throws Exception{
authenticationradiuspolicy_binding obj = new authenticationradiuspolicy_binding();
obj.set_name(name);
authenticationradiuspolicy_binding response = (authenticationradiuspolicy_binding) obj.get_resource(serv... | java |
public void decimate(Writer trainW, Writer devW, Writer testW) throws IOException {
PrintWriter trainPW = new PrintWriter(trainW, true);
PrintWriter devPW = new PrintWriter(devW, true);
PrintWriter testPW = new PrintWriter(testW, true);
int i = 0;
for (Tree t : this) {
if (i == 8) {
... | java |
public static crvserver_cspolicy_binding[] get(nitro_service service, String name) throws Exception{
crvserver_cspolicy_binding obj = new crvserver_cspolicy_binding();
obj.set_name(name);
crvserver_cspolicy_binding response[] = (crvserver_cspolicy_binding[]) obj.get_resources(service);
return response;
} | java |
private String printConfigMappingTypes(
Map<QName, MtasParserType<MtasParserMapping<?>>> types) {
StringBuilder text = new StringBuilder();
for (Entry<QName, MtasParserType<MtasParserMapping<?>>> entry : types
.entrySet()) {
text.append("- " + entry.getKey().getLocalPart() + ": "
+... | java |
private Collection<? extends String> recursiveCollect(String refId,
Map<String, SortedSet<String>> relationKeyMap, int maxRecursion) {
Set<String> list = new HashSet<>();
if (maxRecursion > 0 && relationKeyMap.containsKey(refId)) {
SortedSet<String> subList = relationKeyMap.get(refId);
for (St... | java |
private QName getQName(String key) {
QName qname;
if ((qname = qNames.get(key)) == null) {
qname = new QName(namespaceURI, key);
qNames.put(key, qname);
}
return qname;
} | java |
public void collectAttributes(MtasParserObject currentObject,
XMLStreamReader streamReader) {
String attributeNamespaceURI;
currentObject.objectAttributes.clear();
currentObject.objectId = streamReader.getAttributeValue(namespaceURI_id,
"id");
for (int i = 0; i < streamReader.getAttributeC... | java |
private Set<MtasParserObject> processCRMSentence(
MtasTokenIdFactory mtasTokenIdFactory, String name, String text,
Integer currentOffset,
List<MtasCRMParserFunctionOutput> functionOutputList,
MtasCRMAncestors unknownAncestors,
Map<String, List<MtasParserObject>> currentList,
Map<Stri... | java |
private void closePrevious(MtasTokenIdFactory mtasTokenIdFactory,
Set<MtasParserObject> previous, Integer currentOffset,
MtasCRMAncestors unknownAncestors,
Map<String, List<MtasParserObject>> currentList,
Map<String, Map<Integer, Set<String>>> updateList,
Map<String, Set<Integer>> idPositi... | java |
private void processFunctions(String name, String text, String type,
List<MtasCRMParserFunctionOutput> functionOutputList) {
if (functions.containsKey(type) && functions.get(type).containsKey(name)
&& text != null) {
MtasCRMParserFunction function = functions.get(type).get(name);
String[] ... | java |
private String printConfigTypes(
HashMap<?, MtasParserType<MtasParserMapping<?>>> types) {
StringBuilder text = new StringBuilder();
for (Entry<?, MtasParserType<MtasParserMapping<?>>> entry : types
.entrySet()) {
text.append("- " + entry.getKey() + ": " + entry.getValue().items.size()
... | java |
public int getMinStartPosition(int docId, int position) throws IOException {
if (ignoreSpans != null && docId == currentDocId) {
if (position < minimumPosition) {
throw new IOException(
"Unexpected position, should be >= " + minimumPosition + "!");
} else {
computeFullStartPo... | java |
public int getMaxEndPosition(int docId, int position) throws IOException {
if (ignoreSpans != null && docId == currentDocId) {
if (position < minimumPosition) {
throw new IOException(
"Unexpected position, should be >= " + minimumPosition + "!");
}
computeFullEndPositionList(po... | java |
public Set<Integer> getFullEndPositionList(int docId, int position)
throws IOException {
if (ignoreSpans != null && docId == currentDocId) {
if (position < minimumPosition) {
throw new IOException(
"Unexpected startPosition, should be >= " + minimumPosition + "!");
} else {
... | java |
private void computeFullStartPositionMinimum(int position)
throws IOException {
if (ignoreSpans != null && !minFullStartPosition.containsKey(position)) {
HashSet<Integer> list = baseStartPositionList.get(position);
HashSet<Integer> newList = new HashSet<>();
int minimumStartPosition = positi... | java |
private void computeFullEndPositionList(int position) throws IOException {
if (ignoreSpans != null && !fullEndPositionList.containsKey(position)) {
// initial fill
moveTo(position);
HashSet<Integer> list = baseEndPositionList.get(position);
if (list != null && !list.isEmpty()) {
int ... | java |
private void moveTo(int position) {
while (position >= currentPosition) {
try {
currentPosition = ignoreSpans.nextStartPosition();
if (currentPosition != Spans.NO_MORE_POSITIONS
&& currentPosition >= minimumPosition) {
if (!baseEndPositionList.containsKey(currentPosition)... | java |
public void removeBefore(int docId, int position) {
if (ignoreSpans != null && docId == currentDocId) {
baseStartPositionList.entrySet()
.removeIf(entry -> entry.getKey() < position);
baseEndPositionList.entrySet()
.removeIf(entry -> entry.getKey() < position);
fullEndPositionL... | java |
public static vpnvserver_authenticationlocalpolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_authenticationlocalpolicy_binding obj = new vpnvserver_authenticationlocalpolicy_binding();
obj.set_name(name);
vpnvserver_authenticationlocalpolicy_binding response[] = (vpnvserver_au... | java |
public static base_response add(nitro_service client, gslbvserver resource) throws Exception {
gslbvserver addresource = new gslbvserver();
addresource.name = resource.name;
addresource.servicetype = resource.servicetype;
addresource.iptype = resource.iptype;
addresource.dnsrecordtype = resource.dnsrecordtype... | java |
public static base_responses add(nitro_service client, gslbvserver resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
gslbvserver addresources[] = new gslbvserver[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new gslb... | java |
public static base_response update(nitro_service client, gslbvserver resource) throws Exception {
gslbvserver updateresource = new gslbvserver();
updateresource.name = resource.name;
updateresource.iptype = resource.iptype;
updateresource.dnsrecordtype = resource.dnsrecordtype;
updateresource.backupvserver = ... | java |
public static base_responses disable(nitro_service client, String name[]) throws Exception {
base_responses result = null;
if (name != null && name.length > 0) {
gslbvserver disableresources[] = new gslbvserver[name.length];
for (int i=0;i<name.length;i++){
disableresources[i] = new gslbvserver();
dis... | java |
public static gslbvserver[] get(nitro_service service) throws Exception{
gslbvserver obj = new gslbvserver();
gslbvserver[] response = (gslbvserver[])obj.get_resources(service);
return response;
} | java |
public static gslbvserver get(nitro_service service, String name) throws Exception{
gslbvserver obj = new gslbvserver();
obj.set_name(name);
gslbvserver response = (gslbvserver) obj.get_resource(service);
return response;
} | java |
public static base_response add(nitro_service client, transformprofile resource) throws Exception {
transformprofile addresource = new transformprofile();
addresource.name = resource.name;
addresource.type = resource.type;
return addresource.add_resource(client);
} | java |
public static base_response update(nitro_service client, transformprofile resource) throws Exception {
transformprofile updateresource = new transformprofile();
updateresource.name = resource.name;
updateresource.type = resource.type;
updateresource.onlytransformabsurlinbody = resource.onlytransformabsurlinbody... | java |
public static base_responses update(nitro_service client, transformprofile resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
transformprofile updateresources[] = new transformprofile[resources.length];
for (int i=0;i<resources.length;i++){
updat... | java |
public static transformprofile[] get(nitro_service service) throws Exception{
transformprofile obj = new transformprofile();
transformprofile[] response = (transformprofile[])obj.get_resources(service);
return response;
} | java |
public static transformprofile get(nitro_service service, String name) throws Exception{
transformprofile obj = new transformprofile();
obj.set_name(name);
transformprofile response = (transformprofile) obj.get_resource(service);
return response;
} | java |
public static appfwpolicy_appfwpolicylabel_binding[] get(nitro_service service, String name) throws Exception{
appfwpolicy_appfwpolicylabel_binding obj = new appfwpolicy_appfwpolicylabel_binding();
obj.set_name(name);
appfwpolicy_appfwpolicylabel_binding response[] = (appfwpolicy_appfwpolicylabel_binding[]) obj.g... | java |
public static nsversion get(nitro_service service) throws Exception{
nsversion obj = new nsversion();
nsversion[] response = (nsversion[])obj.get_resources(service);
return response[0];
} | java |
public static sc_stats get(nitro_service service) throws Exception{
sc_stats obj = new sc_stats();
sc_stats[] response = (sc_stats[])obj.stat_resources(service);
return response[0];
} | java |
public static base_response create(nitro_service client, sslwrapkey resource) throws Exception {
sslwrapkey createresource = new sslwrapkey();
createresource.wrapkeyname = resource.wrapkeyname;
createresource.password = resource.password;
createresource.salt = resource.salt;
return createresource.perform_oper... | java |
public static base_responses create(nitro_service client, sslwrapkey resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
sslwrapkey createresources[] = new sslwrapkey[resources.length];
for (int i=0;i<resources.length;i++){
createresources[i] = ne... | java |
public static base_response delete(nitro_service client, String wrapkeyname) throws Exception {
sslwrapkey deleteresource = new sslwrapkey();
deleteresource.wrapkeyname = wrapkeyname;
return deleteresource.delete_resource(client);
} | java |
public static base_responses delete(nitro_service client, String wrapkeyname[]) throws Exception {
base_responses result = null;
if (wrapkeyname != null && wrapkeyname.length > 0) {
sslwrapkey deleteresources[] = new sslwrapkey[wrapkeyname.length];
for (int i=0;i<wrapkeyname.length;i++){
deleteresources[i... | java |
public static sslwrapkey[] get(nitro_service service) throws Exception{
sslwrapkey obj = new sslwrapkey();
sslwrapkey[] response = (sslwrapkey[])obj.get_resources(service);
return response;
} | java |
public static int min(int a, int b, int c) {
int mi;
mi = a;
if (b < mi) {
mi = b;
}
if (c < mi) {
mi = c;
}
return mi;
} | java |
public static double exactBinomial(int k, int n, double p) {
double total = 0.0;
for (int m = k; m <= n; m++) {
double nChooseM = 1.0;
for (int r = 1; r <= m; r++) {
nChooseM *= (n - r) + 1;
nChooseM /= r;
}
// System.out.println(n + " choose " + m + " is " + nCho... | java |
public static double factorial(int x) {
double result = 1.0;
for (int i=x; i>1; i--) {
result *= i;
}
return result;
} | java |
public static base_response add(nitro_service client, dnsaction64 resource) throws Exception {
dnsaction64 addresource = new dnsaction64();
addresource.actionname = resource.actionname;
addresource.prefix = resource.prefix;
addresource.mappedrule = resource.mappedrule;
addresource.excluderule = resource.exclu... | java |
public static base_responses add(nitro_service client, dnsaction64 resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dnsaction64 addresources[] = new dnsaction64[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new dnsa... | java |
public static base_response delete(nitro_service client, String actionname) throws Exception {
dnsaction64 deleteresource = new dnsaction64();
deleteresource.actionname = actionname;
return deleteresource.delete_resource(client);
} | java |
public static base_response update(nitro_service client, dnsaction64 resource) throws Exception {
dnsaction64 updateresource = new dnsaction64();
updateresource.actionname = resource.actionname;
updateresource.prefix = resource.prefix;
updateresource.mappedrule = resource.mappedrule;
updateresource.excluderul... | java |
public static base_responses update(nitro_service client, dnsaction64 resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dnsaction64 updateresources[] = new dnsaction64[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] =... | java |
public static base_responses unset(nitro_service client, dnsaction64 resources[], String[] args) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dnsaction64 unsetresources[] = new dnsaction64[resources.length];
for (int i=0;i<resources.length;i++){
unsetr... | java |
public static dnsaction64[] get(nitro_service service) throws Exception{
dnsaction64 obj = new dnsaction64();
dnsaction64[] response = (dnsaction64[])obj.get_resources(service);
return response;
} | java |
public static dnsaction64 get(nitro_service service, String actionname) throws Exception{
dnsaction64 obj = new dnsaction64();
obj.set_actionname(actionname);
dnsaction64 response = (dnsaction64) obj.get_resource(service);
return response;
} | java |
public static dnsaction64[] get(nitro_service service, String actionname[]) throws Exception{
if (actionname !=null && actionname.length>0) {
dnsaction64 response[] = new dnsaction64[actionname.length];
dnsaction64 obj[] = new dnsaction64[actionname.length];
for (int i=0;i<actionname.length;i++) {
obj[i]... | java |
public static vpnsessionpolicy_aaagroup_binding[] get(nitro_service service, String name) throws Exception{
vpnsessionpolicy_aaagroup_binding obj = new vpnsessionpolicy_aaagroup_binding();
obj.set_name(name);
vpnsessionpolicy_aaagroup_binding response[] = (vpnsessionpolicy_aaagroup_binding[]) obj.get_resources(se... | java |
public TreeReaderFactory treeReaderFactory() {
return new TreeReaderFactory() {
public TreeReader newTreeReader(Reader in) {
return new PennTreeReader(in, new LabeledScoredTreeFactory(), new NPTmpRetainingTreeNormalizer(englishTrain.splitTMP, englishTrain.splitSGapped == 5, englishTrain.leaveItAll,... | java |
private static String deduceTag(String w) {
String word = w.toLowerCase();
if (word.endsWith("ing")) {
return "VBG";
} else if (word.endsWith("d") || word.endsWith("t")) {
return "VBN";
} else if (word.endsWith("s")) {
return "VBZ";
} else if (word.equals("to")) {
re... | java |
private boolean collectAndCheckLastSpans(int nextSpans1StartPosition,
int nextSpans1EndPosition) throws IOException {
// check next
if (nextSpans1StartPosition == nextSpans2StartPosition
&& nextSpans1EndPosition == nextSpans2EndPosition) {
return false;
}
// check last
if (nextSp... | java |
public static base_response add(nitro_service client, vpnnexthopserver resource) throws Exception {
vpnnexthopserver addresource = new vpnnexthopserver();
addresource.name = resource.name;
addresource.nexthopip = resource.nexthopip;
addresource.nexthopport = resource.nexthopport;
addresource.secure = resource... | java |
public static base_responses add(nitro_service client, vpnnexthopserver resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
vpnnexthopserver addresources[] = new vpnnexthopserver[resources.length];
for (int i=0;i<resources.length;i++){
addresource... | java |
public static vpnnexthopserver[] get(nitro_service service) throws Exception{
vpnnexthopserver obj = new vpnnexthopserver();
vpnnexthopserver[] response = (vpnnexthopserver[])obj.get_resources(service);
return response;
} | java |
public static vpnnexthopserver get(nitro_service service, String name) throws Exception{
vpnnexthopserver obj = new vpnnexthopserver();
obj.set_name(name);
vpnnexthopserver response = (vpnnexthopserver) obj.get_resource(service);
return response;
} | java |
public static lbvserver_csvserver_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_csvserver_binding obj = new lbvserver_csvserver_binding();
obj.set_name(name);
lbvserver_csvserver_binding response[] = (lbvserver_csvserver_binding[]) obj.get_resources(service);
return response;
} | java |
public static nstrafficdomain_vlan_binding[] get(nitro_service service, Long td) throws Exception{
nstrafficdomain_vlan_binding obj = new nstrafficdomain_vlan_binding();
obj.set_td(td);
nstrafficdomain_vlan_binding response[] = (nstrafficdomain_vlan_binding[]) obj.get_resources(service);
return response;
} | java |
private Entry<E> getEntry(int index) {
Entry<E> entry = indexToEntry.get(index);
return entry;
} | java |
public boolean add(E key, double priority) {
// System.err.println("Adding " + key + " with priority " + priority);
if (add(key)) {
relaxPriority(key, priority);
return true;
}
return false;
} | java |
public boolean relaxPriority(E key, double priority) {
Entry<E> entry = getEntry(key);
if (entry == null) {
entry = makeEntry(key);
}
if (compare(priority, entry.priority) <= 0) {
return false;
}
entry.priority = priority;
heapifyUp(entry);
return true;
} | java |
public boolean decreasePriority(E key, double priority) {
Entry<E> entry = getEntry(key);
if (entry == null) {
entry = makeEntry(key);
}
if (compare(priority, entry.priority) >= 0) {
return false;
}
entry.priority = priority;
heapifyDown(entry);
return true;
} | java |
public boolean changePriority(E key, double priority) {
Entry<E> entry = getEntry(key);
if (entry == null) {
entry = makeEntry(key);
}
if (compare(priority, entry.priority) == 0) {
return false;
}
entry.priority = priority;
heapify(entry);
return true;
} | java |
public static base_response add(nitro_service client, location resource) throws Exception {
location addresource = new location();
addresource.ipfrom = resource.ipfrom;
addresource.ipto = resource.ipto;
addresource.preferredlocation = resource.preferredlocation;
addresource.longitude = resource.longitude;
a... | java |
public static base_responses add(nitro_service client, location resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
location addresources[] = new location[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new location();
... | java |
public static base_response delete(nitro_service client, String ipfrom) throws Exception {
location deleteresource = new location();
deleteresource.ipfrom = ipfrom;
return deleteresource.delete_resource(client);
} | java |
public static base_response delete(nitro_service client, location resource) throws Exception {
location deleteresource = new location();
deleteresource.ipfrom = resource.ipfrom;
deleteresource.ipto = resource.ipto;
return deleteresource.delete_resource(client);
} | java |
public static base_responses delete(nitro_service client, String ipfrom[]) throws Exception {
base_responses result = null;
if (ipfrom != null && ipfrom.length > 0) {
location deleteresources[] = new location[ipfrom.length];
for (int i=0;i<ipfrom.length;i++){
deleteresources[i] = new location();
delet... | java |
public static base_responses delete(nitro_service client, location resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
location deleteresources[] = new location[resources.length];
for (int i=0;i<resources.length;i++){
deleteresources[i] = new loca... | java |
public static location[] get(nitro_service service) throws Exception{
location obj = new location();
location[] response = (location[])obj.get_resources(service);
return response;
} | java |
public static location get(nitro_service service, String ipfrom) throws Exception{
location obj = new location();
obj.set_ipfrom(ipfrom);
location response = (location) obj.get_resource(service);
return response;
} | java |
public static location[] get(nitro_service service, String ipfrom[]) throws Exception{
if (ipfrom !=null && ipfrom.length>0) {
location response[] = new location[ipfrom.length];
location obj[] = new location[ipfrom.length];
for (int i=0;i<ipfrom.length;i++) {
obj[i] = new location();
obj[i].set_ipfro... | java |
public static location[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
location obj = new location();
options option = new options();
option.set_filter(filter);
location[] response = (location[]) obj.getfiltered(service, option);
return response;
} | java |
@SuppressWarnings("unchecked")
private void mergeNamedList(ShardRequest sreq, NamedList<Object> mtasResponse, String key,
Integer preferredPurpose) {
// create new response for key
NamedList<Object> mtasListResponse;
Object o = mtasResponse.get(key);
if (o instanceof NamedList) {
mtasListResponse = (Name... | java |
@SuppressWarnings("unchecked")
private void mergeArrayList(ShardRequest sreq, NamedList<Object> mtasResponse, String key, Integer preferredPurpose,
boolean mergeAllShardResponses) {
// create new response for key
ArrayList<Object> mtasListResponse;
Object o = mtasResponse.get(key);
if (o instanceof ArrayLis... | java |
private void mergeResponsesSortedSet(SortedSet<Object> originalList, SortedSet<Object> shardList) {
for (Object item : shardList) {
originalList.add(item);
}
} | java |
@SuppressWarnings("unchecked")
private void mergeResponsesArrayList(ArrayList<Object> originalList, ArrayList<Object> shardList)
throws IOException {
// get keys from original
HashMap<String, Object> originalKeyList = new HashMap<>();
for (Object item : originalList) {
if (item instanceof NamedList<?>) {
... | java |
@SuppressWarnings({ "rawtypes", "unchecked" })
private void mergeResponsesNamedList(NamedList<Object> mainResponse, NamedList<Object> shardResponse)
throws IOException {
Iterator<Entry<String, Object>> it = shardResponse.iterator();
while (it.hasNext()) {
Entry<String, Object> entry = it.next();
String na... | java |
@SuppressWarnings({ "rawtypes", "unchecked" })
private Object adjustablePartsCloned(Object original) {
if (original instanceof NamedList) {
NamedList<Object> newObject = new SimpleOrderedMap();
NamedList<Object> originalObject = (NamedList<Object>) original;
for (int i = 0; i < originalObject.size(); i++) {... | java |
public static sslcertkey_service_binding[] get(nitro_service service, String certkey) throws Exception{
sslcertkey_service_binding obj = new sslcertkey_service_binding();
obj.set_certkey(certkey);
sslcertkey_service_binding response[] = (sslcertkey_service_binding[]) obj.get_resources(service);
return response;... | java |
public static csvserver_responderpolicy_binding[] get(nitro_service service, String name) throws Exception{
csvserver_responderpolicy_binding obj = new csvserver_responderpolicy_binding();
obj.set_name(name);
csvserver_responderpolicy_binding response[] = (csvserver_responderpolicy_binding[]) obj.get_resources(se... | java |
@SuppressWarnings("unchecked")
public <GR extends GrammaticalRelationAnnotation> boolean addArc(Class<GR> arcLabel, TreeGraphNode node) {
if (node == null) {
return false;
}
if (!treeGraph().equals(node.treeGraph())) {
System.err.println("Warning: you are trying to add an arc from node "... | java |
public Set<Dependency<Label, Label, Object>> dependencies(Filter<Dependency<Label, Label, Object>> f, HeadFinder hf) {
Set<Dependency<Label, Label, Object>> deps = Generics.newHashSet();
for (Tree t : this) {
TreeGraphNode node = safeCast(t);
if (node == null || node.isLeaf() || node.children(... | java |
public static systemglobal_auditsyslogpolicy_binding[] get(nitro_service service) throws Exception{
systemglobal_auditsyslogpolicy_binding obj = new systemglobal_auditsyslogpolicy_binding();
systemglobal_auditsyslogpolicy_binding response[] = (systemglobal_auditsyslogpolicy_binding[]) obj.get_resources(service);
... | java |
public static base_response add(nitro_service client, streamidentifier resource) throws Exception {
streamidentifier addresource = new streamidentifier();
addresource.name = resource.name;
addresource.selectorname = resource.selectorname;
addresource.interval = resource.interval;
addresource.samplecount = res... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.