當前位置: 首頁>>代碼示例>>Java>>正文


Java Long.toString方法代碼示例

本文整理匯總了Java中java.lang.Long.toString方法的典型用法代碼示例。如果您正苦於以下問題:Java Long.toString方法的具體用法?Java Long.toString怎麽用?Java Long.toString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.lang.Long的用法示例。


在下文中一共展示了Long.toString方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: updateGM

import java.lang.Long; //導入方法依賴的package包/類
void updateGM( long value, String name )
{
  mApp.mDData.updateGMName( mCIDid, mApp.mCID, name );
  String id = Long.toString(mCIDid);
  // CalibCBlock blk = mApp.mDData.selectGM( mCIDid, mApp.mCID );
  mSaveCBlock.setGroup( value );

  // if ( mApp.mListRefresh ) {
  //   mDataAdapter.notifyDataSetChanged();
  // } else {
    mSaveTextView.setText( id + " <" + name + "> " + mSaveData );
    mSaveTextView.setTextColor( mSaveCBlock.color() );
    // mSaveTextView.invalidate();
    // updateDisplay( ); // FIXME
  // }
}
 
開發者ID:marcocorvi,項目名稱:topodroid,代碼行數:17,代碼來源:GMActivity.java

示例2: createDateInfo

import java.lang.Long; //導入方法依賴的package包/類
private static String createDateInfo(int second) {
    String currentTime = Long.toString(System.currentTimeMillis());
    while (currentTime.length() < 13) {
        currentTime = "0" + currentTime;
    }
    return currentTime + "-" + second + mSeparator;
}
 
開發者ID:YiuChoi,項目名稱:MicroReader,代碼行數:8,代碼來源:CacheUtil.java

示例3: run

import java.lang.Long; //導入方法依賴的package包/類
public void run()
{
	try
	{
		String slaveAddress = socket.getInetAddress().getHostAddress();
		System.out.println("MasterThread: Received connection from a slave: " + slaveAddress);
		BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));

		String inputLine, outputLine;
		
		//read input stream
		inputLine = in.readLine(); //"time=?;<seq. no.>"
		System.out.println("incoming message: '" + inputLine + "' from " + slaveAddress);
		String[] parseIncomingMsg = inputLine.split(";");

		//process input stream and compute time
		String sequenceNumber = parseIncomingMsg[1];
		Long nowLong = new Long(new Date().getTime());
		outputLine = "time=;" + nowLong.toString() + ";" + sequenceNumber;
		System.out.println("Outgoing message: '" + outputLine + "' to " + slaveAddress);

		//send result
		Socket sendSocket = new Socket(slaveAddress, slaveSendPort);
		PrintWriter sendSocketOut = new PrintWriter(sendSocket.getOutputStream(), true);
		sendSocketOut.println(outputLine);
		sendSocketOut.close();
		sendSocket.close();

		in.close();
		socket.close();
	}
	catch (IOException e)
	{
		e.toString();
	}
}
 
開發者ID:dipakboyed,項目名稱:cristians-clock-synch,代碼行數:37,代碼來源:MasterRespondThread.java

示例4: toString

import java.lang.Long; //導入方法依賴的package包/類
/**
 *  toString in the form of numerator/denominator.
 *  @return String
 */ 
public String toString ()
{
    return Long.toString (this.numerator) + "/" +
    Long.toString (this.denominator);
}
 
開發者ID:opf-labs,項目名稱:jhove2,代碼行數:10,代碼來源:Rational.java


注:本文中的java.lang.Long.toString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。