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


Java UUID.getLeastSignificantBits方法代碼示例

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


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

示例1: convert

import java.util.UUID; //導入方法依賴的package包/類
public static byte[] convert(UUID uuid) {

        long msb = uuid.getMostSignificantBits();
        long lsb = uuid.getLeastSignificantBits();
        byte[] buffer = new byte[16];

        for (int i = 0; i < 8; i++) {
            buffer[i] = (byte) (msb >>> 8 * (7 - i));
        }
        for (int i = 8; i < 16; i++) {
            buffer[i] = (byte) (lsb >>> 8 * (7 - i));
        }

        return buffer;

    }
 
開發者ID:begeekmyfriend,項目名稱:mp4parser_android,代碼行數:17,代碼來源:UUIDConverter.java

示例2: EntityLiving

import java.util.UUID; //導入方法依賴的package包/類
public EntityLiving(World worldIn)
{
    super(worldIn);
    this.tasks = new EntityAITasks(worldIn != null && worldIn.theProfiler != null ? worldIn.theProfiler : null);
    this.targetTasks = new EntityAITasks(worldIn != null && worldIn.theProfiler != null ? worldIn.theProfiler : null);
    this.lookHelper = new EntityLookHelper(this);
    this.moveHelper = new EntityMoveHelper(this);
    this.jumpHelper = new EntityJumpHelper(this);
    this.bodyHelper = new EntityBodyHelper(this);
    this.navigator = this.getNewNavigator(worldIn);
    this.senses = new EntitySenses(this);

    for (int i = 0; i < this.equipmentDropChances.length; ++i)
    {
        this.equipmentDropChances[i] = 0.085F;
    }

    UUID uuid = this.getUniqueID();
    long j = uuid.getLeastSignificantBits();
    this.randomMobsId = (int)(j & 2147483647L);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:22,代碼來源:EntityLiving.java

示例3: isKeyEqual

import java.util.UUID; //導入方法依賴的package包/類
@Override
public boolean isKeyEqual(Object k) {
  if (k instanceof UUID) {
    UUID uuid = (UUID) k;
    return uuid.getLeastSignificantBits() == this.keyLeastSigBits
        && uuid.getMostSignificantBits() == this.keyMostSigBits;
  }
  return false;
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:10,代碼來源:VersionedStatsRegionEntryHeapUUIDKey.java

示例4: toInternalID

import java.util.UUID; //導入方法依賴的package包/類
/**
 * Maps a global UUID to a numeric internal ID.
 *
 * @param id Global ID, must not be null.
 * @return Mapped internal ID
 */
public static long toInternalID(UUID id) {
  if (id == null) throw new IllegalArgumentException("id must not be null.");
  if (id.getMostSignificantBits() != 0) throw new IllegalArgumentException("most significant bits must not be set.");
  if (id.getLeastSignificantBits() < 0) throw new IllegalArgumentException("least significant bits must not be negative.");
  return id.getLeastSignificantBits();
}
 
開發者ID:mnemonic-no,項目名稱:act-platform,代碼行數:13,代碼來源:IdMapper.java

示例5: VMThinDiskLRURegionEntryOffHeapUUIDKey

import java.util.UUID; //導入方法依賴的package包/類
public VMThinDiskLRURegionEntryOffHeapUUIDKey(RegionEntryContext context, UUID key,
    @Retained Object value) {
  super(context, (value instanceof RecoveredEntry ? null : value));
  // DO NOT modify this class. It was generated from LeafRegionEntry.cpp
  initialize(context, value);
  this.keyMostSigBits = key.getMostSignificantBits();
  this.keyLeastSigBits = key.getLeastSignificantBits();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:9,代碼來源:VMThinDiskLRURegionEntryOffHeapUUIDKey.java

示例6: VersionedStatsRegionEntryOffHeapUUIDKey

import java.util.UUID; //導入方法依賴的package包/類
public VersionedStatsRegionEntryOffHeapUUIDKey(RegionEntryContext context, UUID key,
    @Retained Object value) {
  super(context, value);
  // DO NOT modify this class. It was generated from LeafRegionEntry.cpp
  this.keyMostSigBits = key.getMostSignificantBits();
  this.keyLeastSigBits = key.getLeastSignificantBits();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:8,代碼來源:VersionedStatsRegionEntryOffHeapUUIDKey.java

示例7: VersionedStatsDiskRegionEntryHeapUUIDKey

import java.util.UUID; //導入方法依賴的package包/類
public VersionedStatsDiskRegionEntryHeapUUIDKey(RegionEntryContext context, UUID key,
    Object value) {
  super(context, (value instanceof RecoveredEntry ? null : value));
  // DO NOT modify this class. It was generated from LeafRegionEntry.cpp
  initialize(context, value);
  this.keyMostSigBits = key.getMostSignificantBits();
  this.keyLeastSigBits = key.getLeastSignificantBits();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:9,代碼來源:VersionedStatsDiskRegionEntryHeapUUIDKey.java

示例8: VersionedStatsDiskLRURegionEntryHeapUUIDKey

import java.util.UUID; //導入方法依賴的package包/類
public VersionedStatsDiskLRURegionEntryHeapUUIDKey(RegionEntryContext context, UUID key,
    Object value) {
  super(context, (value instanceof RecoveredEntry ? null : value));
  // DO NOT modify this class. It was generated from LeafRegionEntry.cpp
  initialize(context, value);
  this.keyMostSigBits = key.getMostSignificantBits();
  this.keyLeastSigBits = key.getLeastSignificantBits();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:9,代碼來源:VersionedStatsDiskLRURegionEntryHeapUUIDKey.java

示例9: VMThinDiskRegionEntryHeapUUIDKey

import java.util.UUID; //導入方法依賴的package包/類
public VMThinDiskRegionEntryHeapUUIDKey(RegionEntryContext context, UUID key, Object value) {
  super(context, (value instanceof RecoveredEntry ? null : value));
  // DO NOT modify this class. It was generated from LeafRegionEntry.cpp
  initialize(context, value);
  this.keyMostSigBits = key.getMostSignificantBits();
  this.keyLeastSigBits = key.getLeastSignificantBits();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:8,代碼來源:VMThinDiskRegionEntryHeapUUIDKey.java

示例10: VMThinDiskRegionEntryOffHeapUUIDKey

import java.util.UUID; //導入方法依賴的package包/類
public VMThinDiskRegionEntryOffHeapUUIDKey(RegionEntryContext context, UUID key,
    @Retained Object value) {
  super(context, (value instanceof RecoveredEntry ? null : value));
  // DO NOT modify this class. It was generated from LeafRegionEntry.cpp
  initialize(context, value);
  this.keyMostSigBits = key.getMostSignificantBits();
  this.keyLeastSigBits = key.getLeastSignificantBits();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:9,代碼來源:VMThinDiskRegionEntryOffHeapUUIDKey.java

示例11: VMThinLRURegionEntryHeapUUIDKey

import java.util.UUID; //導入方法依賴的package包/類
public VMThinLRURegionEntryHeapUUIDKey(RegionEntryContext context, UUID key, Object value) {
  super(context, value);
  // DO NOT modify this class. It was generated from LeafRegionEntry.cpp
  this.keyMostSigBits = key.getMostSignificantBits();
  this.keyLeastSigBits = key.getLeastSignificantBits();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:7,代碼來源:VMThinLRURegionEntryHeapUUIDKey.java

示例12: VMStatsLRURegionEntryHeapUUIDKey

import java.util.UUID; //導入方法依賴的package包/類
public VMStatsLRURegionEntryHeapUUIDKey(RegionEntryContext context, UUID key, Object value) {
  super(context, value);
  // DO NOT modify this class. It was generated from LeafRegionEntry.cpp
  this.keyMostSigBits = key.getMostSignificantBits();
  this.keyLeastSigBits = key.getLeastSignificantBits();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:7,代碼來源:VMStatsLRURegionEntryHeapUUIDKey.java

示例13: VersionedStatsRegionEntryHeapUUIDKey

import java.util.UUID; //導入方法依賴的package包/類
public VersionedStatsRegionEntryHeapUUIDKey(RegionEntryContext context, UUID key, Object value) {
  super(context, value);
  // DO NOT modify this class. It was generated from LeafRegionEntry.cpp
  this.keyMostSigBits = key.getMostSignificantBits();
  this.keyLeastSigBits = key.getLeastSignificantBits();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:7,代碼來源:VersionedStatsRegionEntryHeapUUIDKey.java


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