public class LongObjectId extends AnyLongObjectId implements Serializable
ObjectId
Modifier | Constructor and Description |
---|---|
protected |
LongObjectId(AnyLongObjectId src)
Initialize this instance by copying another existing LongObjectId.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(byte[] firstBuffer,
int fi,
byte[] secondBuffer,
int si)
Compare two object identifier byte sequences for equality.
|
static LongObjectId |
fromRaw(byte[] bs)
Convert a LongObjectId from raw binary representation.
|
static LongObjectId |
fromRaw(byte[] bs,
int p)
Convert a LongObjectId from raw binary representation.
|
static LongObjectId |
fromRaw(long[] is)
Convert a LongObjectId from raw binary representation.
|
static LongObjectId |
fromRaw(long[] is,
int p)
Convert a LongObjectId from raw binary representation.
|
static LongObjectId |
fromString(byte[] buf,
int offset)
Convert a LongObjectId from hex characters (US-ASCII).
|
static LongObjectId |
fromString(String str)
Convert a LongObjectId from hex characters.
|
static boolean |
isId(String id)
Test a string of characters to verify that it can be interpreted as
LongObjectId.
|
LongObjectId |
toObjectId()
Obtain an immutable copy of this current object.
|
static String |
toString(LongObjectId i)
Convert a LongObjectId into a hex string representation.
|
static LongObjectId |
zeroId()
Get the special all-zero LongObjectId.
|
abbreviate, compareTo, compareTo, compareTo, copy, copyRawTo, copyRawTo, copyRawTo, copyRawTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, equals, equals, equals, getByte, getFirstByte, getName, getSecondByte, hashCode, name, startsWith, toString
protected LongObjectId(AnyLongObjectId src)
This constructor is mostly useful for subclasses which want to extend a LongObjectId with more properties, but initialize from an existing LongObjectId instance acquired by other means.
src
- another already parsed LongObjectId to copy the value out of.public static final LongObjectId zeroId()
public static final boolean isId(String id)
If true the string can be parsed with fromString(String)
.
id
- the string to test.public static final String toString(LongObjectId i)
i
- the id to convert. May be null.public static boolean equals(byte[] firstBuffer, int fi, byte[] secondBuffer, int si)
firstBuffer
- the first buffer to compare against. Must have at least 32
bytes from position fi through the end of the buffer.fi
- first offset within firstBuffer to begin testing.secondBuffer
- the second buffer to compare against. Must have at least 32
bytes from position si through the end of the buffer.si
- first offset within secondBuffer to begin testing.public static final LongObjectId fromRaw(byte[] bs)
bs
- the raw byte buffer to read from. At least 32 bytes must be
available within this byte array.public static final LongObjectId fromRaw(byte[] bs, int p)
bs
- the raw byte buffer to read from. At least 32 bytes after p
must be available within this byte array.p
- position to read the first byte of data from.public static final LongObjectId fromRaw(long[] is)
is
- the raw long buffer to read from. At least 4 longs must be
available within this long array.public static final LongObjectId fromRaw(long[] is, int p)
is
- the raw long buffer to read from. At least 4 longs after p
must be available within this long array.p
- position to read the first long of data from.public static final LongObjectId fromString(byte[] buf, int offset)
buf
- the US-ASCII buffer to read from. At least 64 bytes after
offset must be available within this byte array.offset
- position to read the first character from.public static LongObjectId fromString(String str)
str
- the string to read from. Must be 64 characters long.public LongObjectId toObjectId()
See AnyLongObjectId.copy()
if this
is a possibly subclassed (but
immutable) identity and the application needs a lightweight identity
only reference.
toObjectId
in class AnyLongObjectId
this
if this is already an
immutable instance.Copyright © 2019 Eclipse JGit Project. All rights reserved.