id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
8,000 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.getLobFromLocator | private void getLobFromLocator(CodeAssembler a, StorablePropertyInfo info) {
if (!info.isLob()) {
throw new IllegalArgumentException();
}
TypeDesc type = info.getStorageType();
String name;
if (Blob.class.isAssignableFrom(type.toClass())) {
name =... | java | private void getLobFromLocator(CodeAssembler a, StorablePropertyInfo info) {
if (!info.isLob()) {
throw new IllegalArgumentException();
}
TypeDesc type = info.getStorageType();
String name;
if (Blob.class.isAssignableFrom(type.toClass())) {
name =... | [
"private",
"void",
"getLobFromLocator",
"(",
"CodeAssembler",
"a",
",",
"StorablePropertyInfo",
"info",
")",
"{",
"if",
"(",
"!",
"info",
".",
"isLob",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"TypeDesc",
"type",
... | Generates code to get a Lob from a locator from RawSupport. RawSupport
instance, Storable instance, property name and long locator must be on
the stack. Result is a Lob on the stack, which may be null. | [
"Generates",
"code",
"to",
"get",
"a",
"Lob",
"from",
"a",
"locator",
"from",
"RawSupport",
".",
"RawSupport",
"instance",
"Storable",
"instance",
"property",
"name",
"and",
"long",
"locator",
"must",
"be",
"on",
"the",
"stack",
".",
"Result",
"is",
"a",
"... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L1808-L1826 |
8,001 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.pushDecodingInstanceVar | protected void pushDecodingInstanceVar(CodeAssembler a, int ordinal,
LocalVariable instanceVar) {
if (instanceVar == null) {
// Push this to stack in preparation for storing a property.
a.loadThis();
} else if (instanceVar.getType()... | java | protected void pushDecodingInstanceVar(CodeAssembler a, int ordinal,
LocalVariable instanceVar) {
if (instanceVar == null) {
// Push this to stack in preparation for storing a property.
a.loadThis();
} else if (instanceVar.getType()... | [
"protected",
"void",
"pushDecodingInstanceVar",
"(",
"CodeAssembler",
"a",
",",
"int",
"ordinal",
",",
"LocalVariable",
"instanceVar",
")",
"{",
"if",
"(",
"instanceVar",
"==",
"null",
")",
"{",
"// Push this to stack in preparation for storing a property.\r",
"a",
".",... | Push decoding instanceVar to stack in preparation to calling
storePropertyValue.
@param ordinal zero-based property ordinal, used only if instanceVar
refers to an object array.
@param instanceVar local variable referencing Storable instance,
defaults to "this" if null. If variable type is an Object array, then
propert... | [
"Push",
"decoding",
"instanceVar",
"to",
"stack",
"in",
"preparation",
"to",
"calling",
"storePropertyValue",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L2356-L2369 |
8,002 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | GenericEncodingStrategy.decodeGeneration | private void decodeGeneration(CodeAssembler a, LocalVariable encodedVar,
int offset, int generation, Label altGenerationHandler)
{
if (offset < 0) {
throw new IllegalArgumentException();
}
if (generation < 0) {
return;
... | java | private void decodeGeneration(CodeAssembler a, LocalVariable encodedVar,
int offset, int generation, Label altGenerationHandler)
{
if (offset < 0) {
throw new IllegalArgumentException();
}
if (generation < 0) {
return;
... | [
"private",
"void",
"decodeGeneration",
"(",
"CodeAssembler",
"a",
",",
"LocalVariable",
"encodedVar",
",",
"int",
"offset",
",",
"int",
"generation",
",",
"Label",
"altGenerationHandler",
")",
"{",
"if",
"(",
"offset",
"<",
"0",
")",
"{",
"throw",
"new",
"Il... | Generates code that ensures a matching generation value exists in the
byte array referenced by the local variable, throwing a
CorruptEncodingException otherwise.
@param generation if less than zero, no code is generated | [
"Generates",
"code",
"that",
"ensures",
"a",
"matching",
"generation",
"value",
"exists",
"in",
"the",
"byte",
"array",
"referenced",
"by",
"the",
"local",
"variable",
"throwing",
"a",
"CorruptEncodingException",
"otherwise",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L2541-L2604 |
8,003 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/AbstractQuery.java | AbstractQuery.checkSliceArguments | protected boolean checkSliceArguments(long from, Long to) {
if (from < 0) {
throw new IllegalArgumentException("Slice from is negative: " + from);
}
if (to == null) {
if (from == 0) {
return false;
}
} else if (from > to) {
... | java | protected boolean checkSliceArguments(long from, Long to) {
if (from < 0) {
throw new IllegalArgumentException("Slice from is negative: " + from);
}
if (to == null) {
if (from == 0) {
return false;
}
} else if (from > to) {
... | [
"protected",
"boolean",
"checkSliceArguments",
"(",
"long",
"from",
",",
"Long",
"to",
")",
"{",
"if",
"(",
"from",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Slice from is negative: \"",
"+",
"from",
")",
";",
"}",
"if",
"(",
... | Called by sliced fetch to ensure that arguments are valid.
@return false if from is 0 and to is null
@throws IllegalArgumentException if arguments are invalid
@since 1.2 | [
"Called",
"by",
"sliced",
"fetch",
"to",
"ensure",
"that",
"arguments",
"are",
"valid",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/AbstractQuery.java#L195-L208 |
8,004 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/util/TaskQueueThread.java | TaskQueueThread.execute | public void execute(Runnable task, long timeoutMillis) throws RejectedExecutionException {
if (task == null) {
throw new NullPointerException("Cannot accept null task");
}
synchronized (this) {
if (mState != STATE_RUNNING && mState != STATE_NOT_STARTED) {
... | java | public void execute(Runnable task, long timeoutMillis) throws RejectedExecutionException {
if (task == null) {
throw new NullPointerException("Cannot accept null task");
}
synchronized (this) {
if (mState != STATE_RUNNING && mState != STATE_NOT_STARTED) {
... | [
"public",
"void",
"execute",
"(",
"Runnable",
"task",
",",
"long",
"timeoutMillis",
")",
"throws",
"RejectedExecutionException",
"{",
"if",
"(",
"task",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"Cannot accept null task\"",
")",
";",
... | Enqueue a task to run.
@param task task to enqueue
@param timeoutMillis maximum time to wait for queue to have an available slot
@throws RejectedExecutionException if wait interrupted, timeout expires,
or shutdown has been called | [
"Enqueue",
"a",
"task",
"to",
"run",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/util/TaskQueueThread.java#L85-L102 |
8,005 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/util/TaskQueueThread.java | TaskQueueThread.shutdown | public synchronized void shutdown() {
if (mState == STATE_STOPPED) {
return;
}
if (mState == STATE_NOT_STARTED) {
mState = STATE_STOPPED;
return;
}
mState = STATE_SHOULD_STOP;
// Inject stop task into the queue so it knows to s... | java | public synchronized void shutdown() {
if (mState == STATE_STOPPED) {
return;
}
if (mState == STATE_NOT_STARTED) {
mState = STATE_STOPPED;
return;
}
mState = STATE_SHOULD_STOP;
// Inject stop task into the queue so it knows to s... | [
"public",
"synchronized",
"void",
"shutdown",
"(",
")",
"{",
"if",
"(",
"mState",
"==",
"STATE_STOPPED",
")",
"{",
"return",
";",
"}",
"if",
"(",
"mState",
"==",
"STATE_NOT_STARTED",
")",
"{",
"mState",
"=",
"STATE_STOPPED",
";",
"return",
";",
"}",
"mSt... | Indicate that this task queue thread should finish running its enqueued
tasks and then exit. Enqueueing new tasks will result in a
RejectedExecutionException being thrown. Join on this thread to wait for
it to exit. | [
"Indicate",
"that",
"this",
"task",
"queue",
"thread",
"should",
"finish",
"running",
"its",
"enqueued",
"tasks",
"and",
"then",
"exit",
".",
"Enqueueing",
"new",
"tasks",
"will",
"result",
"in",
"a",
"RejectedExecutionException",
"being",
"thrown",
".",
"Join",... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/util/TaskQueueThread.java#L110-L121 |
8,006 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/sequence/SequenceValueGenerator.java | SequenceValueGenerator.reset | public void reset(int initialValue) throws FetchException, PersistException {
synchronized (mStoredSequence) {
Transaction txn = mRepository.enterTopTransaction(null);
txn.setForUpdate(true);
try {
boolean doUpdate = mStoredSequence.tryLoad();
... | java | public void reset(int initialValue) throws FetchException, PersistException {
synchronized (mStoredSequence) {
Transaction txn = mRepository.enterTopTransaction(null);
txn.setForUpdate(true);
try {
boolean doUpdate = mStoredSequence.tryLoad();
... | [
"public",
"void",
"reset",
"(",
"int",
"initialValue",
")",
"throws",
"FetchException",
",",
"PersistException",
"{",
"synchronized",
"(",
"mStoredSequence",
")",
"{",
"Transaction",
"txn",
"=",
"mRepository",
".",
"enterTopTransaction",
"(",
"null",
")",
";",
"... | Reset the sequence.
@param initialValue first value produced by sequence | [
"Reset",
"the",
"sequence",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/sequence/SequenceValueGenerator.java#L160-L180 |
8,007 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/sequence/SequenceValueGenerator.java | SequenceValueGenerator.returnReservedValues | public boolean returnReservedValues() throws FetchException, PersistException {
synchronized (mStoredSequence) {
if (mHasReservedValues) {
Transaction txn = mRepository.enterTopTransaction(null);
txn.setForUpdate(true);
try {
... | java | public boolean returnReservedValues() throws FetchException, PersistException {
synchronized (mStoredSequence) {
if (mHasReservedValues) {
Transaction txn = mRepository.enterTopTransaction(null);
txn.setForUpdate(true);
try {
... | [
"public",
"boolean",
"returnReservedValues",
"(",
")",
"throws",
"FetchException",
",",
"PersistException",
"{",
"synchronized",
"(",
"mStoredSequence",
")",
"{",
"if",
"(",
"mHasReservedValues",
")",
"{",
"Transaction",
"txn",
"=",
"mRepository",
".",
"enterTopTran... | Allow any unused reserved values to be returned for re-use. If the
repository is shared by other processes, then reserved values might not
be returnable.
<p>This method should be called during the shutdown process of a
repository, although calling it does not invalidate this
SequenceValueGenerator. If getNextValue is ... | [
"Allow",
"any",
"unused",
"reserved",
"values",
"to",
"be",
"returned",
"for",
"re",
"-",
"use",
".",
"If",
"the",
"repository",
"is",
"shared",
"by",
"other",
"processes",
"then",
"reserved",
"values",
"might",
"not",
"be",
"returnable",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/sequence/SequenceValueGenerator.java#L254-L277 |
8,008 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/sequence/SequenceValueGenerator.java | SequenceValueGenerator.nextUnadjustedValue | private long nextUnadjustedValue() throws FetchException, PersistException {
if (mHasReservedValues) {
long next = mNextValue + mIncrement;
mNextValue = next;
if (next < mStoredSequence.getNextValue()) {
return next;
}
mHasReserv... | java | private long nextUnadjustedValue() throws FetchException, PersistException {
if (mHasReservedValues) {
long next = mNextValue + mIncrement;
mNextValue = next;
if (next < mStoredSequence.getNextValue()) {
return next;
}
mHasReserv... | [
"private",
"long",
"nextUnadjustedValue",
"(",
")",
"throws",
"FetchException",
",",
"PersistException",
"{",
"if",
"(",
"mHasReservedValues",
")",
"{",
"long",
"next",
"=",
"mNextValue",
"+",
"mIncrement",
";",
"mNextValue",
"=",
"next",
";",
"if",
"(",
"next... | Assumes caller has synchronized on mStoredSequence | [
"Assumes",
"caller",
"has",
"synchronized",
"on",
"mStoredSequence"
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/sequence/SequenceValueGenerator.java#L280-L322 |
8,009 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/util/AnnotationDescParser.java | AnnotationDescParser.parse | public Annotation parse(Annotation rootAnnotation) {
mPos = 0;
if (parseTag() != TAG_ANNOTATION) {
throw error("Malformed");
}
TypeDesc rootAnnotationType = parseTypeDesc();
if (rootAnnotation == null) {
rootAnnotation = buildRootAnnotation(ro... | java | public Annotation parse(Annotation rootAnnotation) {
mPos = 0;
if (parseTag() != TAG_ANNOTATION) {
throw error("Malformed");
}
TypeDesc rootAnnotationType = parseTypeDesc();
if (rootAnnotation == null) {
rootAnnotation = buildRootAnnotation(ro... | [
"public",
"Annotation",
"parse",
"(",
"Annotation",
"rootAnnotation",
")",
"{",
"mPos",
"=",
"0",
";",
"if",
"(",
"parseTag",
"(",
")",
"!=",
"TAG_ANNOTATION",
")",
"{",
"throw",
"error",
"(",
"\"Malformed\"",
")",
";",
"}",
"TypeDesc",
"rootAnnotationType",... | Parses the given annotation, returning the root annotation that received
the results.
@param rootAnnotation root annotation
@return root annotation
@throws IllegalArgumentExcecption if annotation is malformed | [
"Parses",
"the",
"given",
"annotation",
"returning",
"the",
"root",
"annotation",
"that",
"received",
"the",
"results",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/util/AnnotationDescParser.java#L56-L76 |
8,010 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/cursor/FilteredCursor.java | FilteredCursor.applyFilter | public static <S extends Storable> Cursor<S> applyFilter(Cursor<S> cursor,
Class<S> type,
String filter,
Object... filterValues)
... | java | public static <S extends Storable> Cursor<S> applyFilter(Cursor<S> cursor,
Class<S> type,
String filter,
Object... filterValues)
... | [
"public",
"static",
"<",
"S",
"extends",
"Storable",
">",
"Cursor",
"<",
"S",
">",
"applyFilter",
"(",
"Cursor",
"<",
"S",
">",
"cursor",
",",
"Class",
"<",
"S",
">",
"type",
",",
"String",
"filter",
",",
"Object",
"...",
"filterValues",
")",
"{",
"F... | Returns a Cursor that is filtered by the given filter expression and values.
@param cursor cursor to wrap
@param type type of storable
@param filter filter to apply
@param filterValues values for filter
@return wrapped cursor which filters results
@throws IllegalStateException if any values are not specified
@throws I... | [
"Returns",
"a",
"Cursor",
"that",
"is",
"filtered",
"by",
"the",
"given",
"filter",
"expression",
"and",
"values",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/cursor/FilteredCursor.java#L49-L57 |
8,011 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/cursor/FilteredCursor.java | FilteredCursor.applyFilter | public static <S extends Storable> Cursor<S> applyFilter(Filter<S> filter,
FilterValues<S> filterValues,
Cursor<S> cursor)
{
if (filter.isOpen()) {
return cursor;
... | java | public static <S extends Storable> Cursor<S> applyFilter(Filter<S> filter,
FilterValues<S> filterValues,
Cursor<S> cursor)
{
if (filter.isOpen()) {
return cursor;
... | [
"public",
"static",
"<",
"S",
"extends",
"Storable",
">",
"Cursor",
"<",
"S",
">",
"applyFilter",
"(",
"Filter",
"<",
"S",
">",
"filter",
",",
"FilterValues",
"<",
"S",
">",
"filterValues",
",",
"Cursor",
"<",
"S",
">",
"cursor",
")",
"{",
"if",
"(",... | Returns a Cursor that is filtered by the given Filter and FilterValues.
The given Filter must be composed only of the same PropertyFilter
instances as used to construct the FilterValues. An
IllegalStateException will result otherwise.
@param filter filter to apply
@param filterValues values for filter, which may be nu... | [
"Returns",
"a",
"Cursor",
"that",
"is",
"filtered",
"by",
"the",
"given",
"Filter",
"and",
"FilterValues",
".",
"The",
"given",
"Filter",
"must",
"be",
"composed",
"only",
"of",
"the",
"same",
"PropertyFilter",
"instances",
"as",
"used",
"to",
"construct",
"... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/cursor/FilteredCursor.java#L72-L88 |
8,012 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/spi/ExceptionTransformer.java | ExceptionTransformer.toFetchException | public FetchException toFetchException(Throwable e) {
FetchException fe = transformIntoFetchException(e);
if (fe != null) {
return fe;
}
Throwable cause = e.getCause();
if (cause != null) {
fe = transformIntoFetchException(cause);
if ... | java | public FetchException toFetchException(Throwable e) {
FetchException fe = transformIntoFetchException(e);
if (fe != null) {
return fe;
}
Throwable cause = e.getCause();
if (cause != null) {
fe = transformIntoFetchException(cause);
if ... | [
"public",
"FetchException",
"toFetchException",
"(",
"Throwable",
"e",
")",
"{",
"FetchException",
"fe",
"=",
"transformIntoFetchException",
"(",
"e",
")",
";",
"if",
"(",
"fe",
"!=",
"null",
")",
"{",
"return",
"fe",
";",
"}",
"Throwable",
"cause",
"=",
"... | Transforms the given throwable into an appropriate fetch exception. If
it already is a fetch exception, it is simply casted.
@param e required exception to transform
@return FetchException, never null | [
"Transforms",
"the",
"given",
"throwable",
"into",
"an",
"appropriate",
"fetch",
"exception",
".",
"If",
"it",
"already",
"is",
"a",
"fetch",
"exception",
"it",
"is",
"simply",
"casted",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/ExceptionTransformer.java#L60-L77 |
8,013 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/spi/ExceptionTransformer.java | ExceptionTransformer.toPersistException | public PersistException toPersistException(Throwable e) {
PersistException pe = transformIntoPersistException(e);
if (pe != null) {
return pe;
}
Throwable cause = e.getCause();
if (cause != null) {
pe = transformIntoPersistException(cause);
... | java | public PersistException toPersistException(Throwable e) {
PersistException pe = transformIntoPersistException(e);
if (pe != null) {
return pe;
}
Throwable cause = e.getCause();
if (cause != null) {
pe = transformIntoPersistException(cause);
... | [
"public",
"PersistException",
"toPersistException",
"(",
"Throwable",
"e",
")",
"{",
"PersistException",
"pe",
"=",
"transformIntoPersistException",
"(",
"e",
")",
";",
"if",
"(",
"pe",
"!=",
"null",
")",
"{",
"return",
"pe",
";",
"}",
"Throwable",
"cause",
... | Transforms the given throwable into an appropriate persist exception. If
it already is a persist exception, it is simply casted.
@param e required exception to transform
@return PersistException, never null | [
"Transforms",
"the",
"given",
"throwable",
"into",
"an",
"appropriate",
"persist",
"exception",
".",
"If",
"it",
"already",
"is",
"a",
"persist",
"exception",
"it",
"is",
"simply",
"casted",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/ExceptionTransformer.java#L86-L103 |
8,014 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/spi/ExceptionTransformer.java | ExceptionTransformer.toRepositoryException | public RepositoryException toRepositoryException(Throwable e) {
RepositoryException re = transformIntoRepositoryException(e);
if (re != null) {
return re;
}
Throwable cause = e.getCause();
if (cause != null) {
re = transformIntoRepositoryException... | java | public RepositoryException toRepositoryException(Throwable e) {
RepositoryException re = transformIntoRepositoryException(e);
if (re != null) {
return re;
}
Throwable cause = e.getCause();
if (cause != null) {
re = transformIntoRepositoryException... | [
"public",
"RepositoryException",
"toRepositoryException",
"(",
"Throwable",
"e",
")",
"{",
"RepositoryException",
"re",
"=",
"transformIntoRepositoryException",
"(",
"e",
")",
";",
"if",
"(",
"re",
"!=",
"null",
")",
"{",
"return",
"re",
";",
"}",
"Throwable",
... | Transforms the given throwable into an appropriate repository
exception. If it already is a repository exception, it is simply casted.
@param e required exception to transform
@return RepositoryException, never null | [
"Transforms",
"the",
"given",
"throwable",
"into",
"an",
"appropriate",
"repository",
"exception",
".",
"If",
"it",
"already",
"is",
"a",
"repository",
"exception",
"it",
"is",
"simply",
"casted",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/ExceptionTransformer.java#L112-L129 |
8,015 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/layout/Layout.java | Layout.getDataProperties | public List<LayoutProperty> getDataProperties() throws FetchException {
List<LayoutProperty> all = getAllProperties();
List<LayoutProperty> data = new ArrayList<LayoutProperty>(all.size() - 1);
for (LayoutProperty property : all) {
if (!property.isPrimaryKeyMember()) {
... | java | public List<LayoutProperty> getDataProperties() throws FetchException {
List<LayoutProperty> all = getAllProperties();
List<LayoutProperty> data = new ArrayList<LayoutProperty>(all.size() - 1);
for (LayoutProperty property : all) {
if (!property.isPrimaryKeyMember()) {
... | [
"public",
"List",
"<",
"LayoutProperty",
">",
"getDataProperties",
"(",
")",
"throws",
"FetchException",
"{",
"List",
"<",
"LayoutProperty",
">",
"all",
"=",
"getAllProperties",
"(",
")",
";",
"List",
"<",
"LayoutProperty",
">",
"data",
"=",
"new",
"ArrayList"... | Returns all the non-primary key properties of this layout, in their
proper order. | [
"Returns",
"all",
"the",
"non",
"-",
"primary",
"key",
"properties",
"of",
"this",
"layout",
"in",
"their",
"proper",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/Layout.java#L250-L259 |
8,016 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/layout/Layout.java | Layout.getAllProperties | public List<LayoutProperty> getAllProperties() throws FetchException {
List<LayoutProperty> all = mAllProperties;
if (all == null) {
Cursor <StoredLayoutProperty> cursor = mLayoutFactory.mPropertyStorage
.query("layoutID = ?")
.with(mStoredLayout.getLay... | java | public List<LayoutProperty> getAllProperties() throws FetchException {
List<LayoutProperty> all = mAllProperties;
if (all == null) {
Cursor <StoredLayoutProperty> cursor = mLayoutFactory.mPropertyStorage
.query("layoutID = ?")
.with(mStoredLayout.getLay... | [
"public",
"List",
"<",
"LayoutProperty",
">",
"getAllProperties",
"(",
")",
"throws",
"FetchException",
"{",
"List",
"<",
"LayoutProperty",
">",
"all",
"=",
"mAllProperties",
";",
"if",
"(",
"all",
"==",
"null",
")",
"{",
"Cursor",
"<",
"StoredLayoutProperty",... | Returns all the properties of this layout, in their proper order. | [
"Returns",
"all",
"the",
"properties",
"of",
"this",
"layout",
"in",
"their",
"proper",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/Layout.java#L264-L288 |
8,017 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/layout/Layout.java | Layout.getGeneration | public Layout getGeneration(int generation) throws FetchNoneException, FetchException {
try {
Storage<StoredLayoutEquivalence> equivStorage =
mLayoutFactory.mRepository.storageFor(StoredLayoutEquivalence.class);
StoredLayoutEquivalence equiv = equivStorage.prepare();
... | java | public Layout getGeneration(int generation) throws FetchNoneException, FetchException {
try {
Storage<StoredLayoutEquivalence> equivStorage =
mLayoutFactory.mRepository.storageFor(StoredLayoutEquivalence.class);
StoredLayoutEquivalence equiv = equivStorage.prepare();
... | [
"public",
"Layout",
"getGeneration",
"(",
"int",
"generation",
")",
"throws",
"FetchNoneException",
",",
"FetchException",
"{",
"try",
"{",
"Storage",
"<",
"StoredLayoutEquivalence",
">",
"equivStorage",
"=",
"mLayoutFactory",
".",
"mRepository",
".",
"storageFor",
... | Returns the layout for a particular generation of this layout's type.
@throws FetchNoneException if generation not found | [
"Returns",
"the",
"layout",
"for",
"a",
"particular",
"generation",
"of",
"this",
"layout",
"s",
"type",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/Layout.java#L325-L340 |
8,018 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/layout/Layout.java | Layout.previousGeneration | public Layout previousGeneration() throws FetchException {
Cursor<StoredLayout> cursor = mLayoutFactory.mLayoutStorage
.query("storableTypeName = ? & generation < ?")
.with(getStorableTypeName()).with(getGeneration())
.orderBy("-generation")
.fetch();
... | java | public Layout previousGeneration() throws FetchException {
Cursor<StoredLayout> cursor = mLayoutFactory.mLayoutStorage
.query("storableTypeName = ? & generation < ?")
.with(getStorableTypeName()).with(getGeneration())
.orderBy("-generation")
.fetch();
... | [
"public",
"Layout",
"previousGeneration",
"(",
")",
"throws",
"FetchException",
"{",
"Cursor",
"<",
"StoredLayout",
">",
"cursor",
"=",
"mLayoutFactory",
".",
"mLayoutStorage",
".",
"query",
"(",
"\"storableTypeName = ? & generation < ?\"",
")",
".",
"with",
"(",
"g... | Returns the previous known generation of the storable's layout, or null
if none.
@return a layout with a lower generation, or null if none | [
"Returns",
"the",
"previous",
"known",
"generation",
"of",
"the",
"storable",
"s",
"layout",
"or",
"null",
"if",
"none",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/Layout.java#L429-L445 |
8,019 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/layout/Layout.java | Layout.reconstruct | public Class<? extends Storable> reconstruct(ClassLoader loader)
throws FetchException, SupportException
{
Class<? extends Storable> reconstructed = reconstruct(this, loader);
mLayoutFactory.registerReconstructed(reconstructed, this);
return reconstructed;
} | java | public Class<? extends Storable> reconstruct(ClassLoader loader)
throws FetchException, SupportException
{
Class<? extends Storable> reconstructed = reconstruct(this, loader);
mLayoutFactory.registerReconstructed(reconstructed, this);
return reconstructed;
} | [
"public",
"Class",
"<",
"?",
"extends",
"Storable",
">",
"reconstruct",
"(",
"ClassLoader",
"loader",
")",
"throws",
"FetchException",
",",
"SupportException",
"{",
"Class",
"<",
"?",
"extends",
"Storable",
">",
"reconstructed",
"=",
"reconstruct",
"(",
"this",
... | Reconstructs the storable type defined by this layout by returning an
auto-generated class. The reconstructed storable type will not contain
everything in the original, but rather the minimum required to decode
persisted instances.
@param loader optional ClassLoader to load reconstruct class into, if it
has not been l... | [
"Reconstructs",
"the",
"storable",
"type",
"defined",
"by",
"this",
"layout",
"by",
"returning",
"an",
"auto",
"-",
"generated",
"class",
".",
"The",
"reconstructed",
"storable",
"type",
"will",
"not",
"contain",
"everything",
"in",
"the",
"original",
"but",
"... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/Layout.java#L490-L496 |
8,020 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/layout/Layout.java | Layout.equalLayouts | public boolean equalLayouts(Layout layout) throws FetchException {
if (this == layout) {
return true;
}
return getStorableTypeName().equals(layout.getStorableTypeName())
&& getAllProperties().equals(layout.getAllProperties())
&& Arrays.equals(mStoredLayo... | java | public boolean equalLayouts(Layout layout) throws FetchException {
if (this == layout) {
return true;
}
return getStorableTypeName().equals(layout.getStorableTypeName())
&& getAllProperties().equals(layout.getAllProperties())
&& Arrays.equals(mStoredLayo... | [
"public",
"boolean",
"equalLayouts",
"(",
"Layout",
"layout",
")",
"throws",
"FetchException",
"{",
"if",
"(",
"this",
"==",
"layout",
")",
"{",
"return",
"true",
";",
"}",
"return",
"getStorableTypeName",
"(",
")",
".",
"equals",
"(",
"layout",
".",
"getS... | Returns true if the given layout matches this one. Layout ID,
generation, and creation info is not considered in the comparison. | [
"Returns",
"true",
"if",
"the",
"given",
"layout",
"matches",
"this",
"one",
".",
"Layout",
"ID",
"generation",
"and",
"creation",
"info",
"is",
"not",
"considered",
"in",
"the",
"comparison",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/Layout.java#L545-L552 |
8,021 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/layout/Layout.java | Layout.insert | void insert(boolean readOnly, int generation) throws PersistException {
if (mAllProperties == null) {
throw new IllegalStateException();
}
mStoredLayout.setGeneration(generation);
if (readOnly) {
return;
}
try {
mStoredLa... | java | void insert(boolean readOnly, int generation) throws PersistException {
if (mAllProperties == null) {
throw new IllegalStateException();
}
mStoredLayout.setGeneration(generation);
if (readOnly) {
return;
}
try {
mStoredLa... | [
"void",
"insert",
"(",
"boolean",
"readOnly",
",",
"int",
"generation",
")",
"throws",
"PersistException",
"{",
"if",
"(",
"mAllProperties",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
"}",
"mStoredLayout",
".",
"setGenerati... | Assumes caller is in a transaction. | [
"Assumes",
"caller",
"is",
"in",
"a",
"transaction",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/Layout.java#L582-L617 |
8,022 | cose-wg/COSE-JAVA | src/main/java/COSE/SignMessage.java | SignMessage.DecodeFromCBORObject | @Override
protected void DecodeFromCBORObject(CBORObject obj) throws CoseException {
if (obj.size() != 4) throw new CoseException("Invalid SignMessage structure");
if (obj.get(0).getType() == CBORType.ByteString) {
rgbProtected = obj.get(0).GetByteString();
if (obj.g... | java | @Override
protected void DecodeFromCBORObject(CBORObject obj) throws CoseException {
if (obj.size() != 4) throw new CoseException("Invalid SignMessage structure");
if (obj.get(0).getType() == CBORType.ByteString) {
rgbProtected = obj.get(0).GetByteString();
if (obj.g... | [
"@",
"Override",
"protected",
"void",
"DecodeFromCBORObject",
"(",
"CBORObject",
"obj",
")",
"throws",
"CoseException",
"{",
"if",
"(",
"obj",
".",
"size",
"(",
")",
"!=",
"4",
")",
"throw",
"new",
"CoseException",
"(",
"\"Invalid SignMessage structure\"",
")",
... | Internal function used in creating a SignMessage object from a byte string.
@param obj COSE_Sign encoded object.
@throws CoseException Errors generated by the COSE module | [
"Internal",
"function",
"used",
"in",
"creating",
"a",
"SignMessage",
"object",
"from",
"a",
"byte",
"string",
"."
] | f972b11ab4c9a18f911bc49a15225a6951cf6f63 | https://github.com/cose-wg/COSE-JAVA/blob/f972b11ab4c9a18f911bc49a15225a6951cf6f63/src/main/java/COSE/SignMessage.java#L58-L90 |
8,023 | cose-wg/COSE-JAVA | src/main/java/COSE/SignMessage.java | SignMessage.EncodeCBORObject | @Override
protected CBORObject EncodeCBORObject() throws CoseException {
sign();
CBORObject obj = CBORObject.NewArray();
obj.Add(rgbProtected);
obj.Add(objUnprotected);
if (emitContent) obj.Add(rgbContent);
else obj.Add(null);
CBORObject sign... | java | @Override
protected CBORObject EncodeCBORObject() throws CoseException {
sign();
CBORObject obj = CBORObject.NewArray();
obj.Add(rgbProtected);
obj.Add(objUnprotected);
if (emitContent) obj.Add(rgbContent);
else obj.Add(null);
CBORObject sign... | [
"@",
"Override",
"protected",
"CBORObject",
"EncodeCBORObject",
"(",
")",
"throws",
"CoseException",
"{",
"sign",
"(",
")",
";",
"CBORObject",
"obj",
"=",
"CBORObject",
".",
"NewArray",
"(",
")",
";",
"obj",
".",
"Add",
"(",
"rgbProtected",
")",
";",
"obj"... | Internal function used to create a serialization of a COSE_Sign message
@return CBOR object which can be encoded.
@throws CoseException Errors generated by the COSE module | [
"Internal",
"function",
"used",
"to",
"create",
"a",
"serialization",
"of",
"a",
"COSE_Sign",
"message"
] | f972b11ab4c9a18f911bc49a15225a6951cf6f63 | https://github.com/cose-wg/COSE-JAVA/blob/f972b11ab4c9a18f911bc49a15225a6951cf6f63/src/main/java/COSE/SignMessage.java#L98-L116 |
8,024 | cose-wg/COSE-JAVA | src/main/java/COSE/SignMessage.java | SignMessage.sign | public void sign() throws CoseException {
if (rgbProtected == null) {
if (objProtected.size() == 0) rgbProtected = new byte[0];
else rgbProtected = objProtected.EncodeToBytes();
}
for (Signer r : signerList) {
r.sign(rgbProtected, rgbContent);
... | java | public void sign() throws CoseException {
if (rgbProtected == null) {
if (objProtected.size() == 0) rgbProtected = new byte[0];
else rgbProtected = objProtected.EncodeToBytes();
}
for (Signer r : signerList) {
r.sign(rgbProtected, rgbContent);
... | [
"public",
"void",
"sign",
"(",
")",
"throws",
"CoseException",
"{",
"if",
"(",
"rgbProtected",
"==",
"null",
")",
"{",
"if",
"(",
"objProtected",
".",
"size",
"(",
")",
"==",
"0",
")",
"rgbProtected",
"=",
"new",
"byte",
"[",
"0",
"]",
";",
"else",
... | Causes a signature to be created for every signer that does not already have one.
@throws CoseException Errors generated by the COSE module | [
"Causes",
"a",
"signature",
"to",
"be",
"created",
"for",
"every",
"signer",
"that",
"does",
"not",
"already",
"have",
"one",
"."
] | f972b11ab4c9a18f911bc49a15225a6951cf6f63 | https://github.com/cose-wg/COSE-JAVA/blob/f972b11ab4c9a18f911bc49a15225a6951cf6f63/src/main/java/COSE/SignMessage.java#L162-L173 |
8,025 | cose-wg/COSE-JAVA | src/main/java/COSE/SignMessage.java | SignMessage.validate | public boolean validate(Signer signerToUse) throws CoseException {
for (Signer r : signerList) {
if (r == signerToUse) {
return r.validate(rgbProtected, rgbContent);
}
}
throw new CoseException("Signer not found");
} | java | public boolean validate(Signer signerToUse) throws CoseException {
for (Signer r : signerList) {
if (r == signerToUse) {
return r.validate(rgbProtected, rgbContent);
}
}
throw new CoseException("Signer not found");
} | [
"public",
"boolean",
"validate",
"(",
"Signer",
"signerToUse",
")",
"throws",
"CoseException",
"{",
"for",
"(",
"Signer",
"r",
":",
"signerList",
")",
"{",
"if",
"(",
"r",
"==",
"signerToUse",
")",
"{",
"return",
"r",
".",
"validate",
"(",
"rgbProtected",
... | Validate the signature on a message for a specific signer.
The signer is required to be one of the Signer objects attached to the message.
The key must be attached to the signer before making this call.
@param signerToUse which signer to validate with
@return true if the message validates with the signer
@throws CoseE... | [
"Validate",
"the",
"signature",
"on",
"a",
"message",
"for",
"a",
"specific",
"signer",
".",
"The",
"signer",
"is",
"required",
"to",
"be",
"one",
"of",
"the",
"Signer",
"objects",
"attached",
"to",
"the",
"message",
".",
"The",
"key",
"must",
"be",
"att... | f972b11ab4c9a18f911bc49a15225a6951cf6f63 | https://github.com/cose-wg/COSE-JAVA/blob/f972b11ab4c9a18f911bc49a15225a6951cf6f63/src/main/java/COSE/SignMessage.java#L185-L193 |
8,026 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java | JDBCRepositoryBuilder.getDataSource | public DataSource getDataSource() throws ConfigurationException {
if (mDataSource == null) {
if (mDriverClassName != null && mURL != null) {
try {
mDataSource = new SimpleDataSource
(mDriverClassName, mURL, mUsername, mPassword);
... | java | public DataSource getDataSource() throws ConfigurationException {
if (mDataSource == null) {
if (mDriverClassName != null && mURL != null) {
try {
mDataSource = new SimpleDataSource
(mDriverClassName, mURL, mUsername, mPassword);
... | [
"public",
"DataSource",
"getDataSource",
"(",
")",
"throws",
"ConfigurationException",
"{",
"if",
"(",
"mDataSource",
"==",
"null",
")",
"{",
"if",
"(",
"mDriverClassName",
"!=",
"null",
"&&",
"mURL",
"!=",
"null",
")",
"{",
"try",
"{",
"mDataSource",
"=",
... | Returns the source of JDBC connections, which defaults to a non-pooling
source if driver class, driver URL, username, and password are all
supplied.
@throws ConfigurationException if driver class wasn't found | [
"Returns",
"the",
"source",
"of",
"JDBC",
"connections",
"which",
"defaults",
"to",
"a",
"non",
"-",
"pooling",
"source",
"if",
"driver",
"class",
"driver",
"URL",
"username",
"and",
"password",
"are",
"all",
"supplied",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java#L149-L171 |
8,027 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java | JDBCRepositoryBuilder.setSuppressReload | public void setSuppressReload(boolean suppress, String className) {
if (mSuppressReloadMap == null) {
mSuppressReloadMap = new HashMap<String, Boolean>();
}
mSuppressReloadMap.put(className, suppress);
} | java | public void setSuppressReload(boolean suppress, String className) {
if (mSuppressReloadMap == null) {
mSuppressReloadMap = new HashMap<String, Boolean>();
}
mSuppressReloadMap.put(className, suppress);
} | [
"public",
"void",
"setSuppressReload",
"(",
"boolean",
"suppress",
",",
"String",
"className",
")",
"{",
"if",
"(",
"mSuppressReloadMap",
"==",
"null",
")",
"{",
"mSuppressReloadMap",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Boolean",
">",
"(",
")",
";",
... | By default, JDBCRepository reloads Storables after every insert or
update. This ensures that any applied defaults or triggered changes are
available to the Storable. If the database has no such defaults or
triggers, suppressing reload can improve performance.
<p>Note: If Storable has a version property and auto versio... | [
"By",
"default",
"JDBCRepository",
"reloads",
"Storables",
"after",
"every",
"insert",
"or",
"update",
".",
"This",
"ensures",
"that",
"any",
"applied",
"defaults",
"or",
"triggered",
"changes",
"are",
"available",
"to",
"the",
"Storable",
".",
"If",
"the",
"d... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java#L358-L363 |
8,028 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeIntegerObjDesc | public static Integer decodeIntegerObjDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
int b = src[srcOffset];
if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
return null;
}
return decodeIntDesc(src, srcO... | java | public static Integer decodeIntegerObjDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
int b = src[srcOffset];
if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
return null;
}
return decodeIntDesc(src, srcO... | [
"public",
"static",
"Integer",
"decodeIntegerObjDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"try",
"{",
"int",
"b",
"=",
"src",
"[",
"srcOffset",
"]",
";",
"if",
"(",
"b",
"==",
"NULL_BYTE_H... | Decodes a signed Integer object from exactly 1 or 5 bytes, as encoded
for descending order. If null is returned, then 1 byte was read.
@param src source of encoded bytes
@param srcOffset offset into source array
@return signed Integer object or null | [
"Decodes",
"a",
"signed",
"Integer",
"object",
"from",
"exactly",
"1",
"or",
"5",
"bytes",
"as",
"encoded",
"for",
"descending",
"order",
".",
"If",
"null",
"is",
"returned",
"then",
"1",
"byte",
"was",
"read",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L58-L70 |
8,029 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeLongObjDesc | public static Long decodeLongObjDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
int b = src[srcOffset];
if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
return null;
}
return decodeLongDesc(src, srcOffset... | java | public static Long decodeLongObjDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
int b = src[srcOffset];
if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
return null;
}
return decodeLongDesc(src, srcOffset... | [
"public",
"static",
"Long",
"decodeLongObjDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"try",
"{",
"int",
"b",
"=",
"src",
"[",
"srcOffset",
"]",
";",
"if",
"(",
"b",
"==",
"NULL_BYTE_HIGH",
... | Decodes a signed Long object from exactly 1 or 9 bytes, as encoded for
descending order. If null is returned, then 1 byte was read.
@param src source of encoded bytes
@param srcOffset offset into source array
@return signed Long object or null | [
"Decodes",
"a",
"signed",
"Long",
"object",
"from",
"exactly",
"1",
"or",
"9",
"bytes",
"as",
"encoded",
"for",
"descending",
"order",
".",
"If",
"null",
"is",
"returned",
"then",
"1",
"byte",
"was",
"read",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L94-L106 |
8,030 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeByteDesc | public static byte decodeByteDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
return (byte)(src[srcOffset] ^ 0x7f);
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null, e);
}
} | java | public static byte decodeByteDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
return (byte)(src[srcOffset] ^ 0x7f);
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null, e);
}
} | [
"public",
"static",
"byte",
"decodeByteDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"try",
"{",
"return",
"(",
"byte",
")",
"(",
"src",
"[",
"srcOffset",
"]",
"^",
"0x7f",
")",
";",
"}",
... | Decodes a signed byte from exactly 1 byte, as encoded for descending
order.
@param src source of encoded bytes
@param srcOffset offset into source array
@return signed byte value | [
"Decodes",
"a",
"signed",
"byte",
"from",
"exactly",
"1",
"byte",
"as",
"encoded",
"for",
"descending",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L116-L124 |
8,031 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeByteObjDesc | public static Byte decodeByteObjDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
int b = src[srcOffset];
if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
return null;
}
return decodeByteDesc(src, srcOffset... | java | public static Byte decodeByteObjDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
int b = src[srcOffset];
if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
return null;
}
return decodeByteDesc(src, srcOffset... | [
"public",
"static",
"Byte",
"decodeByteObjDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"try",
"{",
"int",
"b",
"=",
"src",
"[",
"srcOffset",
"]",
";",
"if",
"(",
"b",
"==",
"NULL_BYTE_HIGH",
... | Decodes a signed Byte object from exactly 1 or 2 bytes, as encoded for
descending order. If null is returned, then 1 byte was read.
@param src source of encoded bytes
@param srcOffset offset into source array
@return signed Byte object or null | [
"Decodes",
"a",
"signed",
"Byte",
"object",
"from",
"exactly",
"1",
"or",
"2",
"bytes",
"as",
"encoded",
"for",
"descending",
"order",
".",
"If",
"null",
"is",
"returned",
"then",
"1",
"byte",
"was",
"read",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L134-L146 |
8,032 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeShortDesc | public static short decodeShortDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
return (short)(((src[srcOffset] << 8) | (src[srcOffset + 1] & 0xff)) ^ 0x7fff);
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null... | java | public static short decodeShortDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
return (short)(((src[srcOffset] << 8) | (src[srcOffset + 1] & 0xff)) ^ 0x7fff);
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null... | [
"public",
"static",
"short",
"decodeShortDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"try",
"{",
"return",
"(",
"short",
")",
"(",
"(",
"(",
"src",
"[",
"srcOffset",
"]",
"<<",
"8",
")",
... | Decodes a signed short from exactly 2 bytes, as encoded for descending
order.
@param src source of encoded bytes
@param srcOffset offset into source array
@return signed short value | [
"Decodes",
"a",
"signed",
"short",
"from",
"exactly",
"2",
"bytes",
"as",
"encoded",
"for",
"descending",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L156-L164 |
8,033 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeShortObjDesc | public static Short decodeShortObjDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
int b = src[srcOffset];
if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
return null;
}
return decodeShortDesc(src, srcOff... | java | public static Short decodeShortObjDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
int b = src[srcOffset];
if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
return null;
}
return decodeShortDesc(src, srcOff... | [
"public",
"static",
"Short",
"decodeShortObjDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"try",
"{",
"int",
"b",
"=",
"src",
"[",
"srcOffset",
"]",
";",
"if",
"(",
"b",
"==",
"NULL_BYTE_HIGH"... | Decodes a signed Short object from exactly 1 or 3 bytes, as encoded for
descending order. If null is returned, then 1 byte was read.
@param src source of encoded bytes
@param srcOffset offset into source array
@return signed Short object or null | [
"Decodes",
"a",
"signed",
"Short",
"object",
"from",
"exactly",
"1",
"or",
"3",
"bytes",
"as",
"encoded",
"for",
"descending",
"order",
".",
"If",
"null",
"is",
"returned",
"then",
"1",
"byte",
"was",
"read",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L174-L186 |
8,034 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeCharDesc | public static char decodeCharDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
return (char)~((src[srcOffset] << 8) | (src[srcOffset + 1] & 0xff));
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null, e);
... | java | public static char decodeCharDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
return (char)~((src[srcOffset] << 8) | (src[srcOffset + 1] & 0xff));
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null, e);
... | [
"public",
"static",
"char",
"decodeCharDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"try",
"{",
"return",
"(",
"char",
")",
"~",
"(",
"(",
"src",
"[",
"srcOffset",
"]",
"<<",
"8",
")",
"|... | Decodes a char from exactly 2 bytes, as encoded for descending order.
@param src source of encoded bytes
@param srcOffset offset into source array
@return char value | [
"Decodes",
"a",
"char",
"from",
"exactly",
"2",
"bytes",
"as",
"encoded",
"for",
"descending",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L195-L203 |
8,035 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeCharacterObjDesc | public static Character decodeCharacterObjDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
int b = src[srcOffset];
if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
return null;
}
return decodeCharDesc(src,... | java | public static Character decodeCharacterObjDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
int b = src[srcOffset];
if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
return null;
}
return decodeCharDesc(src,... | [
"public",
"static",
"Character",
"decodeCharacterObjDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"try",
"{",
"int",
"b",
"=",
"src",
"[",
"srcOffset",
"]",
";",
"if",
"(",
"b",
"==",
"NULL_BY... | Decodes a Character object from exactly 1 or 3 bytes, as encoded for
descending order. If null is returned, then 1 byte was read.
@param src source of encoded bytes
@param srcOffset offset into source array
@return Character object or null | [
"Decodes",
"a",
"Character",
"object",
"from",
"exactly",
"1",
"or",
"3",
"bytes",
"as",
"encoded",
"for",
"descending",
"order",
".",
"If",
"null",
"is",
"returned",
"then",
"1",
"byte",
"was",
"read",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L213-L225 |
8,036 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeBooleanDesc | public static boolean decodeBooleanDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
return src[srcOffset] == 127;
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null, e);
}
} | java | public static boolean decodeBooleanDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
return src[srcOffset] == 127;
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null, e);
}
} | [
"public",
"static",
"boolean",
"decodeBooleanDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"try",
"{",
"return",
"src",
"[",
"srcOffset",
"]",
"==",
"127",
";",
"}",
"catch",
"(",
"IndexOutOfBou... | Decodes a boolean from exactly 1 byte, as encoded for descending order.
@param src source of encoded bytes
@param srcOffset offset into source array
@return boolean value | [
"Decodes",
"a",
"boolean",
"from",
"exactly",
"1",
"byte",
"as",
"encoded",
"for",
"descending",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L234-L242 |
8,037 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeFloatDesc | public static float decodeFloatDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
int bits = DataDecoder.decodeFloatBits(src, srcOffset);
if (bits >= 0) {
bits ^= 0x7fffffff;
}
return Float.intBitsToFloat(bits);
} | java | public static float decodeFloatDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
int bits = DataDecoder.decodeFloatBits(src, srcOffset);
if (bits >= 0) {
bits ^= 0x7fffffff;
}
return Float.intBitsToFloat(bits);
} | [
"public",
"static",
"float",
"decodeFloatDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"int",
"bits",
"=",
"DataDecoder",
".",
"decodeFloatBits",
"(",
"src",
",",
"srcOffset",
")",
";",
"if",
"(... | Decodes a float from exactly 4 bytes, as encoded for descending order.
@param src source of encoded bytes
@param srcOffset offset into source array
@return float value | [
"Decodes",
"a",
"float",
"from",
"exactly",
"4",
"bytes",
"as",
"encoded",
"for",
"descending",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L276-L284 |
8,038 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeDoubleDesc | public static double decodeDoubleDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
long bits = DataDecoder.decodeDoubleBits(src, srcOffset);
if (bits >= 0) {
bits ^= 0x7fffffffffffffffL;
}
return Double.longBitsToDouble(bits);
} | java | public static double decodeDoubleDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
long bits = DataDecoder.decodeDoubleBits(src, srcOffset);
if (bits >= 0) {
bits ^= 0x7fffffffffffffffL;
}
return Double.longBitsToDouble(bits);
} | [
"public",
"static",
"double",
"decodeDoubleDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"long",
"bits",
"=",
"DataDecoder",
".",
"decodeDoubleBits",
"(",
"src",
",",
"srcOffset",
")",
";",
"if",
... | Decodes a double from exactly 8 bytes, as encoded for descending order.
@param src source of encoded bytes
@param srcOffset offset into source array
@return double value | [
"Decodes",
"a",
"double",
"from",
"exactly",
"8",
"bytes",
"as",
"encoded",
"for",
"descending",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L310-L318 |
8,039 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decode | public static int decode(byte[] src, int srcOffset, BigInteger[] valueRef)
throws CorruptEncodingException
{
int headerSize;
int bytesLength;
byte[] bytes;
try {
int header = src[srcOffset];
if (header == NULL_BYTE_HIGH || header == NULL_BYTE... | java | public static int decode(byte[] src, int srcOffset, BigInteger[] valueRef)
throws CorruptEncodingException
{
int headerSize;
int bytesLength;
byte[] bytes;
try {
int header = src[srcOffset];
if (header == NULL_BYTE_HIGH || header == NULL_BYTE... | [
"public",
"static",
"int",
"decode",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
",",
"BigInteger",
"[",
"]",
"valueRef",
")",
"throws",
"CorruptEncodingException",
"{",
"int",
"headerSize",
";",
"int",
"bytesLength",
";",
"byte",
"[",
"]",
"byt... | Decodes the given BigInteger as originally encoded for ascending order.
@param src source of encoded data
@param srcOffset offset into encoded data
@param valueRef decoded BigInteger is stored in element 0, which may be null
@return amount of bytes read from source
@throws CorruptEncodingException if source data is co... | [
"Decodes",
"the",
"given",
"BigInteger",
"as",
"originally",
"encoded",
"for",
"ascending",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L347-L383 |
8,040 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeDesc | public static int decodeDesc(byte[] src, int srcOffset, BigInteger[] valueRef)
throws CorruptEncodingException
{
int headerSize;
int bytesLength;
byte[] bytes;
try {
int header = src[srcOffset];
if (header == NULL_BYTE_HIGH || header == NULL_... | java | public static int decodeDesc(byte[] src, int srcOffset, BigInteger[] valueRef)
throws CorruptEncodingException
{
int headerSize;
int bytesLength;
byte[] bytes;
try {
int header = src[srcOffset];
if (header == NULL_BYTE_HIGH || header == NULL_... | [
"public",
"static",
"int",
"decodeDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
",",
"BigInteger",
"[",
"]",
"valueRef",
")",
"throws",
"CorruptEncodingException",
"{",
"int",
"headerSize",
";",
"int",
"bytesLength",
";",
"byte",
"[",
"]",
... | Decodes the given BigInteger as originally encoded for descending order.
@param src source of encoded data
@param srcOffset offset into encoded data
@param valueRef decoded BigInteger is stored in element 0, which may be null
@return amount of bytes read from source
@throws CorruptEncodingException if source data is c... | [
"Decodes",
"the",
"given",
"BigInteger",
"as",
"originally",
"encoded",
"for",
"descending",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L395-L435 |
8,041 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decode | public static int decode(byte[] src, int srcOffset, BigDecimal[] valueRef)
throws CorruptEncodingException
{
return decode(src, srcOffset, valueRef, 0);
} | java | public static int decode(byte[] src, int srcOffset, BigDecimal[] valueRef)
throws CorruptEncodingException
{
return decode(src, srcOffset, valueRef, 0);
} | [
"public",
"static",
"int",
"decode",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
",",
"BigDecimal",
"[",
"]",
"valueRef",
")",
"throws",
"CorruptEncodingException",
"{",
"return",
"decode",
"(",
"src",
",",
"srcOffset",
",",
"valueRef",
",",
"0"... | Decodes the given BigDecimal as originally encoded for ascending order.
@param src source of encoded data
@param srcOffset offset into encoded data
@param valueRef decoded BigDecimal is stored in element 0, which may be null
@return amount of bytes read from source
@throws CorruptEncodingException if source data is co... | [
"Decodes",
"the",
"given",
"BigDecimal",
"as",
"originally",
"encoded",
"for",
"ascending",
"order",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L447-L451 |
8,042 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decode | public static int decode(byte[] src, int srcOffset, byte[][] valueRef)
throws CorruptEncodingException
{
try {
return decode(src, srcOffset, valueRef, 0);
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null, e);
}
} | java | public static int decode(byte[] src, int srcOffset, byte[][] valueRef)
throws CorruptEncodingException
{
try {
return decode(src, srcOffset, valueRef, 0);
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null, e);
}
} | [
"public",
"static",
"int",
"decode",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
",",
"byte",
"[",
"]",
"[",
"]",
"valueRef",
")",
"throws",
"CorruptEncodingException",
"{",
"try",
"{",
"return",
"decode",
"(",
"src",
",",
"srcOffset",
",",
... | Decodes the given byte array as originally encoded for ascending order.
The decoding stops when any kind of terminator or illegal byte has been
read. The decoded bytes are stored in valueRef.
@param src source of encoded data
@param srcOffset offset into encoded data
@param valueRef decoded byte array is stored in ele... | [
"Decodes",
"the",
"given",
"byte",
"array",
"as",
"originally",
"encoded",
"for",
"ascending",
"order",
".",
"The",
"decoding",
"stops",
"when",
"any",
"kind",
"of",
"terminator",
"or",
"illegal",
"byte",
"has",
"been",
"read",
".",
"The",
"decoded",
"bytes"... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L599-L607 |
8,043 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java | UnionQueryExecutor.getFilter | public Filter<S> getFilter() {
Filter<S> filter = null;
for (QueryExecutor<S> executor : mExecutors) {
Filter<S> subFilter = executor.getFilter();
filter = filter == null ? subFilter : filter.or(subFilter);
}
return filter;
} | java | public Filter<S> getFilter() {
Filter<S> filter = null;
for (QueryExecutor<S> executor : mExecutors) {
Filter<S> subFilter = executor.getFilter();
filter = filter == null ? subFilter : filter.or(subFilter);
}
return filter;
} | [
"public",
"Filter",
"<",
"S",
">",
"getFilter",
"(",
")",
"{",
"Filter",
"<",
"S",
">",
"filter",
"=",
"null",
";",
"for",
"(",
"QueryExecutor",
"<",
"S",
">",
"executor",
":",
"mExecutors",
")",
"{",
"Filter",
"<",
"S",
">",
"subFilter",
"=",
"exe... | Returns the combined filter of the wrapped executors. | [
"Returns",
"the",
"combined",
"filter",
"of",
"the",
"wrapped",
"executors",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java#L119-L126 |
8,044 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java | UnionQueryExecutor.printNative | @Override
public boolean printNative(Appendable app, int indentLevel, FilterValues<S> values)
throws IOException
{
boolean result = false;
for (QueryExecutor<S> executor : mExecutors) {
result |= executor.printNative(app, indentLevel, values);
}
return... | java | @Override
public boolean printNative(Appendable app, int indentLevel, FilterValues<S> values)
throws IOException
{
boolean result = false;
for (QueryExecutor<S> executor : mExecutors) {
result |= executor.printNative(app, indentLevel, values);
}
return... | [
"@",
"Override",
"public",
"boolean",
"printNative",
"(",
"Appendable",
"app",
",",
"int",
"indentLevel",
",",
"FilterValues",
"<",
"S",
">",
"values",
")",
"throws",
"IOException",
"{",
"boolean",
"result",
"=",
"false",
";",
"for",
"(",
"QueryExecutor",
"<... | Prints native queries of the wrapped executors. | [
"Prints",
"native",
"queries",
"of",
"the",
"wrapped",
"executors",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java#L135-L144 |
8,045 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIndex.java | StorableIndex.parseNameDescriptor | @SuppressWarnings("unchecked")
public static <S extends Storable> StorableIndex<S> parseNameDescriptor
(String desc, StorableInfo<S> info)
throws IllegalArgumentException
{
String name = info.getStorableType().getName();
if (!desc.startsWith(name)) {
throw new ... | java | @SuppressWarnings("unchecked")
public static <S extends Storable> StorableIndex<S> parseNameDescriptor
(String desc, StorableInfo<S> info)
throws IllegalArgumentException
{
String name = info.getStorableType().getName();
if (!desc.startsWith(name)) {
throw new ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"S",
"extends",
"Storable",
">",
"StorableIndex",
"<",
"S",
">",
"parseNameDescriptor",
"(",
"String",
"desc",
",",
"StorableInfo",
"<",
"S",
">",
"info",
")",
"throws",
"IllegalArgum... | Parses an index descriptor and returns an index object.
@param desc name descriptor, as created by {@link #getNameDescriptor}
@param info info on storable type
@return index represented by descriptor
@throws IllegalArgumentException if error in descriptor syntax or if it
refers to unknown properties | [
"Parses",
"an",
"index",
"descriptor",
"and",
"returns",
"an",
"index",
"object",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L51-L126 |
8,046 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIndex.java | StorableIndex.nextSep | private static int nextSep(String desc, int pos) {
int pos2 = desc.length(); // assume we'll find none
int candidate = desc.indexOf('+', pos);
if (candidate > 0) {
pos2=candidate;
}
candidate = desc.indexOf('-', pos);
if (candidate>0) {
... | java | private static int nextSep(String desc, int pos) {
int pos2 = desc.length(); // assume we'll find none
int candidate = desc.indexOf('+', pos);
if (candidate > 0) {
pos2=candidate;
}
candidate = desc.indexOf('-', pos);
if (candidate>0) {
... | [
"private",
"static",
"int",
"nextSep",
"(",
"String",
"desc",
",",
"int",
"pos",
")",
"{",
"int",
"pos2",
"=",
"desc",
".",
"length",
"(",
")",
";",
"// assume we'll find none\r",
"int",
"candidate",
"=",
"desc",
".",
"indexOf",
"(",
"'",
"'",
",",
"po... | Find the first subsequent occurrance of '+', '-', or '~' in the string
or the end of line if none are there
@param desc string to search
@param pos starting position in string
@return position of next separator, or end of string if none present | [
"Find",
"the",
"first",
"subsequent",
"occurrance",
"of",
"+",
"-",
"or",
"~",
"in",
"the",
"string",
"or",
"the",
"end",
"of",
"line",
"if",
"none",
"are",
"there"
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L135-L152 |
8,047 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIndex.java | StorableIndex.getOrderedProperty | public OrderedProperty<S> getOrderedProperty(int index) {
return OrderedProperty.get(mProperties[index], mDirections[index]);
} | java | public OrderedProperty<S> getOrderedProperty(int index) {
return OrderedProperty.get(mProperties[index], mDirections[index]);
} | [
"public",
"OrderedProperty",
"<",
"S",
">",
"getOrderedProperty",
"(",
"int",
"index",
")",
"{",
"return",
"OrderedProperty",
".",
"get",
"(",
"mProperties",
"[",
"index",
"]",
",",
"mDirections",
"[",
"index",
"]",
")",
";",
"}"
] | Returns a specific property in this index, with the direction folded in. | [
"Returns",
"a",
"specific",
"property",
"in",
"this",
"index",
"with",
"the",
"direction",
"folded",
"in",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L388-L390 |
8,048 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIndex.java | StorableIndex.getOrderedProperties | @SuppressWarnings("unchecked")
public OrderedProperty<S>[] getOrderedProperties() {
OrderedProperty<S>[] ordered = new OrderedProperty[mProperties.length];
for (int i=mProperties.length; --i>=0; ) {
ordered[i] = OrderedProperty.get(mProperties[i], mDirections[i]);
}
... | java | @SuppressWarnings("unchecked")
public OrderedProperty<S>[] getOrderedProperties() {
OrderedProperty<S>[] ordered = new OrderedProperty[mProperties.length];
for (int i=mProperties.length; --i>=0; ) {
ordered[i] = OrderedProperty.get(mProperties[i], mDirections[i]);
}
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"OrderedProperty",
"<",
"S",
">",
"[",
"]",
"getOrderedProperties",
"(",
")",
"{",
"OrderedProperty",
"<",
"S",
">",
"[",
"]",
"ordered",
"=",
"new",
"OrderedProperty",
"[",
"mProperties",
".",
"l... | Returns a new array with all the properties in it, with directions
folded in. | [
"Returns",
"a",
"new",
"array",
"with",
"all",
"the",
"properties",
"in",
"it",
"with",
"directions",
"folded",
"in",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L396-L403 |
8,049 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIndex.java | StorableIndex.unique | public StorableIndex<S> unique(boolean unique) {
if (unique == mUnique) {
return this;
}
return new StorableIndex<S>(mProperties, mDirections, unique, mClustered, false);
} | java | public StorableIndex<S> unique(boolean unique) {
if (unique == mUnique) {
return this;
}
return new StorableIndex<S>(mProperties, mDirections, unique, mClustered, false);
} | [
"public",
"StorableIndex",
"<",
"S",
">",
"unique",
"(",
"boolean",
"unique",
")",
"{",
"if",
"(",
"unique",
"==",
"mUnique",
")",
"{",
"return",
"this",
";",
"}",
"return",
"new",
"StorableIndex",
"<",
"S",
">",
"(",
"mProperties",
",",
"mDirections",
... | Returns a StorableIndex instance which is unique or not. | [
"Returns",
"a",
"StorableIndex",
"instance",
"which",
"is",
"unique",
"or",
"not",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L420-L425 |
8,050 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIndex.java | StorableIndex.clustered | public StorableIndex<S> clustered(boolean clustered) {
if (clustered == mClustered) {
return this;
}
return new StorableIndex<S>(mProperties, mDirections, mUnique, clustered, false);
} | java | public StorableIndex<S> clustered(boolean clustered) {
if (clustered == mClustered) {
return this;
}
return new StorableIndex<S>(mProperties, mDirections, mUnique, clustered, false);
} | [
"public",
"StorableIndex",
"<",
"S",
">",
"clustered",
"(",
"boolean",
"clustered",
")",
"{",
"if",
"(",
"clustered",
"==",
"mClustered",
")",
"{",
"return",
"this",
";",
"}",
"return",
"new",
"StorableIndex",
"<",
"S",
">",
"(",
"mProperties",
",",
"mDi... | Returns a StorableIndex instance which is clustered or not. | [
"Returns",
"a",
"StorableIndex",
"instance",
"which",
"is",
"clustered",
"or",
"not",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L430-L435 |
8,051 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIndex.java | StorableIndex.reverse | public StorableIndex<S> reverse() {
Direction[] directions = mDirections;
specified: {
for (int i=directions.length; --i>=0; ) {
if (directions[i] != Direction.UNSPECIFIED) {
break specified;
}
}
// Complet... | java | public StorableIndex<S> reverse() {
Direction[] directions = mDirections;
specified: {
for (int i=directions.length; --i>=0; ) {
if (directions[i] != Direction.UNSPECIFIED) {
break specified;
}
}
// Complet... | [
"public",
"StorableIndex",
"<",
"S",
">",
"reverse",
"(",
")",
"{",
"Direction",
"[",
"]",
"directions",
"=",
"mDirections",
";",
"specified",
":",
"{",
"for",
"(",
"int",
"i",
"=",
"directions",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
... | Returns a StorableIndex instance with all the properties reversed. | [
"Returns",
"a",
"StorableIndex",
"instance",
"with",
"all",
"the",
"properties",
"reversed",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L440-L459 |
8,052 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIndex.java | StorableIndex.setDefaultDirection | public StorableIndex<S> setDefaultDirection(Direction direction) {
Direction[] directions = mDirections;
unspecified: {
for (int i=directions.length; --i>=0; ) {
if (directions[i] == Direction.UNSPECIFIED) {
break unspecified;
}
... | java | public StorableIndex<S> setDefaultDirection(Direction direction) {
Direction[] directions = mDirections;
unspecified: {
for (int i=directions.length; --i>=0; ) {
if (directions[i] == Direction.UNSPECIFIED) {
break unspecified;
}
... | [
"public",
"StorableIndex",
"<",
"S",
">",
"setDefaultDirection",
"(",
"Direction",
"direction",
")",
"{",
"Direction",
"[",
"]",
"directions",
"=",
"mDirections",
";",
"unspecified",
":",
"{",
"for",
"(",
"int",
"i",
"=",
"directions",
".",
"length",
";",
... | Returns a StorableIndex instance with all unspecified directions set to
the given direction. Returns this if all directions are already
specified.
@param direction direction to replace all unspecified directions | [
"Returns",
"a",
"StorableIndex",
"instance",
"with",
"all",
"unspecified",
"directions",
"set",
"to",
"the",
"given",
"direction",
".",
"Returns",
"this",
"if",
"all",
"directions",
"are",
"already",
"specified",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L468-L489 |
8,053 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIndex.java | StorableIndex.uniquify | public StorableIndex<S> uniquify(StorableKey<S> key) {
if (key == null) {
throw new IllegalArgumentException();
}
if (isUnique()) {
return this;
}
StorableIndex<S> index = this;
for (OrderedProperty<S> keyProp : key.getProperties()) {... | java | public StorableIndex<S> uniquify(StorableKey<S> key) {
if (key == null) {
throw new IllegalArgumentException();
}
if (isUnique()) {
return this;
}
StorableIndex<S> index = this;
for (OrderedProperty<S> keyProp : key.getProperties()) {... | [
"public",
"StorableIndex",
"<",
"S",
">",
"uniquify",
"(",
"StorableKey",
"<",
"S",
">",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"isUnique",
"(",
")",
")",
... | Returns a StorableIndex which is unique, possibly by appending
properties from the given key. If index is already unique, it is
returned as-is. | [
"Returns",
"a",
"StorableIndex",
"which",
"is",
"unique",
"possibly",
"by",
"appending",
"properties",
"from",
"the",
"given",
"key",
".",
"If",
"index",
"is",
"already",
"unique",
"it",
"is",
"returned",
"as",
"-",
"is",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L524-L541 |
8,054 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIndex.java | StorableIndex.getTypeDescriptor | public String getTypeDescriptor() {
StringBuilder b = new StringBuilder();
int count = getPropertyCount();
for (int i=0; i<count; i++) {
StorableProperty property = getProperty(i);
if (property.isNullable()) {
b.append('N');
}
... | java | public String getTypeDescriptor() {
StringBuilder b = new StringBuilder();
int count = getPropertyCount();
for (int i=0; i<count; i++) {
StorableProperty property = getProperty(i);
if (property.isNullable()) {
b.append('N');
}
... | [
"public",
"String",
"getTypeDescriptor",
"(",
")",
"{",
"StringBuilder",
"b",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"count",
"=",
"getPropertyCount",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"i",
"++"... | Converts this index into a parseable type descriptor string, which
basically consists of Java type descriptors appended together. There is
one slight difference. Types which may be null are prefixed with a 'N'
character. | [
"Converts",
"this",
"index",
"into",
"a",
"parseable",
"type",
"descriptor",
"string",
"which",
"basically",
"consists",
"of",
"Java",
"type",
"descriptors",
"appended",
"together",
".",
"There",
"is",
"one",
"slight",
"difference",
".",
"Types",
"which",
"may",... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L576-L589 |
8,055 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIndex.java | StorableIndex.appendTo | public void appendTo(Appendable app) throws IOException {
app.append("{properties=[");
int length = mProperties.length;
for (int i=0; i<length; i++) {
if (i > 0) {
app.append(", ");
}
app.append(mDirections[i].toCharacter());
... | java | public void appendTo(Appendable app) throws IOException {
app.append("{properties=[");
int length = mProperties.length;
for (int i=0; i<length; i++) {
if (i > 0) {
app.append(", ");
}
app.append(mDirections[i].toCharacter());
... | [
"public",
"void",
"appendTo",
"(",
"Appendable",
"app",
")",
"throws",
"IOException",
"{",
"app",
".",
"append",
"(",
"\"{properties=[\"",
")",
";",
"int",
"length",
"=",
"mProperties",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<... | Appends the same results as toString, but without the "StorableIndex"
prefix. | [
"Appends",
"the",
"same",
"results",
"as",
"toString",
"but",
"without",
"the",
"StorableIndex",
"prefix",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L629-L643 |
8,056 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/EditText.java | EditText.obtainMaxNumberOfCharacters | private void obtainMaxNumberOfCharacters(@NonNull final TypedArray typedArray) {
setMaxNumberOfCharacters(typedArray.getInt(R.styleable.EditText_maxNumberOfCharacters,
DEFAULT_MAX_NUMBER_OF_CHARACTERS));
} | java | private void obtainMaxNumberOfCharacters(@NonNull final TypedArray typedArray) {
setMaxNumberOfCharacters(typedArray.getInt(R.styleable.EditText_maxNumberOfCharacters,
DEFAULT_MAX_NUMBER_OF_CHARACTERS));
} | [
"private",
"void",
"obtainMaxNumberOfCharacters",
"(",
"@",
"NonNull",
"final",
"TypedArray",
"typedArray",
")",
"{",
"setMaxNumberOfCharacters",
"(",
"typedArray",
".",
"getInt",
"(",
"R",
".",
"styleable",
".",
"EditText_maxNumberOfCharacters",
",",
"DEFAULT_MAX_NUMBE... | Obtains the maximum number of characters, the edit text should be allowed to contain, from a
specific typed array.
@param typedArray
The typed array, the maximum number of characters, the edit text should be allowed to
contain, should be obtained from, as an instance of the class {@link TypedArray}. The
typed array ma... | [
"Obtains",
"the",
"maximum",
"number",
"of",
"characters",
"the",
"edit",
"text",
"should",
"be",
"allowed",
"to",
"contain",
"from",
"a",
"specific",
"typed",
"array",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/EditText.java#L236-L239 |
8,057 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/EditText.java | EditText.createTextChangeListener | private TextWatcher createTextChangeListener() {
return new TextWatcher() {
@Override
public final void beforeTextChanged(final CharSequence s, final int start,
final int count, final int after) {
}
@Override
... | java | private TextWatcher createTextChangeListener() {
return new TextWatcher() {
@Override
public final void beforeTextChanged(final CharSequence s, final int start,
final int count, final int after) {
}
@Override
... | [
"private",
"TextWatcher",
"createTextChangeListener",
"(",
")",
"{",
"return",
"new",
"TextWatcher",
"(",
")",
"{",
"@",
"Override",
"public",
"final",
"void",
"beforeTextChanged",
"(",
"final",
"CharSequence",
"s",
",",
"final",
"int",
"start",
",",
"final",
... | Creates and returns a listener, which allows to validate the value of the view, when its text
has been changed.
@return The listener, which has been created, as an instance of the type {@link TextWatcher} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"validate",
"the",
"value",
"of",
"the",
"view",
"when",
"its",
"text",
"has",
"been",
"changed",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/EditText.java#L467-L492 |
8,058 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/EditText.java | EditText.getMaxNumberOfCharactersMessage | private CharSequence getMaxNumberOfCharactersMessage() {
int maxLength = getMaxNumberOfCharacters();
int currentLength = getView().length();
return String
.format(getResources().getString(R.string.edit_text_size_violation_error_message),
currentLength, max... | java | private CharSequence getMaxNumberOfCharactersMessage() {
int maxLength = getMaxNumberOfCharacters();
int currentLength = getView().length();
return String
.format(getResources().getString(R.string.edit_text_size_violation_error_message),
currentLength, max... | [
"private",
"CharSequence",
"getMaxNumberOfCharactersMessage",
"(",
")",
"{",
"int",
"maxLength",
"=",
"getMaxNumberOfCharacters",
"(",
")",
";",
"int",
"currentLength",
"=",
"getView",
"(",
")",
".",
"length",
"(",
")",
";",
"return",
"String",
".",
"format",
... | Returns the message, which shows how many characters, in relation to the maximum number of
characters, the edit text is allowed to contain, have already been entered.
@return The message, which shows how many characters, in relation to the maximum number of
characters, the edit text is allowed to contain, have already... | [
"Returns",
"the",
"message",
"which",
"shows",
"how",
"many",
"characters",
"in",
"relation",
"to",
"the",
"maximum",
"number",
"of",
"characters",
"the",
"edit",
"text",
"is",
"allowed",
"to",
"contain",
"have",
"already",
"been",
"entered",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/EditText.java#L502-L508 |
8,059 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/EditText.java | EditText.setMaxNumberOfCharacters | public final void setMaxNumberOfCharacters(final int maxNumberOfCharacters) {
if (maxNumberOfCharacters != -1) {
Condition.INSTANCE.ensureAtLeast(maxNumberOfCharacters, 1,
"The maximum number of characters must be at least 1");
}
this.maxNumberOfCharacters = maxN... | java | public final void setMaxNumberOfCharacters(final int maxNumberOfCharacters) {
if (maxNumberOfCharacters != -1) {
Condition.INSTANCE.ensureAtLeast(maxNumberOfCharacters, 1,
"The maximum number of characters must be at least 1");
}
this.maxNumberOfCharacters = maxN... | [
"public",
"final",
"void",
"setMaxNumberOfCharacters",
"(",
"final",
"int",
"maxNumberOfCharacters",
")",
"{",
"if",
"(",
"maxNumberOfCharacters",
"!=",
"-",
"1",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureAtLeast",
"(",
"maxNumberOfCharacters",
",",
"1",... | Sets the maximum number of characters, the edit text should be allowed to contain.
@param maxNumberOfCharacters
The maximum number of characters, which should be set, as an {@link Integer} value.
The maximum number of characters must be at least 1 or -1, if the number of
characters should not be restricted | [
"Sets",
"the",
"maximum",
"number",
"of",
"characters",
"the",
"edit",
"text",
"should",
"be",
"allowed",
"to",
"contain",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/EditText.java#L653-L661 |
8,060 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceAccess.java | SyntheticStorableReferenceAccess.copyToMasterPrimaryKey | public void copyToMasterPrimaryKey(Storable reference, S master) throws FetchException {
try {
mCopyToMasterPkMethod.invoke(reference, master);
} catch (Exception e) {
ThrowUnchecked.fireFirstDeclaredCause(e, FetchException.class);
}
} | java | public void copyToMasterPrimaryKey(Storable reference, S master) throws FetchException {
try {
mCopyToMasterPkMethod.invoke(reference, master);
} catch (Exception e) {
ThrowUnchecked.fireFirstDeclaredCause(e, FetchException.class);
}
} | [
"public",
"void",
"copyToMasterPrimaryKey",
"(",
"Storable",
"reference",
",",
"S",
"master",
")",
"throws",
"FetchException",
"{",
"try",
"{",
"mCopyToMasterPkMethod",
".",
"invoke",
"(",
"reference",
",",
"master",
")",
";",
"}",
"catch",
"(",
"Exception",
"... | Sets all the primary key properties of the given master, using the
applicable properties of the given reference.
@param reference source of property values
@param master master whose primary key properties will be set | [
"Sets",
"all",
"the",
"primary",
"key",
"properties",
"of",
"the",
"given",
"master",
"using",
"the",
"applicable",
"properties",
"of",
"the",
"given",
"reference",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceAccess.java#L113-L119 |
8,061 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceAccess.java | SyntheticStorableReferenceAccess.copyFromMaster | public void copyFromMaster(Storable reference, S master) throws FetchException {
try {
mCopyFromMasterMethod.invoke(reference, master);
} catch (Exception e) {
ThrowUnchecked.fireFirstDeclaredCause(e, FetchException.class);
}
} | java | public void copyFromMaster(Storable reference, S master) throws FetchException {
try {
mCopyFromMasterMethod.invoke(reference, master);
} catch (Exception e) {
ThrowUnchecked.fireFirstDeclaredCause(e, FetchException.class);
}
} | [
"public",
"void",
"copyFromMaster",
"(",
"Storable",
"reference",
",",
"S",
"master",
")",
"throws",
"FetchException",
"{",
"try",
"{",
"mCopyFromMasterMethod",
".",
"invoke",
"(",
"reference",
",",
"master",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")... | Sets all the properties of the given reference, using the applicable
properties of the given master.
@param reference reference whose properties will be set
@param master source of property values | [
"Sets",
"all",
"the",
"properties",
"of",
"the",
"given",
"reference",
"using",
"the",
"applicable",
"properties",
"of",
"the",
"given",
"master",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceAccess.java#L128-L134 |
8,062 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceAccess.java | SyntheticStorableReferenceAccess.isConsistent | public boolean isConsistent(Storable reference, S master) throws FetchException {
try {
return (Boolean) mIsConsistentMethod.invoke(reference, master);
} catch (Exception e) {
ThrowUnchecked.fireFirstDeclaredCause(e, FetchException.class);
// Not reached.
... | java | public boolean isConsistent(Storable reference, S master) throws FetchException {
try {
return (Boolean) mIsConsistentMethod.invoke(reference, master);
} catch (Exception e) {
ThrowUnchecked.fireFirstDeclaredCause(e, FetchException.class);
// Not reached.
... | [
"public",
"boolean",
"isConsistent",
"(",
"Storable",
"reference",
",",
"S",
"master",
")",
"throws",
"FetchException",
"{",
"try",
"{",
"return",
"(",
"Boolean",
")",
"mIsConsistentMethod",
".",
"invoke",
"(",
"reference",
",",
"master",
")",
";",
"}",
"cat... | Returns true if the properties of the given reference match those
contained in the master, excluding any version property. This will
always return true after a call to copyFromMaster.
@param reference reference whose properties will be tested
@param master source of property values | [
"Returns",
"true",
"if",
"the",
"properties",
"of",
"the",
"given",
"reference",
"match",
"those",
"contained",
"in",
"the",
"master",
"excluding",
"any",
"version",
"property",
".",
"This",
"will",
"always",
"return",
"true",
"after",
"a",
"call",
"to",
"co... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableReferenceAccess.java#L144-L152 |
8,063 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/OrderedProperty.java | OrderedProperty.parse | public static <S extends Storable> OrderedProperty<S> parse(StorableInfo<S> info,
String str)
throws IllegalArgumentException
{
return parse(info, str, Direction.ASCENDING);
} | java | public static <S extends Storable> OrderedProperty<S> parse(StorableInfo<S> info,
String str)
throws IllegalArgumentException
{
return parse(info, str, Direction.ASCENDING);
} | [
"public",
"static",
"<",
"S",
"extends",
"Storable",
">",
"OrderedProperty",
"<",
"S",
">",
"parse",
"(",
"StorableInfo",
"<",
"S",
">",
"info",
",",
"String",
"str",
")",
"throws",
"IllegalArgumentException",
"{",
"return",
"parse",
"(",
"info",
",",
"str... | Parses an ordering property, which may start with a '+' or '-' to
indicate direction. Prefix of '~' indicates unspecified direction. If
ordering prefix not specified, default direction is ascending.
@param info Info for Storable type containing property
@param str string to parse
@throws IllegalArgumentException if an... | [
"Parses",
"an",
"ordering",
"property",
"which",
"may",
"start",
"with",
"a",
"+",
"or",
"-",
"to",
"indicate",
"direction",
".",
"Prefix",
"of",
"~",
"indicates",
"unspecified",
"direction",
".",
"If",
"ordering",
"prefix",
"not",
"specified",
"default",
"d... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/OrderedProperty.java#L70-L75 |
8,064 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/OrderedProperty.java | OrderedProperty.parse | public static <S extends Storable> OrderedProperty<S> parse(StorableInfo<S> info,
String str,
Direction defaultDirection)
throws IllegalArgumentException
{
if (info ==... | java | public static <S extends Storable> OrderedProperty<S> parse(StorableInfo<S> info,
String str,
Direction defaultDirection)
throws IllegalArgumentException
{
if (info ==... | [
"public",
"static",
"<",
"S",
"extends",
"Storable",
">",
"OrderedProperty",
"<",
"S",
">",
"parse",
"(",
"StorableInfo",
"<",
"S",
">",
"info",
",",
"String",
"str",
",",
"Direction",
"defaultDirection",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
... | Parses an ordering property, which may start with a '+' or '-' to
indicate direction. Prefix of '~' indicates unspecified direction.
@param info Info for Storable type containing property
@param str string to parse
@param defaultDirection default direction if not specified in
string. If null, ascending order is defaul... | [
"Parses",
"an",
"ordering",
"property",
"which",
"may",
"start",
"with",
"a",
"+",
"or",
"-",
"to",
"indicate",
"direction",
".",
"Prefix",
"of",
"~",
"indicates",
"unspecified",
"direction",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/OrderedProperty.java#L88-L113 |
8,065 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticProperty.java | SyntheticProperty.addAccessorAnnotationDescriptor | public void addAccessorAnnotationDescriptor(String annotationDesc) {
if (mAnnotationDescs == null) {
mAnnotationDescs = new ArrayList<String>(4);
}
mAnnotationDescs.add(annotationDesc);
} | java | public void addAccessorAnnotationDescriptor(String annotationDesc) {
if (mAnnotationDescs == null) {
mAnnotationDescs = new ArrayList<String>(4);
}
mAnnotationDescs.add(annotationDesc);
} | [
"public",
"void",
"addAccessorAnnotationDescriptor",
"(",
"String",
"annotationDesc",
")",
"{",
"if",
"(",
"mAnnotationDescs",
"==",
"null",
")",
"{",
"mAnnotationDescs",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"4",
")",
";",
"}",
"mAnnotationDescs",
... | Add an arbitrary annotation to the property accessor method, as
specified by a descriptor.
@see com.amazon.carbonado.util.AnnotationDescPrinter | [
"Add",
"an",
"arbitrary",
"annotation",
"to",
"the",
"property",
"accessor",
"method",
"as",
"specified",
"by",
"a",
"descriptor",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticProperty.java#L193-L198 |
8,066 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/synthetic/SyntheticProperty.java | SyntheticProperty.getAccessorAnnotationDescriptors | public List<String> getAccessorAnnotationDescriptors() {
if (mAnnotationDescs == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(mAnnotationDescs);
} | java | public List<String> getAccessorAnnotationDescriptors() {
if (mAnnotationDescs == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(mAnnotationDescs);
} | [
"public",
"List",
"<",
"String",
">",
"getAccessorAnnotationDescriptors",
"(",
")",
"{",
"if",
"(",
"mAnnotationDescs",
"==",
"null",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"return",
"Collections",
".",
"unmodifiableList",
"("... | Returns all the added accessor annotation descriptors in an unmodifiable list. | [
"Returns",
"all",
"the",
"added",
"accessor",
"annotation",
"descriptors",
"in",
"an",
"unmodifiable",
"list",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/synthetic/SyntheticProperty.java#L203-L208 |
8,067 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/txn/TransactionManager.java | TransactionManager.localScope | public TransactionScope<Txn> localScope() {
TransactionScope<Txn> scope = mLocalScope.get();
if (scope == null) {
int state;
synchronized (this) {
state = mState;
scope = new TransactionScope<Txn>(this, state != OPEN);
mAllSc... | java | public TransactionScope<Txn> localScope() {
TransactionScope<Txn> scope = mLocalScope.get();
if (scope == null) {
int state;
synchronized (this) {
state = mState;
scope = new TransactionScope<Txn>(this, state != OPEN);
mAllSc... | [
"public",
"TransactionScope",
"<",
"Txn",
">",
"localScope",
"(",
")",
"{",
"TransactionScope",
"<",
"Txn",
">",
"scope",
"=",
"mLocalScope",
".",
"get",
"(",
")",
";",
"if",
"(",
"scope",
"==",
"null",
")",
"{",
"int",
"state",
";",
"synchronized",
"(... | Returns the thread-local TransactionScope, creating it if needed. | [
"Returns",
"the",
"thread",
"-",
"local",
"TransactionScope",
"creating",
"it",
"if",
"needed",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/txn/TransactionManager.java#L59-L75 |
8,068 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/txn/TransactionManager.java | TransactionManager.close | public synchronized void close(boolean suspend) throws RepositoryException {
if (mState == SUSPENDED) {
// If suspended, attempting to close again will likely deadlock.
return;
}
if (suspend) {
for (TransactionScope<?> scope : mAllScopes.keySet()) {
... | java | public synchronized void close(boolean suspend) throws RepositoryException {
if (mState == SUSPENDED) {
// If suspended, attempting to close again will likely deadlock.
return;
}
if (suspend) {
for (TransactionScope<?> scope : mAllScopes.keySet()) {
... | [
"public",
"synchronized",
"void",
"close",
"(",
"boolean",
"suspend",
")",
"throws",
"RepositoryException",
"{",
"if",
"(",
"mState",
"==",
"SUSPENDED",
")",
"{",
"// If suspended, attempting to close again will likely deadlock.\r",
"return",
";",
"}",
"if",
"(",
"sus... | Closes all transaction scopes. Should be called only when repository is
closed.
@param suspend when true, indefinitely suspend all threads interacting
with transactions | [
"Closes",
"all",
"transaction",
"scopes",
".",
"Should",
"be",
"called",
"only",
"when",
"repository",
"is",
"closed",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/txn/TransactionManager.java#L140-L163 |
8,069 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java | JDBCStorableIntrospector.examine | @SuppressWarnings("unchecked")
public static <S extends Storable> JDBCStorableInfo<S> examine
(Class<S> type, DataSource ds, String catalog, String schema)
throws SQLException, SupportException
{
return examine(type, ds, catalog, schema, null, false);
} | java | @SuppressWarnings("unchecked")
public static <S extends Storable> JDBCStorableInfo<S> examine
(Class<S> type, DataSource ds, String catalog, String schema)
throws SQLException, SupportException
{
return examine(type, ds, catalog, schema, null, false);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"S",
"extends",
"Storable",
">",
"JDBCStorableInfo",
"<",
"S",
">",
"examine",
"(",
"Class",
"<",
"S",
">",
"type",
",",
"DataSource",
"ds",
",",
"String",
"catalog",
",",
"String... | Examines the given class and returns a JDBCStorableInfo describing it. A
MalformedTypeException is thrown for a variety of reasons if the given
class is not a well-defined Storable type or if it can't match up with
an entity in the external database.
@param type Storable type to examine
@param ds source of JDBC connec... | [
"Examines",
"the",
"given",
"class",
"and",
"returns",
"a",
"JDBCStorableInfo",
"describing",
"it",
".",
"A",
"MalformedTypeException",
"is",
"thrown",
"for",
"a",
"variety",
"of",
"reasons",
"if",
"the",
"given",
"class",
"is",
"not",
"a",
"well",
"-",
"def... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java#L102-L108 |
8,070 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java | JDBCStorableIntrospector.getAccessInfo | private static AccessInfo getAccessInfo
(StorableProperty property,
int dataType, String dataTypeName, int columnSize, int decimalDigits)
{
AccessInfo info = getAccessInfo
(property.getType(), dataType, dataTypeName, columnSize, decimalDigits);
if (info != null) {
... | java | private static AccessInfo getAccessInfo
(StorableProperty property,
int dataType, String dataTypeName, int columnSize, int decimalDigits)
{
AccessInfo info = getAccessInfo
(property.getType(), dataType, dataTypeName, columnSize, decimalDigits);
if (info != null) {
... | [
"private",
"static",
"AccessInfo",
"getAccessInfo",
"(",
"StorableProperty",
"property",
",",
"int",
"dataType",
",",
"String",
"dataTypeName",
",",
"int",
"columnSize",
",",
"int",
"decimalDigits",
")",
"{",
"AccessInfo",
"info",
"=",
"getAccessInfo",
"(",
"prope... | Figures out how to best access the given property, or returns null if
not supported. An adapter may be applied.
@return null if not supported | [
"Figures",
"out",
"how",
"to",
"best",
"access",
"the",
"given",
"property",
"or",
"returns",
"null",
"if",
"not",
"supported",
".",
"An",
"adapter",
"may",
"be",
"applied",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java#L592-L636 |
8,071 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java | JDBCStorableIntrospector.appendToSentence | private static void appendToSentence(StringBuilder buf, String[] names) {
for (int i=0; i<names.length; i++) {
if (i > 0) {
if (i + 1 >= names.length) {
buf.append(" or ");
} else {
buf.append(", ");
}
... | java | private static void appendToSentence(StringBuilder buf, String[] names) {
for (int i=0; i<names.length; i++) {
if (i > 0) {
if (i + 1 >= names.length) {
buf.append(" or ");
} else {
buf.append(", ");
}
... | [
"private",
"static",
"void",
"appendToSentence",
"(",
"StringBuilder",
"buf",
",",
"String",
"[",
"]",
"names",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"names",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",... | Appends words to a sentence as an "or" list. | [
"Appends",
"words",
"to",
"a",
"sentence",
"as",
"an",
"or",
"list",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java#L878-L891 |
8,072 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java | JDBCStorableIntrospector.generateAliases | static String[] generateAliases(String base) {
int length = base.length();
if (length <= 1) {
return new String[]{base.toUpperCase(), base.toLowerCase()};
}
ArrayList<String> aliases = new ArrayList<String>(4);
StringBuilder buf = new StringBuilder();
... | java | static String[] generateAliases(String base) {
int length = base.length();
if (length <= 1) {
return new String[]{base.toUpperCase(), base.toLowerCase()};
}
ArrayList<String> aliases = new ArrayList<String>(4);
StringBuilder buf = new StringBuilder();
... | [
"static",
"String",
"[",
"]",
"generateAliases",
"(",
"String",
"base",
")",
"{",
"int",
"length",
"=",
"base",
".",
"length",
"(",
")",
";",
"if",
"(",
"length",
"<=",
"1",
")",
"{",
"return",
"new",
"String",
"[",
"]",
"{",
"base",
".",
"toUpperC... | Generates aliases for the given name, converting camel case form into
various underscore forms. | [
"Generates",
"aliases",
"for",
"the",
"given",
"name",
"converting",
"camel",
"case",
"form",
"into",
"various",
"underscore",
"forms",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableIntrospector.java#L897-L954 |
8,073 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/QueryHints.java | QueryHints.with | public QueryHints with(QueryHint hint, Object value) {
if (hint == null) {
throw new IllegalArgumentException("Null hint");
}
if (value == null) {
throw new IllegalArgumentException("Null value");
}
EnumMap<QueryHint, Object> map;
if (mMap ... | java | public QueryHints with(QueryHint hint, Object value) {
if (hint == null) {
throw new IllegalArgumentException("Null hint");
}
if (value == null) {
throw new IllegalArgumentException("Null value");
}
EnumMap<QueryHint, Object> map;
if (mMap ... | [
"public",
"QueryHints",
"with",
"(",
"QueryHint",
"hint",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"hint",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Null hint\"",
")",
";",
"}",
"if",
"(",
"value",
"==",
"null",
")",... | Returns a new QueryHints object with the given hint and value.
@throws IllegalArgumentException if hint or value is null | [
"Returns",
"a",
"new",
"QueryHints",
"object",
"with",
"the",
"given",
"hint",
"and",
"value",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/QueryHints.java#L59-L74 |
8,074 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/QueryHints.java | QueryHints.without | public QueryHints without(QueryHint hint) {
if (hint == null || mMap == null || !mMap.containsKey(hint)) {
return this;
}
EnumMap<QueryHint, Object> map = mMap.clone();
map.remove(hint);
if (map.size() == 0) {
map = null;
}
return ... | java | public QueryHints without(QueryHint hint) {
if (hint == null || mMap == null || !mMap.containsKey(hint)) {
return this;
}
EnumMap<QueryHint, Object> map = mMap.clone();
map.remove(hint);
if (map.size() == 0) {
map = null;
}
return ... | [
"public",
"QueryHints",
"without",
"(",
"QueryHint",
"hint",
")",
"{",
"if",
"(",
"hint",
"==",
"null",
"||",
"mMap",
"==",
"null",
"||",
"!",
"mMap",
".",
"containsKey",
"(",
"hint",
")",
")",
"{",
"return",
"this",
";",
"}",
"EnumMap",
"<",
"QueryH... | Returns a new QueryHints object without the given hint. | [
"Returns",
"a",
"new",
"QueryHints",
"object",
"without",
"the",
"given",
"hint",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/QueryHints.java#L79-L89 |
8,075 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/QueryHints.java | QueryHints.get | public Object get(QueryHint hint) {
return hint == null ? null : (mMap == null ? null : mMap.get(hint));
} | java | public Object get(QueryHint hint) {
return hint == null ? null : (mMap == null ? null : mMap.get(hint));
} | [
"public",
"Object",
"get",
"(",
"QueryHint",
"hint",
")",
"{",
"return",
"hint",
"==",
"null",
"?",
"null",
":",
"(",
"mMap",
"==",
"null",
"?",
"null",
":",
"mMap",
".",
"get",
"(",
"hint",
")",
")",
";",
"}"
] | Returns null if hint is not provided. | [
"Returns",
"null",
"if",
"hint",
"is",
"not",
"provided",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/QueryHints.java#L101-L103 |
8,076 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/RawCursor.java | RawCursor.toNext | protected int toNext(int amount) throws FetchException {
if (amount <= 1) {
return (amount <= 0) ? 0 : (toNext() ? 1 : 0);
}
int count = 0;
disableKeyAndValue();
try {
while (amount > 0) {
if (toNext()) {
co... | java | protected int toNext(int amount) throws FetchException {
if (amount <= 1) {
return (amount <= 0) ? 0 : (toNext() ? 1 : 0);
}
int count = 0;
disableKeyAndValue();
try {
while (amount > 0) {
if (toNext()) {
co... | [
"protected",
"int",
"toNext",
"(",
"int",
"amount",
")",
"throws",
"FetchException",
"{",
"if",
"(",
"amount",
"<=",
"1",
")",
"{",
"return",
"(",
"amount",
"<=",
"0",
")",
"?",
"0",
":",
"(",
"toNext",
"(",
")",
"?",
"1",
":",
"0",
")",
";",
"... | Move the cursor to the next available entry, incrementing by the amount
given. The actual amount incremented is returned. If the amount is less
then requested, the cursor must be positioned after the last available
entry. Subclasses may wish to override this method with a faster
implementation.
<p>Calling to toNext(1)... | [
"Move",
"the",
"cursor",
"to",
"the",
"next",
"available",
"entry",
"incrementing",
"by",
"the",
"amount",
"given",
".",
"The",
"actual",
"amount",
"incremented",
"is",
"returned",
".",
"If",
"the",
"amount",
"is",
"less",
"then",
"requested",
"the",
"cursor... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/RawCursor.java#L353-L375 |
8,077 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/RawCursor.java | RawCursor.toNextKey | protected boolean toNextKey() throws FetchException {
byte[] initialKey = getCurrentKey();
if (initialKey == null) {
return false;
}
disableValue();
try {
while (true) {
if (toNext()) {
byte[] currentKey = get... | java | protected boolean toNextKey() throws FetchException {
byte[] initialKey = getCurrentKey();
if (initialKey == null) {
return false;
}
disableValue();
try {
while (true) {
if (toNext()) {
byte[] currentKey = get... | [
"protected",
"boolean",
"toNextKey",
"(",
")",
"throws",
"FetchException",
"{",
"byte",
"[",
"]",
"initialKey",
"=",
"getCurrentKey",
"(",
")",
";",
"if",
"(",
"initialKey",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"disableValue",
"(",
")",
"... | Move the cursor to the next unique key, returning false if none. If
false is returned, the cursor must be positioned after the last
available entry. Subclasses may wish to override this method with a
faster implementation.
@return true if moved to next unique key
@throws IllegalStateException if cursor is not opened | [
"Move",
"the",
"cursor",
"to",
"the",
"next",
"unique",
"key",
"returning",
"false",
"if",
"none",
".",
"If",
"false",
"is",
"returned",
"the",
"cursor",
"must",
"be",
"positioned",
"after",
"the",
"last",
"available",
"entry",
".",
"Subclasses",
"may",
"w... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/RawCursor.java#L386-L412 |
8,078 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/RawCursor.java | RawCursor.toPrevious | protected int toPrevious(int amount) throws FetchException {
if (amount <= 1) {
return (amount <= 0) ? 0 : (toPrevious() ? 1 : 0);
}
int count = 0;
disableKeyAndValue();
try {
while (amount > 0) {
if (toPrevious()) {
... | java | protected int toPrevious(int amount) throws FetchException {
if (amount <= 1) {
return (amount <= 0) ? 0 : (toPrevious() ? 1 : 0);
}
int count = 0;
disableKeyAndValue();
try {
while (amount > 0) {
if (toPrevious()) {
... | [
"protected",
"int",
"toPrevious",
"(",
"int",
"amount",
")",
"throws",
"FetchException",
"{",
"if",
"(",
"amount",
"<=",
"1",
")",
"{",
"return",
"(",
"amount",
"<=",
"0",
")",
"?",
"0",
":",
"(",
"toPrevious",
"(",
")",
"?",
"1",
":",
"0",
")",
... | Move the cursor to the previous available entry, decrementing by the
amount given. The actual amount decremented is returned. If the amount
is less then requested, the cursor must be positioned before the first
available entry. Subclasses may wish to override this method with a
faster implementation.
<p>Calling to toP... | [
"Move",
"the",
"cursor",
"to",
"the",
"previous",
"available",
"entry",
"decrementing",
"by",
"the",
"amount",
"given",
".",
"The",
"actual",
"amount",
"decremented",
"is",
"returned",
".",
"If",
"the",
"amount",
"is",
"less",
"then",
"requested",
"the",
"cu... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/RawCursor.java#L437-L459 |
8,079 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/RawCursor.java | RawCursor.toPreviousKey | protected boolean toPreviousKey() throws FetchException {
byte[] initialKey = getCurrentKey();
if (initialKey == null) {
return false;
}
disableValue();
try {
while (true) {
if (toPrevious()) {
byte[] currentK... | java | protected boolean toPreviousKey() throws FetchException {
byte[] initialKey = getCurrentKey();
if (initialKey == null) {
return false;
}
disableValue();
try {
while (true) {
if (toPrevious()) {
byte[] currentK... | [
"protected",
"boolean",
"toPreviousKey",
"(",
")",
"throws",
"FetchException",
"{",
"byte",
"[",
"]",
"initialKey",
"=",
"getCurrentKey",
"(",
")",
";",
"if",
"(",
"initialKey",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"disableValue",
"(",
")",... | Move the cursor to the previous unique key, returning false if none. If
false is returned, the cursor must be positioned before the first
available entry. Subclasses may wish to override this method with a
faster implementation.
@return true if moved to previous unique key
@throws IllegalStateException if cursor is no... | [
"Move",
"the",
"cursor",
"to",
"the",
"previous",
"unique",
"key",
"returning",
"false",
"if",
"none",
".",
"If",
"false",
"is",
"returned",
"the",
"cursor",
"must",
"be",
"positioned",
"before",
"the",
"first",
"available",
"entry",
".",
"Subclasses",
"may"... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/RawCursor.java#L470-L496 |
8,080 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/RawCursor.java | RawCursor.toBoundedFirst | private boolean toBoundedFirst() throws FetchException {
if (mStartBound == null) {
if (!toFirst()) {
return false;
}
} else {
if (!toFirst(mStartBound.clone())) {
return false;
}
if (!mInclusiveStart) {... | java | private boolean toBoundedFirst() throws FetchException {
if (mStartBound == null) {
if (!toFirst()) {
return false;
}
} else {
if (!toFirst(mStartBound.clone())) {
return false;
}
if (!mInclusiveStart) {... | [
"private",
"boolean",
"toBoundedFirst",
"(",
")",
"throws",
"FetchException",
"{",
"if",
"(",
"mStartBound",
"==",
"null",
")",
"{",
"if",
"(",
"!",
"toFirst",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"!",
"toFirs... | Calls toFirst, but considers start and end bounds. | [
"Calls",
"toFirst",
"but",
"considers",
"start",
"and",
"end",
"bounds",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/RawCursor.java#L539-L575 |
8,081 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/RawCursor.java | RawCursor.toBoundedLast | private boolean toBoundedLast() throws FetchException {
if (mEndBound == null) {
if (!toLast()) {
return false;
}
} else {
if (!toLast(mEndBound.clone())) {
return false;
}
if (!mInclusiveEnd) {
... | java | private boolean toBoundedLast() throws FetchException {
if (mEndBound == null) {
if (!toLast()) {
return false;
}
} else {
if (!toLast(mEndBound.clone())) {
return false;
}
if (!mInclusiveEnd) {
... | [
"private",
"boolean",
"toBoundedLast",
"(",
")",
"throws",
"FetchException",
"{",
"if",
"(",
"mEndBound",
"==",
"null",
")",
"{",
"if",
"(",
"!",
"toLast",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"!",
"toLast",
... | for preserving key. | [
"for",
"preserving",
"key",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/RawCursor.java#L579-L615 |
8,082 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/Spinner.java | Spinner.obtainHintColor | private void obtainHintColor(@NonNull final TypedArray typedArray) {
ColorStateList colors =
typedArray.getColorStateList(R.styleable.Spinner_android_textColorHint);
if (colors == null) {
TypedArray styledAttributes = getContext().getTheme()
.obtainStyled... | java | private void obtainHintColor(@NonNull final TypedArray typedArray) {
ColorStateList colors =
typedArray.getColorStateList(R.styleable.Spinner_android_textColorHint);
if (colors == null) {
TypedArray styledAttributes = getContext().getTheme()
.obtainStyled... | [
"private",
"void",
"obtainHintColor",
"(",
"@",
"NonNull",
"final",
"TypedArray",
"typedArray",
")",
"{",
"ColorStateList",
"colors",
"=",
"typedArray",
".",
"getColorStateList",
"(",
"R",
".",
"styleable",
".",
"Spinner_android_textColorHint",
")",
";",
"if",
"("... | Obtains the color of the hint, which should be shown, when no item is selected, from a
specific typed array.
@param typedArray
The typed array, the hint should be obtained from, as an instance of the class {@link
TypedArray}. The typed array may not be null | [
"Obtains",
"the",
"color",
"of",
"the",
"hint",
"which",
"should",
"be",
"shown",
"when",
"no",
"item",
"is",
"selected",
"from",
"a",
"specific",
"typed",
"array",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Spinner.java#L203-L214 |
8,083 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/Spinner.java | Spinner.createItemSelectedListener | private OnItemSelectedListener createItemSelectedListener() {
return new OnItemSelectedListener() {
@Override
public void onItemSelected(final AdapterView<?> parent, final View view,
final int position, final long id) {
if (getOnIte... | java | private OnItemSelectedListener createItemSelectedListener() {
return new OnItemSelectedListener() {
@Override
public void onItemSelected(final AdapterView<?> parent, final View view,
final int position, final long id) {
if (getOnIte... | [
"private",
"OnItemSelectedListener",
"createItemSelectedListener",
"(",
")",
"{",
"return",
"new",
"OnItemSelectedListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onItemSelected",
"(",
"final",
"AdapterView",
"<",
"?",
">",
"parent",
",",
"final",
"Vi... | Creates and returns a listener, which allows to validate the value of the view, when the
selected item has been changed.
@return The listener, which has been created, as an instance of the type {@link
OnItemSelectedListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"validate",
"the",
"value",
"of",
"the",
"view",
"when",
"the",
"selected",
"item",
"has",
"been",
"changed",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Spinner.java#L276-L299 |
8,084 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/Spinner.java | Spinner.setHint | public final void setHint(@Nullable final CharSequence hint) {
this.hint = hint;
if (getAdapter() != null) {
ProxySpinnerAdapter proxyAdapter = (ProxySpinnerAdapter) getAdapter();
setAdapter(proxyAdapter.getAdapter());
}
} | java | public final void setHint(@Nullable final CharSequence hint) {
this.hint = hint;
if (getAdapter() != null) {
ProxySpinnerAdapter proxyAdapter = (ProxySpinnerAdapter) getAdapter();
setAdapter(proxyAdapter.getAdapter());
}
} | [
"public",
"final",
"void",
"setHint",
"(",
"@",
"Nullable",
"final",
"CharSequence",
"hint",
")",
"{",
"this",
".",
"hint",
"=",
"hint",
";",
"if",
"(",
"getAdapter",
"(",
")",
"!=",
"null",
")",
"{",
"ProxySpinnerAdapter",
"proxyAdapter",
"=",
"(",
"Pro... | Sets the hint, which should be displayed, when no item is selected.
@param hint
The hint, which should be set, as an instance of the type {@link CharSequence} or
null, if no hint should be set | [
"Sets",
"the",
"hint",
"which",
"should",
"be",
"displayed",
"when",
"no",
"item",
"is",
"selected",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Spinner.java#L409-L416 |
8,085 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/Spinner.java | Spinner.setHintTextColor | public final void setHintTextColor(final ColorStateList colors) {
this.hintColor = colors;
if (getAdapter() != null) {
ProxySpinnerAdapter proxyAdapter = (ProxySpinnerAdapter) getAdapter();
setAdapter(proxyAdapter.getAdapter());
}
} | java | public final void setHintTextColor(final ColorStateList colors) {
this.hintColor = colors;
if (getAdapter() != null) {
ProxySpinnerAdapter proxyAdapter = (ProxySpinnerAdapter) getAdapter();
setAdapter(proxyAdapter.getAdapter());
}
} | [
"public",
"final",
"void",
"setHintTextColor",
"(",
"final",
"ColorStateList",
"colors",
")",
"{",
"this",
".",
"hintColor",
"=",
"colors",
";",
"if",
"(",
"getAdapter",
"(",
")",
"!=",
"null",
")",
"{",
"ProxySpinnerAdapter",
"proxyAdapter",
"=",
"(",
"Prox... | Sets the color of the hint, which should be displayed, when no item is selected.
@param colors
The color, which should be set, as an instance of the class {@link ColorStateList} | [
"Sets",
"the",
"color",
"of",
"the",
"hint",
"which",
"should",
"be",
"displayed",
"when",
"no",
"item",
"is",
"selected",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Spinner.java#L455-L462 |
8,086 | michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/Spinner.java | Spinner.setPopupBackgroundDrawable | @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public final void setPopupBackgroundDrawable(final Drawable background) {
getView().setPopupBackgroundDrawable(background);
} | java | @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public final void setPopupBackgroundDrawable(final Drawable background) {
getView().setPopupBackgroundDrawable(background);
} | [
"@",
"TargetApi",
"(",
"Build",
".",
"VERSION_CODES",
".",
"JELLY_BEAN",
")",
"public",
"final",
"void",
"setPopupBackgroundDrawable",
"(",
"final",
"Drawable",
"background",
")",
"{",
"getView",
"(",
")",
".",
"setPopupBackgroundDrawable",
"(",
"background",
")",... | Set the background drawable for the spinner's popup window of choices. Only valid in
MODE_DROPDOWN; this method is a no-op in other modes.
@param background
Background drawable | [
"Set",
"the",
"background",
"drawable",
"for",
"the",
"spinner",
"s",
"popup",
"window",
"of",
"choices",
".",
"Only",
"valid",
"in",
"MODE_DROPDOWN",
";",
"this",
"method",
"is",
"a",
"no",
"-",
"op",
"in",
"other",
"modes",
"."
] | ac8693baeac7abddf2e38a47da4c1849d4661a8b | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Spinner.java#L473-L476 |
8,087 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/FilteringScore.java | FilteringScore.evaluate | public static <S extends Storable> FilteringScore<S> evaluate(StorableIndex<S> index,
Filter<S> filter)
{
if (index == null) {
throw new IllegalArgumentException("Index required");
}
return evaluate(index.g... | java | public static <S extends Storable> FilteringScore<S> evaluate(StorableIndex<S> index,
Filter<S> filter)
{
if (index == null) {
throw new IllegalArgumentException("Index required");
}
return evaluate(index.g... | [
"public",
"static",
"<",
"S",
"extends",
"Storable",
">",
"FilteringScore",
"<",
"S",
">",
"evaluate",
"(",
"StorableIndex",
"<",
"S",
">",
"index",
",",
"Filter",
"<",
"S",
">",
"filter",
")",
"{",
"if",
"(",
"index",
"==",
"null",
")",
"{",
"throw"... | Evaluates the given index for its filtering capabilities against the
given filter.
@param index index to evaluate
@param filter filter which cannot contain any logical 'or' operations.
@throws IllegalArgumentException if index is null or filter is not supported | [
"Evaluates",
"the",
"given",
"index",
"for",
"its",
"filtering",
"capabilities",
"against",
"the",
"given",
"filter",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/FilteringScore.java#L79-L90 |
8,088 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/FilteringScore.java | FilteringScore.nullCompare | static int nullCompare(Object first, Object second) {
if (first == null) {
if (second != null) {
return 1;
}
} else if (second == null) {
return -1;
}
return 0;
} | java | static int nullCompare(Object first, Object second) {
if (first == null) {
if (second != null) {
return 1;
}
} else if (second == null) {
return -1;
}
return 0;
} | [
"static",
"int",
"nullCompare",
"(",
"Object",
"first",
",",
"Object",
"second",
")",
"{",
"if",
"(",
"first",
"==",
"null",
")",
"{",
"if",
"(",
"second",
"!=",
"null",
")",
"{",
"return",
"1",
";",
"}",
"}",
"else",
"if",
"(",
"second",
"==",
"... | Comparison orders null high. | [
"Comparison",
"orders",
"null",
"high",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/FilteringScore.java#L267-L276 |
8,089 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/FilteringScore.java | FilteringScore.split | static <S extends Storable> List<Filter<S>> split(Filter<S> filter) {
return filter == null ? null : filter.conjunctiveNormalFormSplit();
} | java | static <S extends Storable> List<Filter<S>> split(Filter<S> filter) {
return filter == null ? null : filter.conjunctiveNormalFormSplit();
} | [
"static",
"<",
"S",
"extends",
"Storable",
">",
"List",
"<",
"Filter",
"<",
"S",
">",
">",
"split",
"(",
"Filter",
"<",
"S",
">",
"filter",
")",
"{",
"return",
"filter",
"==",
"null",
"?",
"null",
":",
"filter",
".",
"conjunctiveNormalFormSplit",
"(",
... | Splits the filter from its conjunctive normal form. And'ng the filters
together produces the original filter. | [
"Splits",
"the",
"filter",
"from",
"its",
"conjunctive",
"normal",
"form",
".",
"And",
"ng",
"the",
"filters",
"together",
"produces",
"the",
"original",
"filter",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/FilteringScore.java#L282-L284 |
8,090 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/FilteringScore.java | FilteringScore.getHandledFilter | public Filter<S> getHandledFilter() {
Filter<S> identity = getIdentityFilter();
Filter<S> rangeStart = buildCompositeFilter(getRangeStartFilters());
Filter<S> rangeEnd = buildCompositeFilter(getRangeEndFilters());
return and(and(identity, rangeStart), rangeEnd);
} | java | public Filter<S> getHandledFilter() {
Filter<S> identity = getIdentityFilter();
Filter<S> rangeStart = buildCompositeFilter(getRangeStartFilters());
Filter<S> rangeEnd = buildCompositeFilter(getRangeEndFilters());
return and(and(identity, rangeStart), rangeEnd);
} | [
"public",
"Filter",
"<",
"S",
">",
"getHandledFilter",
"(",
")",
"{",
"Filter",
"<",
"S",
">",
"identity",
"=",
"getIdentityFilter",
"(",
")",
";",
"Filter",
"<",
"S",
">",
"rangeStart",
"=",
"buildCompositeFilter",
"(",
"getRangeStartFilters",
"(",
")",
"... | Returns the composite handled filter, or null if no matches at all. | [
"Returns",
"the",
"composite",
"handled",
"filter",
"or",
"null",
"if",
"no",
"matches",
"at",
"all",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/FilteringScore.java#L485-L491 |
8,091 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/FilteringScore.java | FilteringScore.getCoveringRemainderFilter | public Filter<S> getCoveringRemainderFilter() {
if (mCoveringRemainderFilter == null) {
List<? extends Filter<S>> remainderFilters = mRemainderFilters;
List<? extends Filter<S>> coveringFilters = mCoveringFilters;
if (coveringFilters.size() < remainderFilters.size()) {
... | java | public Filter<S> getCoveringRemainderFilter() {
if (mCoveringRemainderFilter == null) {
List<? extends Filter<S>> remainderFilters = mRemainderFilters;
List<? extends Filter<S>> coveringFilters = mCoveringFilters;
if (coveringFilters.size() < remainderFilters.size()) {
... | [
"public",
"Filter",
"<",
"S",
">",
"getCoveringRemainderFilter",
"(",
")",
"{",
"if",
"(",
"mCoveringRemainderFilter",
"==",
"null",
")",
"{",
"List",
"<",
"?",
"extends",
"Filter",
"<",
"S",
">",
">",
"remainderFilters",
"=",
"mRemainderFilters",
";",
"List... | Returns the composite remainder filter without including the covering
filter. Returns null if no remainder.
@since 1.2 | [
"Returns",
"the",
"composite",
"remainder",
"filter",
"without",
"including",
"the",
"covering",
"filter",
".",
"Returns",
"null",
"if",
"no",
"remainder",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/FilteringScore.java#L605-L625 |
8,092 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/FilteringScore.java | FilteringScore.canMergeRemainderFilter | public boolean canMergeRemainderFilter(FilteringScore<S> other) {
if (this == other || (!hasAnyMatches() && !other.hasAnyMatches())) {
return true;
}
return isIndexClustered() == other.isIndexClustered()
&& isIndexUnique() == other.isIndexUnique()
&& g... | java | public boolean canMergeRemainderFilter(FilteringScore<S> other) {
if (this == other || (!hasAnyMatches() && !other.hasAnyMatches())) {
return true;
}
return isIndexClustered() == other.isIndexClustered()
&& isIndexUnique() == other.isIndexUnique()
&& g... | [
"public",
"boolean",
"canMergeRemainderFilter",
"(",
"FilteringScore",
"<",
"S",
">",
"other",
")",
"{",
"if",
"(",
"this",
"==",
"other",
"||",
"(",
"!",
"hasAnyMatches",
"(",
")",
"&&",
"!",
"other",
".",
"hasAnyMatches",
"(",
")",
")",
")",
"{",
"re... | Returns true if the given score uses an index exactly the same as this
one. The only allowed differences are in the remainder filter. | [
"Returns",
"true",
"if",
"the",
"given",
"score",
"uses",
"an",
"index",
"exactly",
"the",
"same",
"as",
"this",
"one",
".",
"The",
"only",
"allowed",
"differences",
"are",
"in",
"the",
"remainder",
"filter",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/FilteringScore.java#L648-L666 |
8,093 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/FilteringScore.java | FilteringScore.mergeRemainderFilter | public Filter<S> mergeRemainderFilter(FilteringScore<S> other) {
Filter<S> thisRemainderFilter = getRemainderFilter();
if (this == other) {
return thisRemainderFilter;
}
Filter<S> otherRemainderFilter = other.getRemainderFilter();
if (thisRemainderFilter =... | java | public Filter<S> mergeRemainderFilter(FilteringScore<S> other) {
Filter<S> thisRemainderFilter = getRemainderFilter();
if (this == other) {
return thisRemainderFilter;
}
Filter<S> otherRemainderFilter = other.getRemainderFilter();
if (thisRemainderFilter =... | [
"public",
"Filter",
"<",
"S",
">",
"mergeRemainderFilter",
"(",
"FilteringScore",
"<",
"S",
">",
"other",
")",
"{",
"Filter",
"<",
"S",
">",
"thisRemainderFilter",
"=",
"getRemainderFilter",
"(",
")",
";",
"if",
"(",
"this",
"==",
"other",
")",
"{",
"ret... | Merges the remainder filter of this score with the one given using an
'or' operation. Call canMergeRemainderFilter first to verify if the
merge makes any sense. Returns null if no remainder filter at all. | [
"Merges",
"the",
"remainder",
"filter",
"of",
"this",
"score",
"with",
"the",
"one",
"given",
"using",
"an",
"or",
"operation",
".",
"Call",
"canMergeRemainderFilter",
"first",
"to",
"verify",
"if",
"the",
"merge",
"makes",
"any",
"sense",
".",
"Returns",
"n... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/FilteringScore.java#L673-L691 |
8,094 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/qe/FilteringScore.java | FilteringScore.findCoveringMatches | private List<Filter<S>> findCoveringMatches() {
List<Filter<S>> coveringFilters = null;
boolean check = !mRemainderFilters.isEmpty()
&& (mIdentityFilters.size() > 0
|| mRangeStartFilters.size() > 0
|| mRangeEndFilters.size() > 0);
if (check)... | java | private List<Filter<S>> findCoveringMatches() {
List<Filter<S>> coveringFilters = null;
boolean check = !mRemainderFilters.isEmpty()
&& (mIdentityFilters.size() > 0
|| mRangeStartFilters.size() > 0
|| mRangeEndFilters.size() > 0);
if (check)... | [
"private",
"List",
"<",
"Filter",
"<",
"S",
">",
">",
"findCoveringMatches",
"(",
")",
"{",
"List",
"<",
"Filter",
"<",
"S",
">>",
"coveringFilters",
"=",
"null",
";",
"boolean",
"check",
"=",
"!",
"mRemainderFilters",
".",
"isEmpty",
"(",
")",
"&&",
"... | Finds covering matches from the remainder. | [
"Finds",
"covering",
"matches",
"from",
"the",
"remainder",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/FilteringScore.java#L747-L768 |
8,095 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIntrospector.java | StorableIntrospector.main | public static void main(String[] args) throws Exception {
for (String arg : args) {
Class clazz = Class.forName(arg);
System.out.println("Examining: " + clazz.getName());
try {
examine(clazz);
System.out.println("Passed");
} ... | java | public static void main(String[] args) throws Exception {
for (String arg : args) {
Class clazz = Class.forName(arg);
System.out.println("Examining: " + clazz.getName());
try {
examine(clazz);
System.out.println("Passed");
} ... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"for",
"(",
"String",
"arg",
":",
"args",
")",
"{",
"Class",
"clazz",
"=",
"Class",
".",
"forName",
"(",
"arg",
")",
";",
"System",
".",
"out",
".... | Test program which examines candidate Storable classes. If any fail, an
exception is thrown.
@param args names of classes to examine | [
"Test",
"program",
"which",
"examines",
"candidate",
"Storable",
"classes",
".",
"If",
"any",
"fail",
"an",
"exception",
"is",
"thrown",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java#L132-L146 |
8,096 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIntrospector.java | StorableIntrospector.checkTypeParameter | @SuppressWarnings("unchecked")
private static void checkTypeParameter(List<String> errorMessages, Class type) {
// Only check classes and interfaces that extend Storable.
if (type != null && Storable.class.isAssignableFrom(type)) {
if (Storable.class == type) {
retur... | java | @SuppressWarnings("unchecked")
private static void checkTypeParameter(List<String> errorMessages, Class type) {
// Only check classes and interfaces that extend Storable.
if (type != null && Storable.class.isAssignableFrom(type)) {
if (Storable.class == type) {
retur... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"static",
"void",
"checkTypeParameter",
"(",
"List",
"<",
"String",
">",
"errorMessages",
",",
"Class",
"type",
")",
"{",
"// Only check classes and interfaces that extend Storable.\r",
"if",
"(",
"type",
... | Make sure that the parameter type that is specified to Storable can be
assigned to a Storable, and that the given type can be assigned to
it. Put another way, the upper bound is Storable, and the lower bound
is the given type. type <= parameterized type <= Storable | [
"Make",
"sure",
"that",
"the",
"parameter",
"type",
"that",
"is",
"specified",
"to",
"Storable",
"can",
"be",
"assigned",
"to",
"a",
"Storable",
"and",
"that",
"the",
"given",
"type",
"can",
"be",
"assigned",
"to",
"it",
".",
"Put",
"another",
"way",
"th... | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java#L913-L970 |
8,097 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIntrospector.java | StorableIntrospector.gatherAllDeclaredMethods | private static Map<String, Method> gatherAllDeclaredMethods(Class clazz) {
Map<String, Method> methods = new HashMap<String, Method>();
gatherAllDeclaredMethods(methods, clazz);
return methods;
} | java | private static Map<String, Method> gatherAllDeclaredMethods(Class clazz) {
Map<String, Method> methods = new HashMap<String, Method>();
gatherAllDeclaredMethods(methods, clazz);
return methods;
} | [
"private",
"static",
"Map",
"<",
"String",
",",
"Method",
">",
"gatherAllDeclaredMethods",
"(",
"Class",
"clazz",
")",
"{",
"Map",
"<",
"String",
",",
"Method",
">",
"methods",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Method",
">",
"(",
")",
";",
"g... | Returns a new modifiable mapping of method signatures to methods.
@return map of {@link #createSig signatures} to methods | [
"Returns",
"a",
"new",
"modifiable",
"mapping",
"of",
"method",
"signatures",
"to",
"methods",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java#L1575-L1579 |
8,098 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/info/StorableIntrospector.java | StorableIntrospector.createSig | private static String createSig(Method m) {
return m.getName() + ':' + MethodDesc.forMethod(m).getDescriptor();
} | java | private static String createSig(Method m) {
return m.getName() + ':' + MethodDesc.forMethod(m).getDescriptor();
} | [
"private",
"static",
"String",
"createSig",
"(",
"Method",
"m",
")",
"{",
"return",
"m",
".",
"getName",
"(",
")",
"+",
"'",
"'",
"+",
"MethodDesc",
".",
"forMethod",
"(",
"m",
")",
".",
"getDescriptor",
"(",
")",
";",
"}"
] | Create a representation of the signature which includes the method name.
This uniquely identifies the method.
@param m method to describe | [
"Create",
"a",
"representation",
"of",
"the",
"signature",
"which",
"includes",
"the",
"method",
"name",
".",
"This",
"uniquely",
"identifies",
"the",
"method",
"."
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java#L1604-L1606 |
8,099 | Carbonado/Carbonado | src/main/java/com/amazon/carbonado/lob/ByteArrayBlob.java | ByteArrayBlob.ensureLengthForWrite | private void ensureLengthForWrite(int ilength) {
if (ilength > mLength) {
if (ilength <= mData.length) {
mLength = ilength;
} else {
int newLength = mData.length * 2;
if (newLength < ilength) {
newLength = ilength... | java | private void ensureLengthForWrite(int ilength) {
if (ilength > mLength) {
if (ilength <= mData.length) {
mLength = ilength;
} else {
int newLength = mData.length * 2;
if (newLength < ilength) {
newLength = ilength... | [
"private",
"void",
"ensureLengthForWrite",
"(",
"int",
"ilength",
")",
"{",
"if",
"(",
"ilength",
">",
"mLength",
")",
"{",
"if",
"(",
"ilength",
"<=",
"mData",
".",
"length",
")",
"{",
"mLength",
"=",
"ilength",
";",
"}",
"else",
"{",
"int",
"newLengt... | Caller must be synchronized | [
"Caller",
"must",
"be",
"synchronized"
] | eee29b365a61c8f03e1a1dc6bed0692e6b04b1db | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/lob/ByteArrayBlob.java#L297-L312 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.