当前位置: 首页>>代码示例>>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;未经允许,请勿转载。