List of usage examples for java.lang Short toString
public static String toString(short s)
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAst.CFAstURLProtocolHPKey.java
public String toString() { String ret = "<CFAstURLProtocolHPKey" + " RequiredURLProtocolId=" + "\"" + Short.toString(getRequiredURLProtocolId()) + "\"" + " RequiredRevision=\"" + Integer.toString(getRequiredRevision()) + "\"" + "/>"; return (ret); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAcc.CFAccAuditActionHPKey.java
public String toString() { String ret = "<CFAccAuditActionHPKey" + " RequiredAuditActionId=" + "\"" + Short.toString(getRequiredAuditActionId()) + "\"" + " RequiredRevision=\"" + Integer.toString(getRequiredRevision()) + "\"" + "/>"; return (ret); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAcc.CFAccISOTimezoneHPKey.java
public String toString() { String ret = "<CFAccISOTimezoneHPKey" + " RequiredISOTimezoneId=" + "\"" + Short.toString(getRequiredISOTimezoneId()) + "\"" + " RequiredRevision=\"" + Integer.toString(getRequiredRevision()) + "\"" + "/>"; return (ret); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAcc.CFAccURLProtocolHPKey.java
public String toString() { String ret = "<CFAccURLProtocolHPKey" + " RequiredURLProtocolId=" + "\"" + Short.toString(getRequiredURLProtocolId()) + "\"" + " RequiredRevision=\"" + Integer.toString(getRequiredRevision()) + "\"" + "/>"; return (ret); }
From source file:com.cloudera.hoop.client.fs.HoopFileSystem.java
/** * Set replication for an existing file. * * @param src file name/*from w w w. j av a2 s. co m*/ * @param replication new replication * @throws IOException * @return true if successful; * false if file does not exist or is a directory */ @Override public boolean setReplication(Path src, short replication) throws IOException { Map<String, String> params = new HashMap<String, String>(); params.put("op", "setreplication"); params.put("replication", Short.toString(replication)); HttpURLConnection conn = getConnection("PUT", params, src); validateResponse(conn, HttpURLConnection.HTTP_OK); JSONObject json = (JSONObject) jsonParse(conn); return (Boolean) json.get("setReplication"); }
From source file:ecg.ecgshow.ECGShowUI.java
private void createBloodOxygenData(long timeZone) { BloodOxygendatas = new short[2]; BloodOxygenData = new JPanel(); BloodOxygenData.setLayout(new FlowLayout()); BloodOxygenData.setBounds(0, 0, (int) (WIDTH * 0.14), (int) (HEIGHT * 0.15)); BloodOxygenData.setBackground(Color.BLACK); JLabel jLabel1 = new JLabel("---"); if (BloodOxygendatas[0] == 0x00 || BloodOxygendatas == null) { jLabel1.setText("---"); } else {/* w w w. j a va 2s . co m*/ jLabel1.setText(Short.toString((short) BloodOxygendatas[0])); } System.out.println("BloodOxygendatas" + Short.toString(BloodOxygendatas[0])); jLabel1.setFont(loadFont("LED.tff", (float) (HEIGHT * 0.070))); jLabel1.setBackground(Color.BLACK); jLabel1.setForeground(Color.GREEN); jLabel1.setBounds(0, 0, 100, 100); jLabel1.setOpaque(true); JLabel jLabelName = new JLabel(" "); jLabelName.setFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.020))); jLabelName.setBackground(Color.BLACK); jLabelName.setForeground(new Color(237, 65, 43)); jLabelName.setBounds(0, 0, 100, 100); jLabelName.setOpaque(true); //?? JLabel jLabelUnit = new JLabel(" %"); jLabelUnit.setFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.020))); jLabelUnit.setBackground(Color.BLACK); jLabelUnit.setForeground(Color.GREEN); jLabelUnit.setBounds(0, 0, 100, 100); jLabelUnit.setOpaque(true); //?? BloodOxygenData.add(jLabelName); BloodOxygenData.add(jLabel1); BloodOxygenData.add(jLabelUnit); ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor(); scheduledExecutorService.scheduleAtFixedRate(new Runnable() { @Override public void run() { if (BloodOxygendatas[0] == 0 || HeartRatedatas[0] == -100) { jLabel1.setText("--"); } else { jLabel1.setText(String.valueOf(BloodOxygendatas[0])); } BloodOxygenData.repaint(); } }, 0, 3, TimeUnit.SECONDS); }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrm.CFCrmISOCountryCurrencyHPKey.java
public String toString() { String ret = "<CFCrmISOCountryCurrencyHPKey" + " RequiredISOCountryId=" + "\"" + Short.toString(getRequiredISOCountryId()) + "\"" + " RequiredISOCurrencyId=" + "\"" + Short.toString(getRequiredISOCurrencyId()) + "\"" + " RequiredRevision=\"" + Integer.toString(getRequiredRevision()) + "\"" + "/>"; return (ret); }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrm.CFCrmISOCountryLanguageHPKey.java
public String toString() { String ret = "<CFCrmISOCountryLanguageHPKey" + " RequiredISOCountryId=" + "\"" + Short.toString(getRequiredISOCountryId()) + "\"" + " RequiredISOLanguageId=" + "\"" + Short.toString(getRequiredISOLanguageId()) + "\"" + " RequiredRevision=\"" + Integer.toString(getRequiredRevision()) + "\"" + "/>"; return (ret); }
From source file:gov.llnl.lc.smt.command.fabric.SmtFabric.java
public static String getStatus(OpenSmMonitorService OMService) { /* TODO create a HASHMAP or some sort of name value pair thing, that can be formatted later */ // return a string representation of the subnet status, similar to the opensm console // or smt-console if (OMService == null) { logger.severe("Can't get status from a null object"); return "Can't get status from a null object"; }//from w w w . java 2 s. c o m OSM_Fabric Fabric = OMService.getFabric(); OSM_SysInfo SysInfo = Fabric.getOsmSysInfo(); OSM_Stats Stats = Fabric.getOsmStats(); OSM_Subnet Subnet = Fabric.getOsmSubnet(); OsmServerStatus RStatus = OMService.getRemoteServerStatus(); boolean stale = (Fabric == null) ? true : Fabric.isStale(); String staleString = stale ? "(stale)" : " "; StringBuffer buff = new StringBuffer(); buff.append(String.format(" Fabric Status\n")); buff.append(String.format("\n")); buff.append(String.format("Fabric Name: %20s\n", Fabric.getFabricName())); if (RStatus != null) buff.append(String.format("Up since: %20s\n", OMService.getRemoteServerStatus().Server.getStartTime().toString())); buff.append(String.format("timestamp: %20s\n", Fabric.getTimeStamp().toString())); buff.append(SmtConstants.NEW_LINE); buff.append(String.format("SM State: %s\n", SysInfo.SM_State)); buff.append(String.format("SM Priority: %s\n", Integer.toString(SysInfo.SM_Priority))); buff.append(String.format("SA State: %s\n", SysInfo.SA_State)); buff.append(String.format("Routing Engine: %s\n", SysInfo.RoutingEngine)); buff.append(String.format("AR Routing: %s\n", "unknown")); buff.append(String.format("Loaded event plugins: %s\n", Arrays.toString(SysInfo.EventPlugins))); buff.append(String.format("\n")); buff.append(String.format("PerfMgr state/sweep state: %s %s\n", SysInfo.PM_State + "/" + SysInfo.PM_SweepState, staleString)); buff.append(String.format("PerfMgr sweep time (seconds): %s\n", Integer.toString(SysInfo.PM_SweepTime))); buff.append(String.format("\n")); buff.append(String.format("--MAD stats -----------------------\n")); buff.append(String.format("QP0 MADs outstanding %s\n", Long.toString(Stats.qp0_mads_outstanding))); buff.append(String.format("QP0 MADs outstanding (on wire) %s\n", Long.toString(Stats.qp0_mads_outstanding_on_wire))); buff.append(String.format("QP0 MADs rcvd %s\n", Long.toString(Stats.qp0_mads_rcvd))); buff.append(String.format("QP0 MADs sent %s\n", Long.toString(Stats.qp0_mads_sent))); buff.append(String.format("QP0 unicasts sent %s\n", Long.toString(Stats.qp0_unicasts_sent))); buff.append(String.format("QP0 unknown MADs rcvd %s\n", Long.toString(Stats.qp0_mads_rcvd_unknown))); buff.append(String.format("SA MADs outstanding %s\n", Long.toString(Stats.sa_mads_outstanding))); buff.append(String.format("SA MADs rcvd %s\n", Long.toString(Stats.sa_mads_rcvd))); buff.append(String.format("SA MADs sent %s\n", Long.toString(Stats.sa_mads_sent))); buff.append(String.format("SA unknown MADs rcvd %s\n", Long.toString(Stats.sa_mads_rcvd_unknown))); buff.append(String.format("SA MADs ignored %s\n", Long.toString(Stats.sa_mads_ignored))); buff.append(String.format("\n")); buff.append(String.format("--Subnet flags --------------------\n")); buff.append(String.format("Sweeping enabled %s\n", Boolean.toString(Subnet.sweeping_enabled))); buff.append(String.format("Sweep interval (seconds) %s\n", Integer.toString(Subnet.Options.sweep_interval))); buff.append(String.format("Ignore existing lfts %s\n", Boolean.toString(Subnet.ignore_existing_lfts))); buff.append(String.format("Subnet Init errors %s\n", Boolean.toString(Subnet.subnet_initialization_error))); buff.append(String.format("In sweep hop 0 %s\n", Boolean.toString(Subnet.in_sweep_hop_0))); buff.append(String.format("First time master sweep %s\n", Boolean.toString(Subnet.first_time_master_sweep))); buff.append(String.format("Coming out of standby %s\n", Boolean.toString(Subnet.coming_out_of_standby))); buff.append(String.format("\n")); buff.append(String.format("--Known SMs -----------------------\n")); buff.append(String.format("Port GUID SM State Priority\n")); buff.append(String.format("----------------------- ----------- -----------\n")); for (SBN_Manager m : Subnet.Managers) { buff.append(String.format("%s %s %s\n", new IB_Guid(m.guid).toColonString(), m.State, Short.toString(m.pri_state))); } return buff.toString(); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAst.CFAstISOCountryCurrencyHPKey.java
public String toString() { String ret = "<CFAstISOCountryCurrencyHPKey" + " RequiredISOCountryId=" + "\"" + Short.toString(getRequiredISOCountryId()) + "\"" + " RequiredISOCurrencyId=" + "\"" + Short.toString(getRequiredISOCurrencyId()) + "\"" + " RequiredRevision=\"" + Integer.toString(getRequiredRevision()) + "\"" + "/>"; return (ret); }