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,100
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/CustomStorableCodec.java
CustomStorableCodec.getStorableClass
@SuppressWarnings("unchecked") static <S extends Storable> Class<? extends S> getStorableClass(Class<S> type, boolean isMaster) throws SupportException { synchronized (cCache) { Class<? extends S> storableClass; RawStorableGenerator.Flavors<S> flavors = ...
java
@SuppressWarnings("unchecked") static <S extends Storable> Class<? extends S> getStorableClass(Class<S> type, boolean isMaster) throws SupportException { synchronized (cCache) { Class<? extends S> storableClass; RawStorableGenerator.Flavors<S> flavors = ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "static", "<", "S", "extends", "Storable", ">", "Class", "<", "?", "extends", "S", ">", "getStorableClass", "(", "Class", "<", "S", ">", "type", ",", "boolean", "isMaster", ")", "throws", "SupportException"...
Returns a storable implementation that calls into CustomStorableCodec implementation for encoding and decoding.
[ "Returns", "a", "storable", "implementation", "that", "calls", "into", "CustomStorableCodec", "implementation", "for", "encoding", "and", "decoding", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/CustomStorableCodec.java#L62-L85
8,101
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/CustomStorableCodec.java
CustomStorableCodec.buildPkIndex
@SuppressWarnings("unchecked") public StorableIndex<S> buildPkIndex(String... propertyNames) { Map<String, ? extends StorableProperty<S>> map = getAllProperties(); int length = propertyNames.length; StorableProperty<S>[] properties = new StorableProperty[length]; Direction[] dir...
java
@SuppressWarnings("unchecked") public StorableIndex<S> buildPkIndex(String... propertyNames) { Map<String, ? extends StorableProperty<S>> map = getAllProperties(); int length = propertyNames.length; StorableProperty<S>[] properties = new StorableProperty[length]; Direction[] dir...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "StorableIndex", "<", "S", ">", "buildPkIndex", "(", "String", "...", "propertyNames", ")", "{", "Map", "<", "String", ",", "?", "extends", "StorableProperty", "<", "S", ">", ">", "map", "=", "g...
Convenient way to define the clustered primary key index descriptor. Direction can be specified by prefixing the property name with a '+' or '-'. If unspecified, direction is assumed to be ascending.
[ "Convenient", "way", "to", "define", "the", "clustered", "primary", "key", "index", "descriptor", ".", "Direction", "can", "be", "specified", "by", "prefixing", "the", "property", "name", "with", "a", "+", "or", "-", ".", "If", "unspecified", "direction", "i...
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/CustomStorableCodec.java#L340-L362
8,102
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/filter/PropertyFilterList.java
PropertyFilterList.getPreviousRemaining
public int getPreviousRemaining() { int remaining = mPrevRemaining; if (remaining < 0) { mPrevRemaining = remaining = ((mPrev == null) ? 0 : (mPrev.getPreviousRemaining() + 1)); } return remaining; }
java
public int getPreviousRemaining() { int remaining = mPrevRemaining; if (remaining < 0) { mPrevRemaining = remaining = ((mPrev == null) ? 0 : (mPrev.getPreviousRemaining() + 1)); } return remaining; }
[ "public", "int", "getPreviousRemaining", "(", ")", "{", "int", "remaining", "=", "mPrevRemaining", ";", "if", "(", "remaining", "<", "0", ")", "{", "mPrevRemaining", "=", "remaining", "=", "(", "(", "mPrev", "==", "null", ")", "?", "0", ":", "(", "mPre...
Returns the amount of previous remaining list nodes.
[ "Returns", "the", "amount", "of", "previous", "remaining", "list", "nodes", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/PropertyFilterList.java#L97-L104
8,103
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/filter/PropertyFilterList.java
PropertyFilterList.getBlankCount
public int getBlankCount() { int count = mBlankCount; if (count < 0) { mBlankCount = count = (mPropFilter.isConstant() ? 0 : 1) + ((mPrev == null) ? 0 : mPrev.getBlankCount()); } return count; }
java
public int getBlankCount() { int count = mBlankCount; if (count < 0) { mBlankCount = count = (mPropFilter.isConstant() ? 0 : 1) + ((mPrev == null) ? 0 : mPrev.getBlankCount()); } return count; }
[ "public", "int", "getBlankCount", "(", ")", "{", "int", "count", "=", "mBlankCount", ";", "if", "(", "count", "<", "0", ")", "{", "mBlankCount", "=", "count", "=", "(", "mPropFilter", ".", "isConstant", "(", ")", "?", "0", ":", "1", ")", "+", "(", ...
Returns the amount of non-constant list nodes up to this node.
[ "Returns", "the", "amount", "of", "non", "-", "constant", "list", "nodes", "up", "to", "this", "node", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/PropertyFilterList.java#L109-L116
8,104
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/filter/PropertyFilterList.java
PropertyFilterList.contains
public boolean contains(PropertyFilter<S> propFilter) { if (mPropFilter == propFilter) { return true; } if (mNext == null) { return false; } // Tail recursion. return mNext.contains(propFilter); }
java
public boolean contains(PropertyFilter<S> propFilter) { if (mPropFilter == propFilter) { return true; } if (mNext == null) { return false; } // Tail recursion. return mNext.contains(propFilter); }
[ "public", "boolean", "contains", "(", "PropertyFilter", "<", "S", ">", "propFilter", ")", "{", "if", "(", "mPropFilter", "==", "propFilter", ")", "{", "return", "true", ";", "}", "if", "(", "mNext", "==", "null", ")", "{", "return", "false", ";", "}", ...
Searches list for given PropertyFilter.
[ "Searches", "list", "for", "given", "PropertyFilter", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/PropertyFilterList.java#L145-L154
8,105
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/filter/PropertyFilterList.java
PropertyFilterList.prepend
PropertyFilterList<S> prepend(PropertyFilter<S> propFilter) { PropertyFilterList<S> head = new PropertyFilterList<S>(propFilter, this); mPrev = head; return head; }
java
PropertyFilterList<S> prepend(PropertyFilter<S> propFilter) { PropertyFilterList<S> head = new PropertyFilterList<S>(propFilter, this); mPrev = head; return head; }
[ "PropertyFilterList", "<", "S", ">", "prepend", "(", "PropertyFilter", "<", "S", ">", "propFilter", ")", "{", "PropertyFilterList", "<", "S", ">", "head", "=", "new", "PropertyFilterList", "<", "S", ">", "(", "propFilter", ",", "this", ")", ";", "mPrev", ...
Prepend a node to the head of the list.
[ "Prepend", "a", "node", "to", "the", "head", "of", "the", "list", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/PropertyFilterList.java#L159-L163
8,106
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/SortedQueryExecutor.java
SortedQueryExecutor.printNative
@Override public boolean printNative(Appendable app, int indentLevel, FilterValues<S> values) throws IOException { return mExecutor.printNative(app, indentLevel, values); }
java
@Override public boolean printNative(Appendable app, int indentLevel, FilterValues<S> values) throws IOException { return mExecutor.printNative(app, indentLevel, values); }
[ "@", "Override", "public", "boolean", "printNative", "(", "Appendable", "app", ",", "int", "indentLevel", ",", "FilterValues", "<", "S", ">", "values", ")", "throws", "IOException", "{", "return", "mExecutor", ".", "printNative", "(", "app", ",", "indentLevel"...
Prints native query of the wrapped executor.
[ "Prints", "native", "query", "of", "the", "wrapped", "executor", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/SortedQueryExecutor.java#L144-L149
8,107
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/cursor/FilteredCursorGenerator.java
FilteredCursorGenerator.getFactory
@SuppressWarnings("unchecked") static <S extends Storable> Factory<S> getFactory(Filter<S> filter) { if (filter == null) { throw new IllegalArgumentException(); } synchronized (cCache) { Factory<S> factory = (Factory<S>) cCache.get(filter); if (fact...
java
@SuppressWarnings("unchecked") static <S extends Storable> Factory<S> getFactory(Filter<S> filter) { if (filter == null) { throw new IllegalArgumentException(); } synchronized (cCache) { Factory<S> factory = (Factory<S>) cCache.get(filter); if (fact...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "static", "<", "S", "extends", "Storable", ">", "Factory", "<", "S", ">", "getFactory", "(", "Filter", "<", "S", ">", "filter", ")", "{", "if", "(", "filter", "==", "null", ")", "{", "throw", "new", ...
Returns a factory for creating new filtered cursor instances. @param filter filter specification @throws IllegalArgumentException if filter is null @throws UnsupportedOperationException if filter is not supported
[ "Returns", "a", "factory", "for", "creating", "new", "filtered", "cursor", "instances", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/cursor/FilteredCursorGenerator.java#L87-L102
8,108
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/jdbc/JoinNode.java
JoinNode.appendTableNameAndAliasTo
public void appendTableNameAndAliasTo(SQLStatementBuilder fromClause) { appendTableNameTo(fromClause); fromClause.append(' '); fromClause.append(mAlias); }
java
public void appendTableNameAndAliasTo(SQLStatementBuilder fromClause) { appendTableNameTo(fromClause); fromClause.append(' '); fromClause.append(mAlias); }
[ "public", "void", "appendTableNameAndAliasTo", "(", "SQLStatementBuilder", "fromClause", ")", "{", "appendTableNameTo", "(", "fromClause", ")", ";", "fromClause", ".", "append", "(", "'", "'", ")", ";", "fromClause", ".", "append", "(", "mAlias", ")", ";", "}"...
Appends table name and alias to the given FROM clause builder.
[ "Appends", "table", "name", "and", "alias", "to", "the", "given", "FROM", "clause", "builder", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JoinNode.java#L112-L116
8,109
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/IndexedQueryExecutor.java
IndexedQueryExecutor.compareWithNullHigh
static int compareWithNullHigh(Object a, Object b) { return a == null ? (b == null ? 0 : -1) : (b == null ? 1 : ((Comparable) a).compareTo(b)); }
java
static int compareWithNullHigh(Object a, Object b) { return a == null ? (b == null ? 0 : -1) : (b == null ? 1 : ((Comparable) a).compareTo(b)); }
[ "static", "int", "compareWithNullHigh", "(", "Object", "a", ",", "Object", "b", ")", "{", "return", "a", "==", "null", "?", "(", "b", "==", "null", "?", "0", ":", "-", "1", ")", ":", "(", "b", "==", "null", "?", "1", ":", "(", "(", "Comparable"...
Compares two objects which are assumed to be Comparable. If one value is null, it is treated as being higher. This consistent with all other property value comparisons in carbonado.
[ "Compares", "two", "objects", "which", "are", "assumed", "to", "be", "Comparable", ".", "If", "one", "value", "is", "null", "it", "is", "treated", "as", "being", "higher", ".", "This", "consistent", "with", "all", "other", "property", "value", "comparisons",...
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/IndexedQueryExecutor.java#L49-L51
8,110
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.inflateView
private void inflateView() { parentView = createParentView(); view = createView(); view.setOnFocusChangeListener(createFocusChangeListener()); view.setBackgroundResource(R.drawable.validateable_view_background); setLineColor(getAccentColor()); if (parentView != null) { ...
java
private void inflateView() { parentView = createParentView(); view = createView(); view.setOnFocusChangeListener(createFocusChangeListener()); view.setBackgroundResource(R.drawable.validateable_view_background); setLineColor(getAccentColor()); if (parentView != null) { ...
[ "private", "void", "inflateView", "(", ")", "{", "parentView", "=", "createParentView", "(", ")", ";", "view", "=", "createView", "(", ")", ";", "view", ".", "setOnFocusChangeListener", "(", "createFocusChangeListener", "(", ")", ")", ";", "view", ".", "setB...
Inflates the view, whose value should be able to be validated.
[ "Inflates", "the", "view", "whose", "value", "should", "be", "able", "to", "be", "validated", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L315-L328
8,111
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.inflateErrorMessageTextViews
private void inflateErrorMessageTextViews() { View parent = View.inflate(getContext(), R.layout.error_messages, null); addView(parent, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); leftMessage = parent.findViewById(R.id.left_error_message); leftMessage.setTag(false); rig...
java
private void inflateErrorMessageTextViews() { View parent = View.inflate(getContext(), R.layout.error_messages, null); addView(parent, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); leftMessage = parent.findViewById(R.id.left_error_message); leftMessage.setTag(false); rig...
[ "private", "void", "inflateErrorMessageTextViews", "(", ")", "{", "View", "parent", "=", "View", ".", "inflate", "(", "getContext", "(", ")", ",", "R", ".", "layout", ".", "error_messages", ",", "null", ")", ";", "addView", "(", "parent", ",", "LayoutParam...
Inflates the text views, which are used to show validation errors.
[ "Inflates", "the", "text", "views", "which", "are", "used", "to", "show", "validation", "errors", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L333-L340
8,112
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.createFocusChangeListener
private OnFocusChangeListener createFocusChangeListener() { return new OnFocusChangeListener() { @Override public final void onFocusChange(final View view, final boolean hasFocus) { if (!hasFocus && isValidatedOnFocusLost()) { validate(); ...
java
private OnFocusChangeListener createFocusChangeListener() { return new OnFocusChangeListener() { @Override public final void onFocusChange(final View view, final boolean hasFocus) { if (!hasFocus && isValidatedOnFocusLost()) { validate(); ...
[ "private", "OnFocusChangeListener", "createFocusChangeListener", "(", ")", "{", "return", "new", "OnFocusChangeListener", "(", ")", "{", "@", "Override", "public", "final", "void", "onFocusChange", "(", "final", "View", "view", ",", "final", "boolean", "hasFocus", ...
Creates and returns a listener, which allows to validate the value of the view, when the view loses its focus. @return The listener, which has been created, as an instance of the type {@link OnFocusChangeListener}
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "validate", "the", "value", "of", "the", "view", "when", "the", "view", "loses", "its", "focus", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L349-L360
8,113
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.notifyOnValidationFailure
private void notifyOnValidationFailure(@NonNull final Validator<ValueType> validator) { for (ValidationListener<ValueType> listener : listeners) { listener.onValidationFailure(this, validator); } }
java
private void notifyOnValidationFailure(@NonNull final Validator<ValueType> validator) { for (ValidationListener<ValueType> listener : listeners) { listener.onValidationFailure(this, validator); } }
[ "private", "void", "notifyOnValidationFailure", "(", "@", "NonNull", "final", "Validator", "<", "ValueType", ">", "validator", ")", "{", "for", "(", "ValidationListener", "<", "ValueType", ">", "listener", ":", "listeners", ")", "{", "listener", ".", "onValidati...
Notifies all registered listeners, that a validation failed. @param validator The validator, which failed, as an instance of the type {@link Validator}. The validator may not be null
[ "Notifies", "all", "registered", "listeners", "that", "a", "validation", "failed", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L378-L382
8,114
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.validateLeft
private Validator<ValueType> validateLeft() { Validator<ValueType> result = null; Collection<Validator<ValueType>> subValidators = onGetLeftErrorMessage(); if (subValidators != null) { for (Validator<ValueType> validator : subValidators) { notifyOnValidationFailure(v...
java
private Validator<ValueType> validateLeft() { Validator<ValueType> result = null; Collection<Validator<ValueType>> subValidators = onGetLeftErrorMessage(); if (subValidators != null) { for (Validator<ValueType> validator : subValidators) { notifyOnValidationFailure(v...
[ "private", "Validator", "<", "ValueType", ">", "validateLeft", "(", ")", "{", "Validator", "<", "ValueType", ">", "result", "=", "null", ";", "Collection", "<", "Validator", "<", "ValueType", ">", ">", "subValidators", "=", "onGetLeftErrorMessage", "(", ")", ...
Validates the current value of the view in order to retrieve the error message and icon, which should be shown at the left edge of the view, if a validation fails. @return The validator, which failed or null, if the validation succeeded
[ "Validates", "the", "current", "value", "of", "the", "view", "in", "order", "to", "retrieve", "the", "error", "message", "and", "icon", "which", "should", "be", "shown", "at", "the", "left", "edge", "of", "the", "view", "if", "a", "validation", "fails", ...
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L390-L415
8,115
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.validateRight
private Validator<ValueType> validateRight() { Validator<ValueType> result = null; Collection<Validator<ValueType>> subValidators = onGetRightErrorMessage(); if (subValidators != null) { for (Validator<ValueType> validator : subValidators) { notifyOnValidationFailure...
java
private Validator<ValueType> validateRight() { Validator<ValueType> result = null; Collection<Validator<ValueType>> subValidators = onGetRightErrorMessage(); if (subValidators != null) { for (Validator<ValueType> validator : subValidators) { notifyOnValidationFailure...
[ "private", "Validator", "<", "ValueType", ">", "validateRight", "(", ")", "{", "Validator", "<", "ValueType", ">", "result", "=", "null", ";", "Collection", "<", "Validator", "<", "ValueType", ">", ">", "subValidators", "=", "onGetRightErrorMessage", "(", ")",...
Validates the current value of the view in order to retrieve the error message and icon, which should be shown at the right edge of the view, if a validation fails. @return The validator, which failed or null, if the validation succeeded
[ "Validates", "the", "current", "value", "of", "the", "view", "in", "order", "to", "retrieve", "the", "error", "message", "and", "icon", "which", "should", "be", "shown", "at", "the", "right", "edge", "of", "the", "view", "if", "a", "validation", "fails", ...
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L423-L438
8,116
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.setLineColor
private void setLineColor(@ColorInt final int color) { view.getBackground().setColorFilter(color, PorterDuff.Mode.SRC_ATOP); }
java
private void setLineColor(@ColorInt final int color) { view.getBackground().setColorFilter(color, PorterDuff.Mode.SRC_ATOP); }
[ "private", "void", "setLineColor", "(", "@", "ColorInt", "final", "int", "color", ")", "{", "view", ".", "getBackground", "(", ")", ".", "setColorFilter", "(", "color", ",", "PorterDuff", ".", "Mode", ".", "SRC_ATOP", ")", ";", "}" ]
Sets the color of the view's line. @param color The color, which should be set, as an {@link Integer} value
[ "Sets", "the", "color", "of", "the", "view", "s", "line", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L457-L459
8,117
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.setEnabledOnViewGroup
private void setEnabledOnViewGroup(@NonNull final ViewGroup viewGroup, final boolean enabled) { viewGroup.setEnabled(enabled); for (int i = 0; i < viewGroup.getChildCount(); i++) { View child = viewGroup.getChildAt(i); if (child instanceof ViewGroup) { setEnable...
java
private void setEnabledOnViewGroup(@NonNull final ViewGroup viewGroup, final boolean enabled) { viewGroup.setEnabled(enabled); for (int i = 0; i < viewGroup.getChildCount(); i++) { View child = viewGroup.getChildAt(i); if (child instanceof ViewGroup) { setEnable...
[ "private", "void", "setEnabledOnViewGroup", "(", "@", "NonNull", "final", "ViewGroup", "viewGroup", ",", "final", "boolean", "enabled", ")", "{", "viewGroup", ".", "setEnabled", "(", "enabled", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "...
Adapts the enable state of all children of a specific view group. @param viewGroup The view group, whose children's enabled states should be adapted, as an instance of the class {@link ViewGroup}. The view group may not be null @param enabled True, if the children should be enabled, false otherwise
[ "Adapts", "the", "enable", "state", "of", "all", "children", "of", "a", "specific", "view", "group", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L470-L482
8,118
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.setActivatedOnViewGroup
private void setActivatedOnViewGroup(@NonNull final ViewGroup viewGroup, final boolean activated) { viewGroup.setActivated(activated); for (int i = 0; i < viewGroup.getChildCount(); i++) { View child = viewGroup.getChildAt(i); if (child ...
java
private void setActivatedOnViewGroup(@NonNull final ViewGroup viewGroup, final boolean activated) { viewGroup.setActivated(activated); for (int i = 0; i < viewGroup.getChildCount(); i++) { View child = viewGroup.getChildAt(i); if (child ...
[ "private", "void", "setActivatedOnViewGroup", "(", "@", "NonNull", "final", "ViewGroup", "viewGroup", ",", "final", "boolean", "activated", ")", "{", "viewGroup", ".", "setActivated", "(", "activated", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", ...
Adapts the activated state of all children of a specific view group. @param viewGroup The view group, whose children's activated states should be adapted, as an instance of the class {@link ViewGroup}. The view group may not be null @param activated True, if the children should be activated, false otherwise
[ "Adapts", "the", "activated", "state", "of", "all", "children", "of", "a", "specific", "view", "group", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L493-L506
8,119
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.setLeftMessage
protected final void setLeftMessage(@Nullable final CharSequence message, @Nullable final Drawable icon) { setLeftMessage(message, icon, true); }
java
protected final void setLeftMessage(@Nullable final CharSequence message, @Nullable final Drawable icon) { setLeftMessage(message, icon, true); }
[ "protected", "final", "void", "setLeftMessage", "(", "@", "Nullable", "final", "CharSequence", "message", ",", "@", "Nullable", "final", "Drawable", "icon", ")", "{", "setLeftMessage", "(", "message", ",", "icon", ",", "true", ")", ";", "}" ]
Shows a specific message, which is marked as an error, at the left edge of the view. @param message The message, which should be shown, as an instance of the type {@link CharSequence} or null, if no message should be shown @param icon The icon, which should be shown, as an instance of the type {@link Drawable} or null...
[ "Shows", "a", "specific", "message", "which", "is", "marked", "as", "an", "error", "at", "the", "left", "edge", "of", "the", "view", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L528-L531
8,120
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.setLeftMessage
protected final void setLeftMessage(@Nullable final CharSequence message, @Nullable final Drawable icon, final boolean error) { if (message != null) { leftMessage.setText(message); leftMessage.setCompoundDrawablesWithIntrinsicBounds(icon, null, nul...
java
protected final void setLeftMessage(@Nullable final CharSequence message, @Nullable final Drawable icon, final boolean error) { if (message != null) { leftMessage.setText(message); leftMessage.setCompoundDrawablesWithIntrinsicBounds(icon, null, nul...
[ "protected", "final", "void", "setLeftMessage", "(", "@", "Nullable", "final", "CharSequence", "message", ",", "@", "Nullable", "final", "Drawable", "icon", ",", "final", "boolean", "error", ")", "{", "if", "(", "message", "!=", "null", ")", "{", "leftMessag...
Shows a specific message at the left edge of the view. @param message The message, which should be shown, as an instance of the type {@link CharSequence} or null, if no message should be shown @param icon The icon, which should be shown, as an instance of the type {@link Drawable} or null, if no icon should be shown @...
[ "Shows", "a", "specific", "message", "at", "the", "left", "edge", "of", "the", "view", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L545-L559
8,121
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.setRightMessage
protected final void setRightMessage(@Nullable final CharSequence message, final boolean error) { if (message != null) { rightMessage.setVisibility(View.VISIBLE); rightMessage.setText(message); rightMessage.setTextColor(error ? getErro...
java
protected final void setRightMessage(@Nullable final CharSequence message, final boolean error) { if (message != null) { rightMessage.setVisibility(View.VISIBLE); rightMessage.setText(message); rightMessage.setTextColor(error ? getErro...
[ "protected", "final", "void", "setRightMessage", "(", "@", "Nullable", "final", "CharSequence", "message", ",", "final", "boolean", "error", ")", "{", "if", "(", "message", "!=", "null", ")", "{", "rightMessage", ".", "setVisibility", "(", "View", ".", "VISI...
Shows a specific message at the right edge of the view. @param message The message, which should be shown, as an instance of the type {@link CharSequence} or null, if no message should be shown @param error True, if the message should be highlighted as an error, false otherwise
[ "Shows", "a", "specific", "message", "at", "the", "right", "edge", "of", "the", "view", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L581-L592
8,122
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.setHelperText
public final void setHelperText(@Nullable final CharSequence helperText) { this.helperText = helperText; if (getError() == null) { setLeftMessage(helperText, null, false); } }
java
public final void setHelperText(@Nullable final CharSequence helperText) { this.helperText = helperText; if (getError() == null) { setLeftMessage(helperText, null, false); } }
[ "public", "final", "void", "setHelperText", "(", "@", "Nullable", "final", "CharSequence", "helperText", ")", "{", "this", ".", "helperText", "=", "helperText", ";", "if", "(", "getError", "(", ")", "==", "null", ")", "{", "setLeftMessage", "(", "helperText"...
Sets the helper text, which should be shown, when no validation error is currently shown. @param helperText The helper text, which should be set, as an instance of the type {@link CharSequence} or null, if no helper text should be shown
[ "Sets", "the", "helper", "text", "which", "should", "be", "shown", "when", "no", "validation", "error", "is", "currently", "shown", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L806-L812
8,123
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.setErrorColor
public final void setErrorColor(@ColorInt final int color) { this.errorColor = color; if ((Boolean) leftMessage.getTag()) { leftMessage.setTextColor(color); } if ((Boolean) rightMessage.getTag()) { rightMessage.setTextColor(color); } }
java
public final void setErrorColor(@ColorInt final int color) { this.errorColor = color; if ((Boolean) leftMessage.getTag()) { leftMessage.setTextColor(color); } if ((Boolean) rightMessage.getTag()) { rightMessage.setTextColor(color); } }
[ "public", "final", "void", "setErrorColor", "(", "@", "ColorInt", "final", "int", "color", ")", "{", "this", ".", "errorColor", "=", "color", ";", "if", "(", "(", "Boolean", ")", "leftMessage", ".", "getTag", "(", ")", ")", "{", "leftMessage", ".", "se...
Sets the color, which should be used to indicate validation errors. @param color The color, which should be set, as an {@link Integer} value
[ "Sets", "the", "color", "which", "should", "be", "used", "to", "indicate", "validation", "errors", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L841-L851
8,124
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.setHelperTextColor
public final void setHelperTextColor(@ColorInt final int color) { this.helperTextColor = color; if (!(Boolean) leftMessage.getTag()) { leftMessage.setTextColor(color); } if (!(Boolean) rightMessage.getTag()) { rightMessage.setTextColor(color); } }
java
public final void setHelperTextColor(@ColorInt final int color) { this.helperTextColor = color; if (!(Boolean) leftMessage.getTag()) { leftMessage.setTextColor(color); } if (!(Boolean) rightMessage.getTag()) { rightMessage.setTextColor(color); } }
[ "public", "final", "void", "setHelperTextColor", "(", "@", "ColorInt", "final", "int", "color", ")", "{", "this", ".", "helperTextColor", "=", "color", ";", "if", "(", "!", "(", "Boolean", ")", "leftMessage", ".", "getTag", "(", ")", ")", "{", "leftMessa...
Sets the color of the helper text. @param color The color, which should be set, as an {@link Integer} value
[ "Sets", "the", "color", "of", "the", "helper", "text", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L868-L878
8,125
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.getError
public final CharSequence getError() { if (leftMessage.getVisibility() == View.VISIBLE && (Boolean) leftMessage.getTag()) { return leftMessage.getText(); } return null; }
java
public final CharSequence getError() { if (leftMessage.getVisibility() == View.VISIBLE && (Boolean) leftMessage.getTag()) { return leftMessage.getText(); } return null; }
[ "public", "final", "CharSequence", "getError", "(", ")", "{", "if", "(", "leftMessage", ".", "getVisibility", "(", ")", "==", "View", ".", "VISIBLE", "&&", "(", "Boolean", ")", "leftMessage", ".", "getTag", "(", ")", ")", "{", "return", "leftMessage", "....
Returns the error message, which has been previously set to be displayed. @return The error message, which has been previously set to be displayed, as an instance of the type {@link CharSequence} or null, if no error has been set or if it has already been cleared by the widget
[ "Returns", "the", "error", "message", "which", "has", "been", "previously", "set", "to", "be", "displayed", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L887-L893
8,126
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.setError
public void setError(@Nullable final CharSequence error, @Nullable final Drawable icon) { setLeftMessage(error, icon); setActivated(error != null); }
java
public void setError(@Nullable final CharSequence error, @Nullable final Drawable icon) { setLeftMessage(error, icon); setActivated(error != null); }
[ "public", "void", "setError", "(", "@", "Nullable", "final", "CharSequence", "error", ",", "@", "Nullable", "final", "Drawable", "icon", ")", "{", "setLeftMessage", "(", "error", ",", "icon", ")", ";", "setActivated", "(", "error", "!=", "null", ")", ";", ...
Sets an error message and an icon, which should be displayed. @param error The error message, which should be displayed, as an instance of the type {@link CharSequence} or null, if a previously set error message should be cleared be cleared @param icon The icon, which should be displayed,as an instance of the type {@l...
[ "Sets", "an", "error", "message", "and", "an", "icon", "which", "should", "be", "displayed", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L918-L921
8,127
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java
JDBCRepository.closeDataSource
public static boolean closeDataSource(DataSource ds) throws SQLException { try { Method closeMethod = ds.getClass().getMethod("close"); try { closeMethod.invoke(ds); } catch (Throwable e) { ThrowUnchecked.fireFirstDeclaredCause(e, SQLExce...
java
public static boolean closeDataSource(DataSource ds) throws SQLException { try { Method closeMethod = ds.getClass().getMethod("close"); try { closeMethod.invoke(ds); } catch (Throwable e) { ThrowUnchecked.fireFirstDeclaredCause(e, SQLExce...
[ "public", "static", "boolean", "closeDataSource", "(", "DataSource", "ds", ")", "throws", "SQLException", "{", "try", "{", "Method", "closeMethod", "=", "ds", ".", "getClass", "(", ")", ".", "getMethod", "(", "\"close\"", ")", ";", "try", "{", "closeMethod",...
Attempts to close a DataSource by searching for a "close" method. For some reason, there's no standard way to close a DataSource. @return false if DataSource doesn't have a close method.
[ "Attempts", "to", "close", "a", "DataSource", "by", "searching", "for", "a", "close", "method", ".", "For", "some", "reason", "there", "s", "no", "standard", "way", "to", "close", "a", "DataSource", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java#L90-L102
8,128
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java
JDBCRepository.getJDBCStorableProperty
<S extends Storable> JDBCStorableProperty<S> getJDBCStorableProperty(StorableProperty<S> property) throws RepositoryException, SupportException { JDBCStorableInfo<S> info = examineStorable(property.getEnclosingType()); JDBCStorableProperty<S> jProperty = info.getAllProperties()....
java
<S extends Storable> JDBCStorableProperty<S> getJDBCStorableProperty(StorableProperty<S> property) throws RepositoryException, SupportException { JDBCStorableInfo<S> info = examineStorable(property.getEnclosingType()); JDBCStorableProperty<S> jProperty = info.getAllProperties()....
[ "<", "S", "extends", "Storable", ">", "JDBCStorableProperty", "<", "S", ">", "getJDBCStorableProperty", "(", "StorableProperty", "<", "S", ">", "property", ")", "throws", "RepositoryException", ",", "SupportException", "{", "JDBCStorableInfo", "<", "S", ">", "info...
Convenience method to convert a regular StorableProperty into a JDBCStorableProperty. @throws UnsupportedOperationException if JDBCStorableProperty is not supported
[ "Convenience", "method", "to", "convert", "a", "regular", "StorableProperty", "into", "a", "JDBCStorableProperty", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java#L410-L421
8,129
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java
JDBCRepository.getConnection
public Connection getConnection() throws FetchException { try { if (mOpenConnections == null) { throw new FetchException("Repository is closed"); } JDBCTransaction txn = localTransactionScope().getTxn(); if (txn != null) { ...
java
public Connection getConnection() throws FetchException { try { if (mOpenConnections == null) { throw new FetchException("Repository is closed"); } JDBCTransaction txn = localTransactionScope().getTxn(); if (txn != null) { ...
[ "public", "Connection", "getConnection", "(", ")", "throws", "FetchException", "{", "try", "{", "if", "(", "mOpenConnections", "==", "null", ")", "{", "throw", "new", "FetchException", "(", "\"Repository is closed\"", ")", ";", "}", "JDBCTransaction", "txn", "="...
Any connection returned by this method must be closed by calling yieldConnection on this repository.
[ "Any", "connection", "returned", "by", "this", "method", "must", "be", "closed", "by", "calling", "yieldConnection", "on", "this", "repository", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java#L431-L462
8,130
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java
JDBCRepository.getConnectionForTxn
Connection getConnectionForTxn(IsolationLevel level) throws FetchException { try { if (mOpenConnections == null) { throw new FetchException("Repository is closed"); } // Get connection outside lock section since it may block. Connection con...
java
Connection getConnectionForTxn(IsolationLevel level) throws FetchException { try { if (mOpenConnections == null) { throw new FetchException("Repository is closed"); } // Get connection outside lock section since it may block. Connection con...
[ "Connection", "getConnectionForTxn", "(", "IsolationLevel", "level", ")", "throws", "FetchException", "{", "try", "{", "if", "(", "mOpenConnections", "==", "null", ")", "{", "throw", "new", "FetchException", "(", "\"Repository is closed\"", ")", ";", "}", "// Get ...
Called by JDBCTransactionManager.
[ "Called", "by", "JDBCTransactionManager", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java#L467-L500
8,131
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java
JDBCRepository.yieldConnection
public void yieldConnection(Connection con) throws FetchException { try { if (con.getAutoCommit()) { closeConnection(con); } // Connections which aren't auto-commit are in a transaction. Keep // them around instead of closing them. }...
java
public void yieldConnection(Connection con) throws FetchException { try { if (con.getAutoCommit()) { closeConnection(con); } // Connections which aren't auto-commit are in a transaction. Keep // them around instead of closing them. }...
[ "public", "void", "yieldConnection", "(", "Connection", "con", ")", "throws", "FetchException", "{", "try", "{", "if", "(", "con", ".", "getAutoCommit", "(", ")", ")", "{", "closeConnection", "(", "con", ")", ";", "}", "// Connections which aren't auto-commit ar...
Gives up a connection returned from getConnection. Connection must be yielded in same thread that retrieved it.
[ "Gives", "up", "a", "connection", "returned", "from", "getConnection", ".", "Connection", "must", "be", "yielded", "in", "same", "thread", "that", "retrieved", "it", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java#L506-L516
8,132
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/spi/LobEngineTrigger.java
LobEngineTrigger.beforeInsert
@Override public Object beforeInsert(S storable) throws PersistException { // Capture user lob values for later and replace with new locators. int length = mLobProperties.length; Object[] userLobs = new Object[length]; for (int i=0; i<length; i++) { LobProperty<Lob>...
java
@Override public Object beforeInsert(S storable) throws PersistException { // Capture user lob values for later and replace with new locators. int length = mLobProperties.length; Object[] userLobs = new Object[length]; for (int i=0; i<length; i++) { LobProperty<Lob>...
[ "@", "Override", "public", "Object", "beforeInsert", "(", "S", "storable", ")", "throws", "PersistException", "{", "// Capture user lob values for later and replace with new locators.\r", "int", "length", "=", "mLobProperties", ".", "length", ";", "Object", "[", "]", "u...
Returns user specified Lob values
[ "Returns", "user", "specified", "Lob", "values" ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/LobEngineTrigger.java#L52-L67
8,133
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/spi/LobEngineTrigger.java
LobEngineTrigger.beforeDelete
@Override public Object beforeDelete(S storable) throws PersistException { S existing = (S) storable.copy(); try { if (!existing.tryLoad()) { existing = null; } return existing; } catch (FetchException e) { throw e.toPe...
java
@Override public Object beforeDelete(S storable) throws PersistException { S existing = (S) storable.copy(); try { if (!existing.tryLoad()) { existing = null; } return existing; } catch (FetchException e) { throw e.toPe...
[ "@", "Override", "public", "Object", "beforeDelete", "(", "S", "storable", ")", "throws", "PersistException", "{", "S", "existing", "=", "(", "S", ")", "storable", ".", "copy", "(", ")", ";", "try", "{", "if", "(", "!", "existing", ".", "tryLoad", "(",...
Returns existing Storable or null
[ "Returns", "existing", "Storable", "or", "null" ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/LobEngineTrigger.java#L142-L153
8,134
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/constraints/text/RegexConstraint.java
RegexConstraint.setRegex
public final void setRegex(@NonNull final Pattern regex) { Condition.INSTANCE.ensureNotNull(regex, "The regular expression may not be null"); this.regex = regex; }
java
public final void setRegex(@NonNull final Pattern regex) { Condition.INSTANCE.ensureNotNull(regex, "The regular expression may not be null"); this.regex = regex; }
[ "public", "final", "void", "setRegex", "(", "@", "NonNull", "final", "Pattern", "regex", ")", "{", "Condition", ".", "INSTANCE", ".", "ensureNotNull", "(", "regex", ",", "\"The regular expression may not be null\"", ")", ";", "this", ".", "regex", "=", "regex", ...
Sets the regular expression, which should be used to verify the texts. @param regex The regular expression, which should be set, as an instance of the class {@link Pattern}. The regular expression may not be null
[ "Sets", "the", "regular", "expression", "which", "should", "be", "used", "to", "verify", "the", "texts", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/constraints/text/RegexConstraint.java#L66-L69
8,135
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/filter/FilterParser.java
FilterParser.parseRoot
Filter<S> parseRoot() { Filter<S> filter = parseFilter(); int c = nextCharIgnoreWhitespace(); if (c >= 0) { mPos--; throw error("Unexpected trailing characters"); } return filter; }
java
Filter<S> parseRoot() { Filter<S> filter = parseFilter(); int c = nextCharIgnoreWhitespace(); if (c >= 0) { mPos--; throw error("Unexpected trailing characters"); } return filter; }
[ "Filter", "<", "S", ">", "parseRoot", "(", ")", "{", "Filter", "<", "S", ">", "filter", "=", "parseFilter", "(", ")", ";", "int", "c", "=", "nextCharIgnoreWhitespace", "(", ")", ";", "if", "(", "c", ">=", "0", ")", "{", "mPos", "--", ";", "throw"...
all rolled into one. This is okay since the grammar is so simple.
[ "all", "rolled", "into", "one", ".", "This", "is", "okay", "since", "the", "grammar", "is", "so", "simple", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/FilterParser.java#L62-L70
8,136
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/filter/FilterParser.java
FilterParser.nextChar
private int nextChar() { String filter = mFilter; int pos = mPos; int c = (pos >= filter.length()) ? -1 : mFilter.charAt(pos); mPos = pos + 1; return c; }
java
private int nextChar() { String filter = mFilter; int pos = mPos; int c = (pos >= filter.length()) ? -1 : mFilter.charAt(pos); mPos = pos + 1; return c; }
[ "private", "int", "nextChar", "(", ")", "{", "String", "filter", "=", "mFilter", ";", "int", "pos", "=", "mPos", ";", "int", "c", "=", "(", "pos", ">=", "filter", ".", "length", "(", ")", ")", "?", "-", "1", ":", "mFilter", ".", "charAt", "(", ...
Returns -1 if no more characters.
[ "Returns", "-", "1", "if", "no", "more", "characters", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/FilterParser.java#L409-L415
8,137
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java
BDBCursor.getData
protected static byte[] getData(byte[] data, int size) { if (data == null) { return NO_DATA; } if (data.length <= size) { return data; } byte[] newData = new byte[size]; System.arraycopy(data, 0, newData, 0, size); return newData; ...
java
protected static byte[] getData(byte[] data, int size) { if (data == null) { return NO_DATA; } if (data.length <= size) { return data; } byte[] newData = new byte[size]; System.arraycopy(data, 0, newData, 0, size); return newData; ...
[ "protected", "static", "byte", "[", "]", "getData", "(", "byte", "[", "]", "data", ",", "int", "size", ")", "{", "if", "(", "data", "==", "null", ")", "{", "return", "NO_DATA", ";", "}", "if", "(", "data", ".", "length", "<=", "size", ")", "{", ...
If the given byte array is less than or equal to given size, it is simply returned. Otherwise, a new array is allocated and the data is copied.
[ "If", "the", "given", "byte", "array", "is", "less", "than", "or", "equal", "to", "given", "size", "it", "is", "simply", "returned", ".", "Otherwise", "a", "new", "array", "is", "allocated", "and", "the", "data", "is", "copied", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java#L247-L257
8,138
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java
BDBCursor.getDataCopy
protected static byte[] getDataCopy(byte[] data, int size) { if (data == null) { return NO_DATA; } byte[] newData = new byte[size]; System.arraycopy(data, 0, newData, 0, size); return newData; }
java
protected static byte[] getDataCopy(byte[] data, int size) { if (data == null) { return NO_DATA; } byte[] newData = new byte[size]; System.arraycopy(data, 0, newData, 0, size); return newData; }
[ "protected", "static", "byte", "[", "]", "getDataCopy", "(", "byte", "[", "]", "data", ",", "int", "size", ")", "{", "if", "(", "data", "==", "null", ")", "{", "return", "NO_DATA", ";", "}", "byte", "[", "]", "newData", "=", "new", "byte", "[", "...
Returns a copy of the data array.
[ "Returns", "a", "copy", "of", "the", "data", "array", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java#L262-L269
8,139
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/validators/text/EqualValidator.java
EqualValidator.setEditText
public final void setEditText(@NonNull final EditText editText) { Condition.INSTANCE.ensureNotNull(editText, "The edit text widget may not be null"); this.editText = editText; }
java
public final void setEditText(@NonNull final EditText editText) { Condition.INSTANCE.ensureNotNull(editText, "The edit text widget may not be null"); this.editText = editText; }
[ "public", "final", "void", "setEditText", "(", "@", "NonNull", "final", "EditText", "editText", ")", "{", "Condition", ".", "INSTANCE", ".", "ensureNotNull", "(", "editText", ",", "\"The edit text widget may not be null\"", ")", ";", "this", ".", "editText", "=", ...
Sets the edit text widget, which contains the content, the texts should be equal to. @param editText The edit text widget, which should be set, as an instance of the class {@link EditText}. The widget may not be null
[ "Sets", "the", "edit", "text", "widget", "which", "contains", "the", "content", "the", "texts", "should", "be", "equal", "to", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/validators/text/EqualValidator.java#L93-L96
8,140
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/RawUtil.java
RawUtil.increment
public static boolean increment(byte[] value) { for (int i=value.length; --i>=0; ) { byte newValue = (byte) ((value[i] & 0xff) + 1); value[i] = newValue; if (newValue != 0) { // No carry bit, so done adding. return true; } ...
java
public static boolean increment(byte[] value) { for (int i=value.length; --i>=0; ) { byte newValue = (byte) ((value[i] & 0xff) + 1); value[i] = newValue; if (newValue != 0) { // No carry bit, so done adding. return true; } ...
[ "public", "static", "boolean", "increment", "(", "byte", "[", "]", "value", ")", "{", "for", "(", "int", "i", "=", "value", ".", "length", ";", "--", "i", ">=", "0", ";", ")", "{", "byte", "newValue", "=", "(", "byte", ")", "(", "(", "value", "...
Adds one to an unsigned integer, represented as a byte array. If overflowed, value in byte array is 0x00, 0x00, 0x00... @param value unsigned integer to increment @return false if overflowed
[ "Adds", "one", "to", "an", "unsigned", "integer", "represented", "as", "a", "byte", "array", ".", "If", "overflowed", "value", "in", "byte", "array", "is", "0x00", "0x00", "0x00", "..." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/RawUtil.java#L34-L45
8,141
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/RawUtil.java
RawUtil.decrement
public static boolean decrement(byte[] value) { for (int i=value.length; --i>=0; ) { byte newValue = (byte) ((value[i] & 0xff) + -1); value[i] = newValue; if (newValue != -1) { // No borrow bit, so done subtracting. return true; ...
java
public static boolean decrement(byte[] value) { for (int i=value.length; --i>=0; ) { byte newValue = (byte) ((value[i] & 0xff) + -1); value[i] = newValue; if (newValue != -1) { // No borrow bit, so done subtracting. return true; ...
[ "public", "static", "boolean", "decrement", "(", "byte", "[", "]", "value", ")", "{", "for", "(", "int", "i", "=", "value", ".", "length", ";", "--", "i", ">=", "0", ";", ")", "{", "byte", "newValue", "=", "(", "byte", ")", "(", "(", "value", "...
Subtracts one from an unsigned integer, represented as a byte array. If overflowed, value in byte array is 0xff, 0xff, 0xff... @param value unsigned integer to decrement @return false if overflowed
[ "Subtracts", "one", "from", "an", "unsigned", "integer", "represented", "as", "a", "byte", "array", ".", "If", "overflowed", "value", "in", "byte", "array", "is", "0xff", "0xff", "0xff", "..." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/RawUtil.java#L54-L65
8,142
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/CompositeScore.java
CompositeScore.evaluate
public static <S extends Storable> CompositeScore<S> evaluate (StorableIndex<S> index, Filter<S> filter, OrderingList<S> ordering) { if (index == null) { throw new IllegalArgumentException("Index required"); } return evaluate(index.getOrderedPr...
java
public static <S extends Storable> CompositeScore<S> evaluate (StorableIndex<S> index, Filter<S> filter, OrderingList<S> ordering) { if (index == null) { throw new IllegalArgumentException("Index required"); } return evaluate(index.getOrderedPr...
[ "public", "static", "<", "S", "extends", "Storable", ">", "CompositeScore", "<", "S", ">", "evaluate", "(", "StorableIndex", "<", "S", ">", "index", ",", "Filter", "<", "S", ">", "filter", ",", "OrderingList", "<", "S", ">", "ordering", ")", "{", "if",...
Evaluates the given index for its filtering and ordering capabilities against the given filter and order-by properties. @param index index to evaluate @param filter optional filter which cannot contain any logical 'or' operations. @param ordering optional properties which define desired ordering @throws IllegalArgumen...
[ "Evaluates", "the", "given", "index", "for", "its", "filtering", "and", "ordering", "capabilities", "against", "the", "given", "filter", "and", "order", "-", "by", "properties", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/CompositeScore.java#L48-L62
8,143
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/CompositeScore.java
CompositeScore.evaluate
public static <S extends Storable> CompositeScore<S> evaluate (OrderedProperty<S>[] indexProperties, boolean unique, boolean clustered, Filter<S> filter, OrderingList<S> ordering) { FilteringScore<S> filteringScore = FilteringScore .evaluate(in...
java
public static <S extends Storable> CompositeScore<S> evaluate (OrderedProperty<S>[] indexProperties, boolean unique, boolean clustered, Filter<S> filter, OrderingList<S> ordering) { FilteringScore<S> filteringScore = FilteringScore .evaluate(in...
[ "public", "static", "<", "S", "extends", "Storable", ">", "CompositeScore", "<", "S", ">", "evaluate", "(", "OrderedProperty", "<", "S", ">", "[", "]", "indexProperties", ",", "boolean", "unique", ",", "boolean", "clustered", ",", "Filter", "<", "S", ">", ...
Evaluates the given index properties for its filtering and ordering capabilities against the given filter and order-by properties. @param indexProperties index properties to evaluate @param unique true if index is unique @param clustered true if index is clustered @param filter optional filter which cannot contain any...
[ "Evaluates", "the", "given", "index", "properties", "for", "its", "filtering", "and", "ordering", "capabilities", "against", "the", "given", "filter", "and", "order", "-", "by", "properties", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/CompositeScore.java#L75-L89
8,144
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/CompositeScore.java
CompositeScore.canMergeRemainder
public boolean canMergeRemainder(CompositeScore<S> other) { return getFilteringScore().canMergeRemainderFilter(other.getFilteringScore()) && getOrderingScore().canMergeRemainderOrdering(other.getOrderingScore()); }
java
public boolean canMergeRemainder(CompositeScore<S> other) { return getFilteringScore().canMergeRemainderFilter(other.getFilteringScore()) && getOrderingScore().canMergeRemainderOrdering(other.getOrderingScore()); }
[ "public", "boolean", "canMergeRemainder", "(", "CompositeScore", "<", "S", ">", "other", ")", "{", "return", "getFilteringScore", "(", ")", ".", "canMergeRemainderFilter", "(", "other", ".", "getFilteringScore", "(", ")", ")", "&&", "getOrderingScore", "(", ")",...
Returns true if the filtering score can merge its remainder filter and the ordering score can merge its remainder orderings.
[ "Returns", "true", "if", "the", "filtering", "score", "can", "merge", "its", "remainder", "filter", "and", "the", "ordering", "score", "can", "merge", "its", "remainder", "orderings", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/CompositeScore.java#L177-L180
8,145
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/CompositeScore.java
CompositeScore.mergeRemainderFilter
public Filter<S> mergeRemainderFilter(CompositeScore<S> other) { return getFilteringScore().mergeRemainderFilter(other.getFilteringScore()); }
java
public Filter<S> mergeRemainderFilter(CompositeScore<S> other) { return getFilteringScore().mergeRemainderFilter(other.getFilteringScore()); }
[ "public", "Filter", "<", "S", ">", "mergeRemainderFilter", "(", "CompositeScore", "<", "S", ">", "other", ")", "{", "return", "getFilteringScore", "(", ")", ".", "mergeRemainderFilter", "(", "other", ".", "getFilteringScore", "(", ")", ")", ";", "}" ]
Merges the remainder filter of this score with the one given using an 'or' operation. Call canMergeRemainder first to verify if the merge makes any sense.
[ "Merges", "the", "remainder", "filter", "of", "this", "score", "with", "the", "one", "given", "using", "an", "or", "operation", ".", "Call", "canMergeRemainder", "first", "to", "verify", "if", "the", "merge", "makes", "any", "sense", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/CompositeScore.java#L187-L189
8,146
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/CompositeScore.java
CompositeScore.mergeRemainderOrdering
public OrderingList<S> mergeRemainderOrdering(CompositeScore<S> other) { return getOrderingScore().mergeRemainderOrdering(other.getOrderingScore()); }
java
public OrderingList<S> mergeRemainderOrdering(CompositeScore<S> other) { return getOrderingScore().mergeRemainderOrdering(other.getOrderingScore()); }
[ "public", "OrderingList", "<", "S", ">", "mergeRemainderOrdering", "(", "CompositeScore", "<", "S", ">", "other", ")", "{", "return", "getOrderingScore", "(", ")", ".", "mergeRemainderOrdering", "(", "other", ".", "getOrderingScore", "(", ")", ")", ";", "}" ]
Merges the remainder orderings of this score with the one given. Call canMergeRemainder first to verify if the merge makes any sense.
[ "Merges", "the", "remainder", "orderings", "of", "this", "score", "with", "the", "one", "given", ".", "Call", "canMergeRemainder", "first", "to", "verify", "if", "the", "merge", "makes", "any", "sense", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/CompositeScore.java#L195-L197
8,147
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/CompositeScore.java
CompositeScore.withRemainderFilter
public CompositeScore<S> withRemainderFilter(Filter<S> filter) { return new CompositeScore<S>(mFilteringScore.withRemainderFilter(filter), mOrderingScore); }
java
public CompositeScore<S> withRemainderFilter(Filter<S> filter) { return new CompositeScore<S>(mFilteringScore.withRemainderFilter(filter), mOrderingScore); }
[ "public", "CompositeScore", "<", "S", ">", "withRemainderFilter", "(", "Filter", "<", "S", ">", "filter", ")", "{", "return", "new", "CompositeScore", "<", "S", ">", "(", "mFilteringScore", ".", "withRemainderFilter", "(", "filter", ")", ",", "mOrderingScore",...
Returns a new CompositeScore with the filtering remainder replaced and covering matches recalculated. Other matches are not recalculated. @since 1.2
[ "Returns", "a", "new", "CompositeScore", "with", "the", "filtering", "remainder", "replaced", "and", "covering", "matches", "recalculated", ".", "Other", "matches", "are", "not", "recalculated", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/CompositeScore.java#L205-L208
8,148
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/CompositeScore.java
CompositeScore.withRemainderOrdering
public CompositeScore<S> withRemainderOrdering(OrderingList<S> ordering) { return new CompositeScore<S>(mFilteringScore, mOrderingScore.withRemainderOrdering(ordering)); }
java
public CompositeScore<S> withRemainderOrdering(OrderingList<S> ordering) { return new CompositeScore<S>(mFilteringScore, mOrderingScore.withRemainderOrdering(ordering)); }
[ "public", "CompositeScore", "<", "S", ">", "withRemainderOrdering", "(", "OrderingList", "<", "S", ">", "ordering", ")", "{", "return", "new", "CompositeScore", "<", "S", ">", "(", "mFilteringScore", ",", "mOrderingScore", ".", "withRemainderOrdering", "(", "ord...
Returns a new CompositeScore with the ordering remainder replaced. Handled count is not recalculated. @since 1.2
[ "Returns", "a", "new", "CompositeScore", "with", "the", "ordering", "remainder", "replaced", ".", "Handled", "count", "is", "not", "recalculated", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/CompositeScore.java#L216-L219
8,149
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/StandardQuery.java
StandardQuery.executor
protected QueryExecutor<S> executor() throws RepositoryException { QueryExecutor<S> executor = mExecutor; if (executor == null) { mExecutor = executor = executorFactory().executor(mFilter, mOrdering, null); } return executor; }
java
protected QueryExecutor<S> executor() throws RepositoryException { QueryExecutor<S> executor = mExecutor; if (executor == null) { mExecutor = executor = executorFactory().executor(mFilter, mOrdering, null); } return executor; }
[ "protected", "QueryExecutor", "<", "S", ">", "executor", "(", ")", "throws", "RepositoryException", "{", "QueryExecutor", "<", "S", ">", "executor", "=", "mExecutor", ";", "if", "(", "executor", "==", "null", ")", "{", "mExecutor", "=", "executor", "=", "e...
Returns the executor in use by this query.
[ "Returns", "the", "executor", "in", "use", "by", "this", "query", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/StandardQuery.java#L508-L514
8,150
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/StandardQuery.java
StandardQuery.resetExecutor
protected void resetExecutor() throws RepositoryException { if (mExecutor != null) { mExecutor = executorFactory().executor(mFilter, mOrdering, null); } }
java
protected void resetExecutor() throws RepositoryException { if (mExecutor != null) { mExecutor = executorFactory().executor(mFilter, mOrdering, null); } }
[ "protected", "void", "resetExecutor", "(", ")", "throws", "RepositoryException", "{", "if", "(", "mExecutor", "!=", "null", ")", "{", "mExecutor", "=", "executorFactory", "(", ")", ".", "executor", "(", "mFilter", ",", "mOrdering", ",", "null", ")", ";", "...
Resets any cached reference to a query executor. If a reference is available, it is replaced, but a clear reference is not set.
[ "Resets", "any", "cached", "reference", "to", "a", "query", "executor", ".", "If", "a", "reference", "is", "available", "it", "is", "replaced", "but", "a", "clear", "reference", "is", "not", "set", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/StandardQuery.java#L528-L532
8,151
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java
AbstractQueryExecutor.fetchSlice
public Cursor<S> fetchSlice(FilterValues<S> values, long from, Long to) throws FetchException { Cursor<S> cursor = fetch(values); if (from > 0) { cursor = new SkipCursor<S>(cursor, from); } if (to != null) { cursor = new LimitCursor<S>(cursor, to - from); ...
java
public Cursor<S> fetchSlice(FilterValues<S> values, long from, Long to) throws FetchException { Cursor<S> cursor = fetch(values); if (from > 0) { cursor = new SkipCursor<S>(cursor, from); } if (to != null) { cursor = new LimitCursor<S>(cursor, to - from); ...
[ "public", "Cursor", "<", "S", ">", "fetchSlice", "(", "FilterValues", "<", "S", ">", "values", ",", "long", "from", ",", "Long", "to", ")", "throws", "FetchException", "{", "Cursor", "<", "S", ">", "cursor", "=", "fetch", "(", "values", ")", ";", "if...
Produces a slice via skip and limit cursors. Subclasses are encouraged to override with a more efficient implementation. @since 1.2
[ "Produces", "a", "slice", "via", "skip", "and", "limit", "cursors", ".", "Subclasses", "are", "encouraged", "to", "override", "with", "a", "more", "efficient", "implementation", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java#L49-L58
8,152
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java
AbstractQueryExecutor.count
public long count(FilterValues<S> values) throws FetchException { Cursor<S> cursor = fetch(values); try { long count = cursor.skipNext(Integer.MAX_VALUE); if (count == Integer.MAX_VALUE) { int amt; while ((amt = cursor.skipNext(Integer.MAX_VA...
java
public long count(FilterValues<S> values) throws FetchException { Cursor<S> cursor = fetch(values); try { long count = cursor.skipNext(Integer.MAX_VALUE); if (count == Integer.MAX_VALUE) { int amt; while ((amt = cursor.skipNext(Integer.MAX_VA...
[ "public", "long", "count", "(", "FilterValues", "<", "S", ">", "values", ")", "throws", "FetchException", "{", "Cursor", "<", "S", ">", "cursor", "=", "fetch", "(", "values", ")", ";", "try", "{", "long", "count", "=", "cursor", ".", "skipNext", "(", ...
Counts results by opening a cursor and skipping entries. Subclasses are encouraged to override with a more efficient implementation.
[ "Counts", "results", "by", "opening", "a", "cursor", "and", "skipping", "entries", ".", "Subclasses", "are", "encouraged", "to", "override", "with", "a", "more", "efficient", "implementation", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java#L84-L98
8,153
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java
AbstractQueryExecutor.indent
protected void indent(Appendable app, int indentLevel) throws IOException { for (int i=0; i<indentLevel; i++) { app.append(' '); } }
java
protected void indent(Appendable app, int indentLevel) throws IOException { for (int i=0; i<indentLevel; i++) { app.append(' '); } }
[ "protected", "void", "indent", "(", "Appendable", "app", ",", "int", "indentLevel", ")", "throws", "IOException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "indentLevel", ";", "i", "++", ")", "{", "app", ".", "append", "(", "'", "'", ")...
Appends spaces to the given appendable. Useful for implementing printNative and printPlan.
[ "Appends", "spaces", "to", "the", "given", "appendable", ".", "Useful", "for", "implementing", "printNative", "and", "printPlan", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java#L133-L137
8,154
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.lockForReadInterruptibly
public final void lockForReadInterruptibly(L locker) throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } if (!tryLockForRead(locker)) { lockForReadQueuedInterruptibly(locker, addReadWaiter()); } }
java
public final void lockForReadInterruptibly(L locker) throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } if (!tryLockForRead(locker)) { lockForReadQueuedInterruptibly(locker, addReadWaiter()); } }
[ "public", "final", "void", "lockForReadInterruptibly", "(", "L", "locker", ")", "throws", "InterruptedException", "{", "if", "(", "Thread", ".", "interrupted", "(", ")", ")", "{", "throw", "new", "InterruptedException", "(", ")", ";", "}", "if", "(", "!", ...
Acquire a shared read lock, possibly blocking until interrupted. @param locker object which might be write or upgrade lock owner
[ "Acquire", "a", "shared", "read", "lock", "possibly", "blocking", "until", "interrupted", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L158-L165
8,155
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.tryLockForRead
public final boolean tryLockForRead(L locker) { int state = mState; if (state >= 0) { // no write lock is held if (isReadWriteFirst() || isReadLockHeld(locker)) { do { if (incrementReadLocks(state)) { adjustReadLockCount(locke...
java
public final boolean tryLockForRead(L locker) { int state = mState; if (state >= 0) { // no write lock is held if (isReadWriteFirst() || isReadLockHeld(locker)) { do { if (incrementReadLocks(state)) { adjustReadLockCount(locke...
[ "public", "final", "boolean", "tryLockForRead", "(", "L", "locker", ")", "{", "int", "state", "=", "mState", ";", "if", "(", "state", ">=", "0", ")", "{", "// no write lock is held\r", "if", "(", "isReadWriteFirst", "(", ")", "||", "isReadLockHeld", "(", "...
Attempt to immediately acquire a shared read lock. @param locker object which might be write or upgrade lock owner @return true if acquired
[ "Attempt", "to", "immediately", "acquire", "a", "shared", "read", "lock", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L173-L194
8,156
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.tryLockForRead
public final boolean tryLockForRead(L locker, long timeout, TimeUnit unit) throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } if (!tryLockForRead(locker)) { return lockForReadQueuedInterruptibly(locker, addRead...
java
public final boolean tryLockForRead(L locker, long timeout, TimeUnit unit) throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } if (!tryLockForRead(locker)) { return lockForReadQueuedInterruptibly(locker, addRead...
[ "public", "final", "boolean", "tryLockForRead", "(", "L", "locker", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", "{", "if", "(", "Thread", ".", "interrupted", "(", ")", ")", "{", "throw", "new", "InterruptedException"...
Attempt to acquire a shared read lock, waiting a maximum amount of time. @param locker object which might be write or upgrade lock owner @return true if acquired
[ "Attempt", "to", "acquire", "a", "shared", "read", "lock", "waiting", "a", "maximum", "amount", "of", "time", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L203-L213
8,157
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.unlockFromRead
public final void unlockFromRead(L locker) { adjustReadLockCount(locker, -1); int readLocks; while ((readLocks = decrementReadLocks(mState)) < 0) {} if (readLocks == 0) { Node h = mRWHead; if (h != null && h.mWaitStatus != 0) { unparkRea...
java
public final void unlockFromRead(L locker) { adjustReadLockCount(locker, -1); int readLocks; while ((readLocks = decrementReadLocks(mState)) < 0) {} if (readLocks == 0) { Node h = mRWHead; if (h != null && h.mWaitStatus != 0) { unparkRea...
[ "public", "final", "void", "unlockFromRead", "(", "L", "locker", ")", "{", "adjustReadLockCount", "(", "locker", ",", "-", "1", ")", ";", "int", "readLocks", ";", "while", "(", "(", "readLocks", "=", "decrementReadLocks", "(", "mState", ")", ")", "<", "0...
Release a previously acquired read lock.
[ "Release", "a", "previously", "acquired", "read", "lock", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L218-L230
8,158
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.lockForUpgrade_
private final Result lockForUpgrade_(L locker) { Result result; if ((result = tryLockForUpgrade_(locker)) == Result.FAILED) { result = lockForUpgradeQueued(locker, addUpgradeWaiter()); } return result; }
java
private final Result lockForUpgrade_(L locker) { Result result; if ((result = tryLockForUpgrade_(locker)) == Result.FAILED) { result = lockForUpgradeQueued(locker, addUpgradeWaiter()); } return result; }
[ "private", "final", "Result", "lockForUpgrade_", "(", "L", "locker", ")", "{", "Result", "result", ";", "if", "(", "(", "result", "=", "tryLockForUpgrade_", "(", "locker", ")", ")", "==", "Result", ".", "FAILED", ")", "{", "result", "=", "lockForUpgradeQue...
Acquire an upgrade lock, possibly blocking indefinitely. @param locker object trying to become lock owner @return ACQUIRED or OWNED
[ "Acquire", "an", "upgrade", "lock", "possibly", "blocking", "indefinitely", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L248-L254
8,159
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.lockForUpgradeInterruptibly_
private final Result lockForUpgradeInterruptibly_(L locker) throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } Result result; if ((result = tryLockForUpgrade_(locker)) == Result.FAILED) { result = lockForUpgradeQueu...
java
private final Result lockForUpgradeInterruptibly_(L locker) throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } Result result; if ((result = tryLockForUpgrade_(locker)) == Result.FAILED) { result = lockForUpgradeQueu...
[ "private", "final", "Result", "lockForUpgradeInterruptibly_", "(", "L", "locker", ")", "throws", "InterruptedException", "{", "if", "(", "Thread", ".", "interrupted", "(", ")", ")", "{", "throw", "new", "InterruptedException", "(", ")", ";", "}", "Result", "re...
Acquire an upgrade lock, possibly blocking until interrupted. @param locker object trying to become lock owner @return ACQUIRED or OWNED
[ "Acquire", "an", "upgrade", "lock", "possibly", "blocking", "until", "interrupted", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L272-L281
8,160
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.tryLockForUpgrade_
private final Result tryLockForUpgrade_(L locker) { int state = mState; if ((state & LOCK_STATE_MASK) == 0) { // no write or upgrade lock is held if (isUpgradeFirst()) { do { if (setUpgradeLock(state)) { mOwner = locker; ...
java
private final Result tryLockForUpgrade_(L locker) { int state = mState; if ((state & LOCK_STATE_MASK) == 0) { // no write or upgrade lock is held if (isUpgradeFirst()) { do { if (setUpgradeLock(state)) { mOwner = locker; ...
[ "private", "final", "Result", "tryLockForUpgrade_", "(", "L", "locker", ")", "{", "int", "state", "=", "mState", ";", "if", "(", "(", "state", "&", "LOCK_STATE_MASK", ")", "==", "0", ")", "{", "// no write or upgrade lock is held\r", "if", "(", "isUpgradeFirst...
Attempt to immediately acquire an upgrade lock. @param locker object trying to become lock owner @return FAILED, ACQUIRED or OWNED
[ "Attempt", "to", "immediately", "acquire", "an", "upgrade", "lock", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L299-L317
8,161
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.unlockFromUpgrade
public final void unlockFromUpgrade(L locker) { int upgradeCount = mUpgradeCount - 1; if (upgradeCount < 0) { throw new IllegalMonitorStateException("Too many upgrade locks released"); } if (upgradeCount == 0 && mWriteCount > 0) { // Don't release last upgra...
java
public final void unlockFromUpgrade(L locker) { int upgradeCount = mUpgradeCount - 1; if (upgradeCount < 0) { throw new IllegalMonitorStateException("Too many upgrade locks released"); } if (upgradeCount == 0 && mWriteCount > 0) { // Don't release last upgra...
[ "public", "final", "void", "unlockFromUpgrade", "(", "L", "locker", ")", "{", "int", "upgradeCount", "=", "mUpgradeCount", "-", "1", ";", "if", "(", "upgradeCount", "<", "0", ")", "{", "throw", "new", "IllegalMonitorStateException", "(", "\"Too many upgrade lock...
Release a previously acquired upgrade lock.
[ "Release", "a", "previously", "acquired", "upgrade", "lock", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L354-L379
8,162
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.lockForWrite
public final void lockForWrite(L locker) { if (!tryLockForWrite(locker)) { Result upgradeResult = lockForUpgrade_(locker); if (!tryLockForWrite(locker)) { lockForWriteQueued(locker, addWriteWaiter()); } if (upgradeResult == Result.ACQUIRED) {...
java
public final void lockForWrite(L locker) { if (!tryLockForWrite(locker)) { Result upgradeResult = lockForUpgrade_(locker); if (!tryLockForWrite(locker)) { lockForWriteQueued(locker, addWriteWaiter()); } if (upgradeResult == Result.ACQUIRED) {...
[ "public", "final", "void", "lockForWrite", "(", "L", "locker", ")", "{", "if", "(", "!", "tryLockForWrite", "(", "locker", ")", ")", "{", "Result", "upgradeResult", "=", "lockForUpgrade_", "(", "locker", ")", ";", "if", "(", "!", "tryLockForWrite", "(", ...
Acquire an exclusive write lock, possibly blocking indefinitely. @param locker object trying to become lock owner
[ "Acquire", "an", "exclusive", "write", "lock", "possibly", "blocking", "indefinitely", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L386-L400
8,163
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.lockForWriteInterruptibly
public final void lockForWriteInterruptibly(L locker) throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } if (!tryLockForWrite(locker)) { Result upgradeResult = lockForUpgradeInterruptibly_(locker); if (!tryLockF...
java
public final void lockForWriteInterruptibly(L locker) throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } if (!tryLockForWrite(locker)) { Result upgradeResult = lockForUpgradeInterruptibly_(locker); if (!tryLockF...
[ "public", "final", "void", "lockForWriteInterruptibly", "(", "L", "locker", ")", "throws", "InterruptedException", "{", "if", "(", "Thread", ".", "interrupted", "(", ")", ")", "{", "throw", "new", "InterruptedException", "(", ")", ";", "}", "if", "(", "!", ...
Acquire an exclusive write lock, possibly blocking until interrupted. @param locker object trying to become lock owner
[ "Acquire", "an", "exclusive", "write", "lock", "possibly", "blocking", "until", "interrupted", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L407-L424
8,164
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.tryLockForWrite
public final boolean tryLockForWrite(L locker) { int state = mState; if (state == 0) { // no locks are held if (isUpgradeOrReadWriteFirst() && setWriteLock(state)) { // keep upgrade state bit clear to indicate automatic upgrade mOwner = locke...
java
public final boolean tryLockForWrite(L locker) { int state = mState; if (state == 0) { // no locks are held if (isUpgradeOrReadWriteFirst() && setWriteLock(state)) { // keep upgrade state bit clear to indicate automatic upgrade mOwner = locke...
[ "public", "final", "boolean", "tryLockForWrite", "(", "L", "locker", ")", "{", "int", "state", "=", "mState", ";", "if", "(", "state", "==", "0", ")", "{", "// no locks are held\r", "if", "(", "isUpgradeOrReadWriteFirst", "(", ")", "&&", "setWriteLock", "(",...
Attempt to immediately acquire an exclusive lock. @param locker object trying to become lock owner @return true if acquired
[ "Attempt", "to", "immediately", "acquire", "an", "exclusive", "lock", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L432-L457
8,165
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.tryLockForWrite
public final boolean tryLockForWrite(L locker, long timeout, TimeUnit unit) throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } if (!tryLockForWrite(locker)) { long start = System.nanoTime(); Result...
java
public final boolean tryLockForWrite(L locker, long timeout, TimeUnit unit) throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } if (!tryLockForWrite(locker)) { long start = System.nanoTime(); Result...
[ "public", "final", "boolean", "tryLockForWrite", "(", "L", "locker", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", "{", "if", "(", "Thread", ".", "interrupted", "(", ")", ")", "{", "throw", "new", "InterruptedException...
Attempt to acquire an exclusive lock, waiting a maximum amount of time. @param locker object trying to become lock owner @return true if acquired
[ "Attempt", "to", "acquire", "an", "exclusive", "lock", "waiting", "a", "maximum", "amount", "of", "time", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L465-L495
8,166
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.unlockFromWrite
public final void unlockFromWrite(L locker) { int writeCount = mWriteCount - 1; if (writeCount < 0) { throw new IllegalMonitorStateException("Too many write locks released"); } mWriteCount = writeCount; if (writeCount > 0) { return; } ...
java
public final void unlockFromWrite(L locker) { int writeCount = mWriteCount - 1; if (writeCount < 0) { throw new IllegalMonitorStateException("Too many write locks released"); } mWriteCount = writeCount; if (writeCount > 0) { return; } ...
[ "public", "final", "void", "unlockFromWrite", "(", "L", "locker", ")", "{", "int", "writeCount", "=", "mWriteCount", "-", "1", ";", "if", "(", "writeCount", "<", "0", ")", "{", "throw", "new", "IllegalMonitorStateException", "(", "\"Too many write locks released...
Release a previously acquired write lock.
[ "Release", "a", "previously", "acquired", "write", "lock", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L500-L525
8,167
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.loadPropertyAnnotation
private void loadPropertyAnnotation(CodeBuilder b, StorableProperty property, StorablePropertyAnnotation annotation) { /* Example UserInfo.class.getMethod("setFirstName", new Class[] {String.class}) .g...
java
private void loadPropertyAnnotation(CodeBuilder b, StorableProperty property, StorablePropertyAnnotation annotation) { /* Example UserInfo.class.getMethod("setFirstName", new Class[] {String.class}) .g...
[ "private", "void", "loadPropertyAnnotation", "(", "CodeBuilder", "b", ",", "StorableProperty", "property", ",", "StorablePropertyAnnotation", "annotation", ")", "{", "/* Example\r\n UserInfo.class.getMethod(\"setFirstName\", new Class[] {String.class})\r\n .getAnn...
Generates code that loads a property annotation to the stack.
[ "Generates", "code", "that", "loads", "a", "property", "annotation", "to", "the", "stack", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L2089-L2124
8,168
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.loadStorageForFetch
private void loadStorageForFetch(CodeBuilder b, TypeDesc type) { b.loadThis(); b.loadField(SUPPORT_FIELD_NAME, mSupportType); TypeDesc storageType = TypeDesc.forClass(Storage.class); TypeDesc repositoryType = TypeDesc.forClass(Repository.class); b.invokeInterface ...
java
private void loadStorageForFetch(CodeBuilder b, TypeDesc type) { b.loadThis(); b.loadField(SUPPORT_FIELD_NAME, mSupportType); TypeDesc storageType = TypeDesc.forClass(Storage.class); TypeDesc repositoryType = TypeDesc.forClass(Repository.class); b.invokeInterface ...
[ "private", "void", "loadStorageForFetch", "(", "CodeBuilder", "b", ",", "TypeDesc", "type", ")", "{", "b", ".", "loadThis", "(", ")", ";", "b", ".", "loadField", "(", "SUPPORT_FIELD_NAME", ",", "mSupportType", ")", ";", "TypeDesc", "storageType", "=", "TypeD...
Generates code that loads a Storage instance on the stack, throwing a FetchException if Storage request fails. @param type type of Storage to request
[ "Generates", "code", "that", "loads", "a", "Storage", "instance", "on", "the", "stack", "throwing", "a", "FetchException", "if", "Storage", "request", "fails", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L2132-L2158
8,169
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.markOrdinaryPropertyDirty
private void markOrdinaryPropertyDirty (CodeBuilder b, StorableProperty ordinaryProperty) { int count = mAllProperties.size(); int ordinal = 0; int andMask = 0xffffffff; int orMask = 0; boolean anyNonDerived = false; for (StorableProperty property ...
java
private void markOrdinaryPropertyDirty (CodeBuilder b, StorableProperty ordinaryProperty) { int count = mAllProperties.size(); int ordinal = 0; int andMask = 0xffffffff; int orMask = 0; boolean anyNonDerived = false; for (StorableProperty property ...
[ "private", "void", "markOrdinaryPropertyDirty", "(", "CodeBuilder", "b", ",", "StorableProperty", "ordinaryProperty", ")", "{", "int", "count", "=", "mAllProperties", ".", "size", "(", ")", ";", "int", "ordinal", "=", "0", ";", "int", "andMask", "=", "0xffffff...
For the given ordinary key property, marks all of its dependent join element properties as uninitialized, and marks given property as dirty.
[ "For", "the", "given", "ordinary", "key", "property", "marks", "all", "of", "its", "dependent", "join", "element", "properties", "as", "uninitialized", "and", "marks", "given", "property", "as", "dirty", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L2372-L2420
8,170
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.branchIfDirty
private void branchIfDirty(CodeBuilder b, boolean includePk, Label label) { int count = mAllProperties.size(); int ordinal = 0; int andMask = 0; boolean anyNonDerived = false; for (StorableProperty property : mAllProperties.values()) { if (!property.isDerived(...
java
private void branchIfDirty(CodeBuilder b, boolean includePk, Label label) { int count = mAllProperties.size(); int ordinal = 0; int andMask = 0; boolean anyNonDerived = false; for (StorableProperty property : mAllProperties.values()) { if (!property.isDerived(...
[ "private", "void", "branchIfDirty", "(", "CodeBuilder", "b", ",", "boolean", "includePk", ",", "Label", "label", ")", "{", "int", "count", "=", "mAllProperties", ".", "size", "(", ")", ";", "int", "ordinal", "=", "0", ";", "int", "andMask", "=", "0", "...
Generates code that branches to the given label if any properties are dirty.
[ "Generates", "code", "that", "branches", "to", "the", "given", "label", "if", "any", "properties", "are", "dirty", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L2423-L2458
8,171
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.requirePkInitialized
private void requirePkInitialized(CodeBuilder b, String methodName) { // Add code to call method which we are about to define. b.loadThis(); b.invokeVirtual(methodName, null, null); // Now define new method, discarding original builder object. b = new CodeBuilder(mClassFil...
java
private void requirePkInitialized(CodeBuilder b, String methodName) { // Add code to call method which we are about to define. b.loadThis(); b.invokeVirtual(methodName, null, null); // Now define new method, discarding original builder object. b = new CodeBuilder(mClassFil...
[ "private", "void", "requirePkInitialized", "(", "CodeBuilder", "b", ",", "String", "methodName", ")", "{", "// Add code to call method which we are about to define.\r", "b", ".", "loadThis", "(", ")", ";", "b", ".", "invokeVirtual", "(", "methodName", ",", "null", "...
Generates code that verifies that all primary keys are initialized. @param b builder that will invoke generated method @param methodName name to give to generated method
[ "Generates", "code", "that", "verifies", "that", "all", "primary", "keys", "are", "initialized", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L2577-L2592
8,172
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.addPropertyStateExtractMethod
private void addPropertyStateExtractMethod() { MethodInfo mi = mClassFile.addMethod(Modifiers.PRIVATE, PROPERTY_STATE_EXTRACT_METHOD_NAME, TypeDesc.INT, new TypeDesc[] {TypeDesc.STRING}); addPropertySwitch(new CodeBuilder(mi), SWITCH_FOR_STATE); }
java
private void addPropertyStateExtractMethod() { MethodInfo mi = mClassFile.addMethod(Modifiers.PRIVATE, PROPERTY_STATE_EXTRACT_METHOD_NAME, TypeDesc.INT, new TypeDesc[] {TypeDesc.STRING}); addPropertySwitch(new CodeBuilder(mi), SWITCH_FOR_STATE); }
[ "private", "void", "addPropertyStateExtractMethod", "(", ")", "{", "MethodInfo", "mi", "=", "mClassFile", ".", "addMethod", "(", "Modifiers", ".", "PRIVATE", ",", "PROPERTY_STATE_EXTRACT_METHOD_NAME", ",", "TypeDesc", ".", "INT", ",", "new", "TypeDesc", "[", "]", ...
Generates a private method which accepts a property name and returns PROPERTY_STATE_UNINITIALIZED, PROPERTY_STATE_DIRTY, or PROPERTY_STATE_CLEAN.
[ "Generates", "a", "private", "method", "which", "accepts", "a", "property", "name", "and", "returns", "PROPERTY_STATE_UNINITIALIZED", "PROPERTY_STATE_DIRTY", "or", "PROPERTY_STATE_CLEAN", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L2599-L2604
8,173
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.caseMatches
private List<StorableProperty<?>>[] caseMatches(int caseCount) { List<StorableProperty<?>>[] cases = new List[caseCount]; for (StorableProperty<?> prop : mAllProperties.values()) { int hashCode = prop.getName().hashCode(); int caseValue = (hashCode & 0x7fffffff) % caseCount...
java
private List<StorableProperty<?>>[] caseMatches(int caseCount) { List<StorableProperty<?>>[] cases = new List[caseCount]; for (StorableProperty<?> prop : mAllProperties.values()) { int hashCode = prop.getName().hashCode(); int caseValue = (hashCode & 0x7fffffff) % caseCount...
[ "private", "List", "<", "StorableProperty", "<", "?", ">", ">", "[", "]", "caseMatches", "(", "int", "caseCount", ")", "{", "List", "<", "StorableProperty", "<", "?", ">", ">", "[", "]", "cases", "=", "new", "List", "[", "caseCount", "]", ";", "for",...
Returns the properties that match on a given case. The array length is the same as the case count. Each list represents the matches. The lists themselves may be null if no matches for that case.
[ "Returns", "the", "properties", "that", "match", "on", "a", "given", "case", ".", "The", "array", "length", "is", "the", "same", "as", "the", "case", "count", ".", "Each", "list", "represents", "the", "matches", ".", "The", "lists", "themselves", "may", ...
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L2837-L2851
8,174
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.addPropertyStateCheckMethod
private void addPropertyStateCheckMethod(String name, int state) { MethodInfo mi = addMethodIfNotFinal(Modifiers.PUBLIC, name, TypeDesc.BOOLEAN, new TypeDesc[] {TypeDesc.STRING}); if (mi == null) { return; } CodeBuilder b ...
java
private void addPropertyStateCheckMethod(String name, int state) { MethodInfo mi = addMethodIfNotFinal(Modifiers.PUBLIC, name, TypeDesc.BOOLEAN, new TypeDesc[] {TypeDesc.STRING}); if (mi == null) { return; } CodeBuilder b ...
[ "private", "void", "addPropertyStateCheckMethod", "(", "String", "name", ",", "int", "state", ")", "{", "MethodInfo", "mi", "=", "addMethodIfNotFinal", "(", "Modifiers", ".", "PUBLIC", ",", "name", ",", "TypeDesc", ".", "BOOLEAN", ",", "new", "TypeDesc", "[", ...
Generates public method which accepts a property name and returns a boolean true, if the given state matches the property's actual state. @param name name of method @param state property state to check
[ "Generates", "public", "method", "which", "accepts", "a", "property", "name", "and", "returns", "a", "boolean", "true", "if", "the", "given", "state", "matches", "the", "property", "s", "actual", "state", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L2860-L2887
8,175
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.addHashCodeMethod
private void addHashCodeMethod() { Modifiers modifiers = Modifiers.PUBLIC.toSynchronized(true); MethodInfo mi = addMethodIfNotFinal(modifiers, "hashCode", TypeDesc.INT, null); if (mi == null) { return; } CodeBuilder b = new CodeBuilder(mi); boolea...
java
private void addHashCodeMethod() { Modifiers modifiers = Modifiers.PUBLIC.toSynchronized(true); MethodInfo mi = addMethodIfNotFinal(modifiers, "hashCode", TypeDesc.INT, null); if (mi == null) { return; } CodeBuilder b = new CodeBuilder(mi); boolea...
[ "private", "void", "addHashCodeMethod", "(", ")", "{", "Modifiers", "modifiers", "=", "Modifiers", ".", "PUBLIC", ".", "toSynchronized", "(", "true", ")", ";", "MethodInfo", "mi", "=", "addMethodIfNotFinal", "(", "modifiers", ",", "\"hashCode\"", ",", "TypeDesc"...
Defines a hashCode method.
[ "Defines", "a", "hashCode", "method", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L3016-L3039
8,176
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.addEqualsMethod
private void addEqualsMethod(int equalityType) { TypeDesc[] objectParam = {TypeDesc.OBJECT}; String equalsMethodName; switch (equalityType) { default: throw new IllegalArgumentException(); case EQUAL_KEYS: equalsMethodName = EQUAL_PRIMARY_KEYS_MET...
java
private void addEqualsMethod(int equalityType) { TypeDesc[] objectParam = {TypeDesc.OBJECT}; String equalsMethodName; switch (equalityType) { default: throw new IllegalArgumentException(); case EQUAL_KEYS: equalsMethodName = EQUAL_PRIMARY_KEYS_MET...
[ "private", "void", "addEqualsMethod", "(", "int", "equalityType", ")", "{", "TypeDesc", "[", "]", "objectParam", "=", "{", "TypeDesc", ".", "OBJECT", "}", ";", "String", "equalsMethodName", ";", "switch", "(", "equalityType", ")", "{", "default", ":", "throw...
Defines an equals method. @param equalityType Type of equality to define - {@link EQUAL_KEYS} for "equalKeys", {@link EQUAL_PROPERTIES} for "equalProperties", and {@link EQUAL_FULL} for "equals"
[ "Defines", "an", "equals", "method", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L3047-L3128
8,177
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.addToStringMethod
private void addToStringMethod(boolean keyOnly) { TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class); Modifiers modifiers = Modifiers.PUBLIC.toSynchronized(true); MethodInfo mi = addMethodIfNotFinal(modifiers, keyOnly ? ...
java
private void addToStringMethod(boolean keyOnly) { TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class); Modifiers modifiers = Modifiers.PUBLIC.toSynchronized(true); MethodInfo mi = addMethodIfNotFinal(modifiers, keyOnly ? ...
[ "private", "void", "addToStringMethod", "(", "boolean", "keyOnly", ")", "{", "TypeDesc", "stringBuilder", "=", "TypeDesc", ".", "forClass", "(", "StringBuilder", ".", "class", ")", ";", "Modifiers", "modifiers", "=", "Modifiers", ".", "PUBLIC", ".", "toSynchroni...
Defines a toString method, which assumes that the ClassFile is targeting version 1.5 of Java. @param keyOnly when true, generate a toStringKeyOnly method instead
[ "Defines", "a", "toString", "method", "which", "assumes", "that", "the", "ClassFile", "is", "targeting", "version", "1", ".", "5", "of", "Java", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L3136-L3218
8,178
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.addGetTriggerAndEnterTxn
private Label addGetTriggerAndEnterTxn(CodeBuilder b, String opType, LocalVariable forTryVar, boolean forTry, LocalVariable triggerVar, ...
java
private Label addGetTriggerAndEnterTxn(CodeBuilder b, String opType, LocalVariable forTryVar, boolean forTry, LocalVariable triggerVar, ...
[ "private", "Label", "addGetTriggerAndEnterTxn", "(", "CodeBuilder", "b", ",", "String", "opType", ",", "LocalVariable", "forTryVar", ",", "boolean", "forTry", ",", "LocalVariable", "triggerVar", ",", "LocalVariable", "txnVar", ",", "LocalVariable", "stateVar", ")", ...
Generates code to get a trigger, forcing a transaction if trigger is not null. Also, if there is a trigger, the "before" method is called. @param opType type of operation, Insert, Update, or Delete @param forTryVar optional boolean variable for selecting whether to call "before" or "beforeTry" method @param forTry use...
[ "Generates", "code", "to", "get", "a", "trigger", "forcing", "a", "transaction", "if", "trigger", "is", "not", "null", ".", "Also", "if", "there", "is", "a", "trigger", "the", "before", "method", "is", "called", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L3300-L3391
8,179
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.addTriggerAfterAndExitTxn
private void addTriggerAfterAndExitTxn(CodeBuilder b, String opType, LocalVariable forTryVar, boolean forTry, LocalVariable triggerVar, ...
java
private void addTriggerAfterAndExitTxn(CodeBuilder b, String opType, LocalVariable forTryVar, boolean forTry, LocalVariable triggerVar, ...
[ "private", "void", "addTriggerAfterAndExitTxn", "(", "CodeBuilder", "b", ",", "String", "opType", ",", "LocalVariable", "forTryVar", ",", "boolean", "forTry", ",", "LocalVariable", "triggerVar", ",", "LocalVariable", "txnVar", ",", "LocalVariable", "stateVar", ")", ...
Generates code to call a trigger after the persistence operation has been invoked. @param opType type of operation, Insert, Update, or Delete @param forTryVar optional boolean variable for selecting whether to call "after" or "afterTry" method @param forTry used if forTryVar is null @param triggerVar required variable...
[ "Generates", "code", "to", "call", "a", "trigger", "after", "the", "persistence", "operation", "has", "been", "invoked", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L3405-L3460
8,180
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.addTriggerFailedAndExitTxn
private void addTriggerFailedAndExitTxn(CodeBuilder b, String opType, LocalVariable triggerVar, LocalVariable txnVar, LocalVariable stateVar...
java
private void addTriggerFailedAndExitTxn(CodeBuilder b, String opType, LocalVariable triggerVar, LocalVariable txnVar, LocalVariable stateVar...
[ "private", "void", "addTriggerFailedAndExitTxn", "(", "CodeBuilder", "b", ",", "String", "opType", ",", "LocalVariable", "triggerVar", ",", "LocalVariable", "txnVar", ",", "LocalVariable", "stateVar", ")", "{", "TypeDesc", "transactionType", "=", "TypeDesc", ".", "f...
Generates code to call a trigger after the persistence operation has failed. @param opType type of operation, Insert, Update, or Delete @param triggerVar required variable of type Trigger for retrieving trigger @param txnVar required variable of type Transaction for storing transaction @param stateVar required variabl...
[ "Generates", "code", "to", "call", "a", "trigger", "after", "the", "persistence", "operation", "has", "failed", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L3471-L3508
8,181
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.addTriggerFailedAndExitTxn
private void addTriggerFailedAndExitTxn(CodeBuilder b, String opType, LocalVariable forTryVar, boolean forTry, LocalVariable triggerVar, ...
java
private void addTriggerFailedAndExitTxn(CodeBuilder b, String opType, LocalVariable forTryVar, boolean forTry, LocalVariable triggerVar, ...
[ "private", "void", "addTriggerFailedAndExitTxn", "(", "CodeBuilder", "b", ",", "String", "opType", ",", "LocalVariable", "forTryVar", ",", "boolean", "forTry", ",", "LocalVariable", "triggerVar", ",", "LocalVariable", "txnVar", ",", "LocalVariable", "stateVar", ",", ...
Generates exception handler code to call a trigger after the persistence operation has failed. @param opType type of operation, Insert, Update, or Delete @param forTryVar optional boolean variable for selecting whether to throw or catch Trigger.Abort. @param forTry used if forTryVar is null @param triggerVar required ...
[ "Generates", "exception", "handler", "code", "to", "call", "a", "trigger", "after", "the", "persistence", "operation", "has", "failed", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L3523-L3610
8,182
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.defineUncaughtExceptionHandler
private void defineUncaughtExceptionHandler() { MethodInfo mi = mClassFile.addMethod (Modifiers.PRIVATE.toStatic(true), UNCAUGHT_METHOD_NAME, null, new TypeDesc[] {TypeDesc.forClass(Throwable.class)}); CodeBuilder b = new CodeBuilder(mi); // Thread t = Thread.curr...
java
private void defineUncaughtExceptionHandler() { MethodInfo mi = mClassFile.addMethod (Modifiers.PRIVATE.toStatic(true), UNCAUGHT_METHOD_NAME, null, new TypeDesc[] {TypeDesc.forClass(Throwable.class)}); CodeBuilder b = new CodeBuilder(mi); // Thread t = Thread.curr...
[ "private", "void", "defineUncaughtExceptionHandler", "(", ")", "{", "MethodInfo", "mi", "=", "mClassFile", ".", "addMethod", "(", "Modifiers", ".", "PRIVATE", ".", "toStatic", "(", "true", ")", ",", "UNCAUGHT_METHOD_NAME", ",", "null", ",", "new", "TypeDesc", ...
Generates method which passes exception to uncaught exception handler.
[ "Generates", "method", "which", "passes", "exception", "to", "uncaught", "exception", "handler", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L3615-L3635
8,183
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/jdbc/JDBCSupportStrategy.java
JDBCSupportStrategy.createStrategy
@SuppressWarnings("unchecked") static JDBCSupportStrategy createStrategy(JDBCRepository repo) { String databaseProductName = repo.getDatabaseProductName().trim(); if (databaseProductName != null && databaseProductName.length() > 0) { String strategyName = Character.toUpperCase(databa...
java
@SuppressWarnings("unchecked") static JDBCSupportStrategy createStrategy(JDBCRepository repo) { String databaseProductName = repo.getDatabaseProductName().trim(); if (databaseProductName != null && databaseProductName.length() > 0) { String strategyName = Character.toUpperCase(databa...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "static", "JDBCSupportStrategy", "createStrategy", "(", "JDBCRepository", "repo", ")", "{", "String", "databaseProductName", "=", "repo", ".", "getDatabaseProductName", "(", ")", ".", "trim", "(", ")", ";", "if",...
Create a strategy based on the name of the database product. If one can't be found by product name the default will be used.
[ "Create", "a", "strategy", "based", "on", "the", "name", "of", "the", "database", "product", ".", "If", "one", "can", "t", "be", "found", "by", "product", "name", "the", "default", "will", "be", "used", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCSupportStrategy.java#L56-L80
8,184
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/spi/LobEngine.java
LobEngine.createNewBlob
public Blob createNewBlob(int blockSize) throws PersistException { StoredLob lob = mLobStorage.prepare(); lob.setLocator(mLocatorSequence.nextLongValue()); lob.setBlockSize(blockSize); lob.setLength(0); lob.insert(); return new BlobImpl(lob.getLocator()); }
java
public Blob createNewBlob(int blockSize) throws PersistException { StoredLob lob = mLobStorage.prepare(); lob.setLocator(mLocatorSequence.nextLongValue()); lob.setBlockSize(blockSize); lob.setLength(0); lob.insert(); return new BlobImpl(lob.getLocator()); }
[ "public", "Blob", "createNewBlob", "(", "int", "blockSize", ")", "throws", "PersistException", "{", "StoredLob", "lob", "=", "mLobStorage", ".", "prepare", "(", ")", ";", "lob", ".", "setLocator", "(", "mLocatorSequence", ".", "nextLongValue", "(", ")", ")", ...
Returns a new Blob whose length is zero. @param blockSize block size (in <i>bytes</i>) to use @return new empty Blob
[ "Returns", "a", "new", "Blob", "whose", "length", "is", "zero", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/LobEngine.java#L126-L133
8,185
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/spi/LobEngine.java
LobEngine.createNewClob
public Clob createNewClob(int blockSize) throws PersistException { StoredLob lob = mLobStorage.prepare(); lob.setLocator(mLocatorSequence.nextLongValue()); lob.setBlockSize(blockSize); lob.setLength(0); lob.insert(); return new ClobImpl(lob.getLocator()); }
java
public Clob createNewClob(int blockSize) throws PersistException { StoredLob lob = mLobStorage.prepare(); lob.setLocator(mLocatorSequence.nextLongValue()); lob.setBlockSize(blockSize); lob.setLength(0); lob.insert(); return new ClobImpl(lob.getLocator()); }
[ "public", "Clob", "createNewClob", "(", "int", "blockSize", ")", "throws", "PersistException", "{", "StoredLob", "lob", "=", "mLobStorage", ".", "prepare", "(", ")", ";", "lob", ".", "setLocator", "(", "mLocatorSequence", ".", "nextLongValue", "(", ")", ")", ...
Returns a new Clob whose length is zero. @param blockSize block size (in <i>bytes</i>) to use @return new empty Clob
[ "Returns", "a", "new", "Clob", "whose", "length", "is", "zero", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/LobEngine.java#L141-L148
8,186
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/spi/LobEngine.java
LobEngine.getLocator
public long getLocator(Lob lob) { if (lob == null) { return 0; } Long locator = (Long) lob.getLocator(); return locator == null ? 0 : locator; }
java
public long getLocator(Lob lob) { if (lob == null) { return 0; } Long locator = (Long) lob.getLocator(); return locator == null ? 0 : locator; }
[ "public", "long", "getLocator", "(", "Lob", "lob", ")", "{", "if", "(", "lob", "==", "null", ")", "{", "return", "0", ";", "}", "Long", "locator", "=", "(", "Long", ")", "lob", ".", "getLocator", "(", ")", ";", "return", "locator", "==", "null", ...
Returns the locator for the given Lob, or zero if null. @throws ClassCastException if Lob is unrecognized
[ "Returns", "the", "locator", "for", "the", "given", "Lob", "or", "zero", "if", "null", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/LobEngine.java#L155-L161
8,187
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/spi/LobEngine.java
LobEngine.deleteLob
public void deleteLob(long locator) throws PersistException { if (locator == 0) { return; } Transaction txn = mRepo.enterTransaction(IsolationLevel.READ_COMMITTED); try { StoredLob lob = mLobStorage.prepare(); lob.setLocator(locator); ...
java
public void deleteLob(long locator) throws PersistException { if (locator == 0) { return; } Transaction txn = mRepo.enterTransaction(IsolationLevel.READ_COMMITTED); try { StoredLob lob = mLobStorage.prepare(); lob.setLocator(locator); ...
[ "public", "void", "deleteLob", "(", "long", "locator", ")", "throws", "PersistException", "{", "if", "(", "locator", "==", "0", ")", "{", "return", ";", "}", "Transaction", "txn", "=", "mRepo", ".", "enterTransaction", "(", "IsolationLevel", ".", "READ_COMMI...
Deletes Lob data, freeing up all space consumed by it.
[ "Deletes", "Lob", "data", "freeing", "up", "all", "space", "consumed", "by", "it", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/LobEngine.java#L166-L186
8,188
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/spi/LobEngine.java
LobEngine.getSupportTrigger
public synchronized <S extends Storable> Trigger<S> getSupportTrigger(Class<S> type, int blockSize) { Object key = KeyFactory.createKey(new Object[] {type, blockSize}); Trigger<S> trigger = (mTriggers == null) ? null : (Trigger<S>) mTriggers.get(key); if (trigger == null) { ...
java
public synchronized <S extends Storable> Trigger<S> getSupportTrigger(Class<S> type, int blockSize) { Object key = KeyFactory.createKey(new Object[] {type, blockSize}); Trigger<S> trigger = (mTriggers == null) ? null : (Trigger<S>) mTriggers.get(key); if (trigger == null) { ...
[ "public", "synchronized", "<", "S", "extends", "Storable", ">", "Trigger", "<", "S", ">", "getSupportTrigger", "(", "Class", "<", "S", ">", "type", ",", "int", "blockSize", ")", "{", "Object", "key", "=", "KeyFactory", ".", "createKey", "(", "new", "Obje...
Returns a Trigger for binding to this LobEngine. Storage implementations which use LobEngine must install this Trigger. Trigger instances are cached, so subsequent calls for the same trigger return the same instance. @param type type of Storable to create trigger for @param blockSize block size to use @return support ...
[ "Returns", "a", "Trigger", "for", "binding", "to", "this", "LobEngine", ".", "Storage", "implementations", "which", "use", "LobEngine", "must", "install", "this", "Trigger", ".", "Trigger", "instances", "are", "cached", "so", "subsequent", "calls", "for", "the",...
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/LobEngine.java#L433-L471
8,189
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/jdbc/JDBCExceptionTransformer.java
JDBCExceptionTransformer.isConstraintError
public boolean isConstraintError(SQLException e) { if (e != null) { String sqlstate = e.getSQLState(); if (sqlstate != null) { return sqlstate.startsWith(SQLSTATE_CONSTRAINT_VIOLATION_CLASS_CODE); } } return false; }
java
public boolean isConstraintError(SQLException e) { if (e != null) { String sqlstate = e.getSQLState(); if (sqlstate != null) { return sqlstate.startsWith(SQLSTATE_CONSTRAINT_VIOLATION_CLASS_CODE); } } return false; }
[ "public", "boolean", "isConstraintError", "(", "SQLException", "e", ")", "{", "if", "(", "e", "!=", "null", ")", "{", "String", "sqlstate", "=", "e", ".", "getSQLState", "(", ")", ";", "if", "(", "sqlstate", "!=", "null", ")", "{", "return", "sqlstate"...
Examines the SQLSTATE code of the given SQL exception and determines if it is a generic constaint violation.
[ "Examines", "the", "SQLSTATE", "code", "of", "the", "given", "SQL", "exception", "and", "determines", "if", "it", "is", "a", "generic", "constaint", "violation", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCExceptionTransformer.java#L70-L78
8,190
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/jdbc/JDBCExceptionTransformer.java
JDBCExceptionTransformer.isUniqueConstraintError
public boolean isUniqueConstraintError(SQLException e) { if (isConstraintError(e)) { String sqlstate = e.getSQLState(); return SQLSTATE_UNIQUE_CONSTRAINT_VIOLATION.equals(sqlstate); } return false; }
java
public boolean isUniqueConstraintError(SQLException e) { if (isConstraintError(e)) { String sqlstate = e.getSQLState(); return SQLSTATE_UNIQUE_CONSTRAINT_VIOLATION.equals(sqlstate); } return false; }
[ "public", "boolean", "isUniqueConstraintError", "(", "SQLException", "e", ")", "{", "if", "(", "isConstraintError", "(", "e", ")", ")", "{", "String", "sqlstate", "=", "e", ".", "getSQLState", "(", ")", ";", "return", "SQLSTATE_UNIQUE_CONSTRAINT_VIOLATION", ".",...
Examines the SQLSTATE code of the given SQL exception and determines if it is a unique constaint violation.
[ "Examines", "the", "SQLSTATE", "code", "of", "the", "given", "SQL", "exception", "and", "determines", "if", "it", "is", "a", "unique", "constaint", "violation", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCExceptionTransformer.java#L84-L90
8,191
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/RepositoryException.java
RepositoryException.toPersistException
public final PersistException toPersistException(final String message) { Throwable cause; if (this instanceof PersistException) { cause = this; } else { cause = getCause(); } if (cause == null) { cause = this; } else if (caus...
java
public final PersistException toPersistException(final String message) { Throwable cause; if (this instanceof PersistException) { cause = this; } else { cause = getCause(); } if (cause == null) { cause = this; } else if (caus...
[ "public", "final", "PersistException", "toPersistException", "(", "final", "String", "message", ")", "{", "Throwable", "cause", ";", "if", "(", "this", "instanceof", "PersistException", ")", "{", "cause", "=", "this", ";", "}", "else", "{", "cause", "=", "ge...
Converts RepositoryException into an appropriate PersistException, prepending the specified message. If message is null, original exception message is preserved. @param message message to prepend, which may be null
[ "Converts", "RepositoryException", "into", "an", "appropriate", "PersistException", "prepending", "the", "specified", "message", ".", "If", "message", "is", "null", "original", "exception", "message", "is", "preserved", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/RepositoryException.java#L139-L161
8,192
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/RepositoryException.java
RepositoryException.toFetchException
public final FetchException toFetchException(final String message) { Throwable cause; if (this instanceof FetchException) { cause = this; } else { cause = getCause(); } if (cause == null) { cause = this; } else if (cause inst...
java
public final FetchException toFetchException(final String message) { Throwable cause; if (this instanceof FetchException) { cause = this; } else { cause = getCause(); } if (cause == null) { cause = this; } else if (cause inst...
[ "public", "final", "FetchException", "toFetchException", "(", "final", "String", "message", ")", "{", "Throwable", "cause", ";", "if", "(", "this", "instanceof", "FetchException", ")", "{", "cause", "=", "this", ";", "}", "else", "{", "cause", "=", "getCause...
Converts RepositoryException into an appropriate FetchException, prepending the specified message. If message is null, original exception message is preserved. @param message message to prepend, which may be null
[ "Converts", "RepositoryException", "into", "an", "appropriate", "FetchException", "prepending", "the", "specified", "message", ".", "If", "message", "is", "null", "original", "exception", "message", "is", "preserved", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/RepositoryException.java#L177-L199
8,193
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/info/StorablePropertyAdapter.java
StorablePropertyAdapter.getAdapterInstance
public Object getAdapterInstance() { if (mAdapterInstance == null) { try { mAdapterInstance = mConstructor.newInstance (mEnclosingType, mPropertyName, mAnnotation.getAnnotation()); } catch (Exception e) { ThrowUnchecked.fireFirstD...
java
public Object getAdapterInstance() { if (mAdapterInstance == null) { try { mAdapterInstance = mConstructor.newInstance (mEnclosingType, mPropertyName, mAnnotation.getAnnotation()); } catch (Exception e) { ThrowUnchecked.fireFirstD...
[ "public", "Object", "getAdapterInstance", "(", ")", "{", "if", "(", "mAdapterInstance", "==", "null", ")", "{", "try", "{", "mAdapterInstance", "=", "mConstructor", ".", "newInstance", "(", "mEnclosingType", ",", "mPropertyName", ",", "mAnnotation", ".", "getAnn...
Returns an instance of the adapter, for which an adapt method is applied to.
[ "Returns", "an", "instance", "of", "the", "adapter", "for", "which", "an", "adapt", "method", "is", "applied", "to", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorablePropertyAdapter.java#L236-L246
8,194
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/info/StorablePropertyAdapter.java
StorablePropertyAdapter.findAdaptMethod
@SuppressWarnings("unchecked") public Method findAdaptMethod(Class from, Class to) { Method[] methods = mAdaptMethods; List<Method> candidates = new ArrayList<Method>(methods.length); for (int i=methods.length; --i>=0; ) { Method method = methods[i]; if (to.isAs...
java
@SuppressWarnings("unchecked") public Method findAdaptMethod(Class from, Class to) { Method[] methods = mAdaptMethods; List<Method> candidates = new ArrayList<Method>(methods.length); for (int i=methods.length; --i>=0; ) { Method method = methods[i]; if (to.isAs...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Method", "findAdaptMethod", "(", "Class", "from", ",", "Class", "to", ")", "{", "Method", "[", "]", "methods", "=", "mAdaptMethods", ";", "List", "<", "Method", ">", "candidates", "=", "new", "...
Returns an adapt method that supports the given conversion, or null if none.
[ "Returns", "an", "adapt", "method", "that", "supports", "the", "given", "conversion", "or", "null", "if", "none", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorablePropertyAdapter.java#L264-L280
8,195
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/info/StorablePropertyAdapter.java
StorablePropertyAdapter.findAdaptMethodsFrom
public Method[] findAdaptMethodsFrom(Class from) { Method[] methods = mAdaptMethods; List<Method> candidates = new ArrayList<Method>(methods.length); for (int i=methods.length; --i>=0; ) { Method method = methods[i]; if (method.getParameterTypes()[0].isAssignableFrom...
java
public Method[] findAdaptMethodsFrom(Class from) { Method[] methods = mAdaptMethods; List<Method> candidates = new ArrayList<Method>(methods.length); for (int i=methods.length; --i>=0; ) { Method method = methods[i]; if (method.getParameterTypes()[0].isAssignableFrom...
[ "public", "Method", "[", "]", "findAdaptMethodsFrom", "(", "Class", "from", ")", "{", "Method", "[", "]", "methods", "=", "mAdaptMethods", ";", "List", "<", "Method", ">", "candidates", "=", "new", "ArrayList", "<", "Method", ">", "(", "methods", ".", "l...
Returns all the adapt methods that convert from the given type.
[ "Returns", "all", "the", "adapt", "methods", "that", "convert", "from", "the", "given", "type", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorablePropertyAdapter.java#L285-L295
8,196
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/info/StorablePropertyAdapter.java
StorablePropertyAdapter.findAdaptMethodsTo
@SuppressWarnings("unchecked") public Method[] findAdaptMethodsTo(Class to) { Method[] methods = mAdaptMethods; List<Method> candidates = new ArrayList<Method>(methods.length); for (int i=methods.length; --i>=0; ) { Method method = methods[i]; if (to.isAssignabl...
java
@SuppressWarnings("unchecked") public Method[] findAdaptMethodsTo(Class to) { Method[] methods = mAdaptMethods; List<Method> candidates = new ArrayList<Method>(methods.length); for (int i=methods.length; --i>=0; ) { Method method = methods[i]; if (to.isAssignabl...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Method", "[", "]", "findAdaptMethodsTo", "(", "Class", "to", ")", "{", "Method", "[", "]", "methods", "=", "mAdaptMethods", ";", "List", "<", "Method", ">", "candidates", "=", "new", "ArrayList",...
Returns all the adapt methods that convert to the given type.
[ "Returns", "all", "the", "adapt", "methods", "that", "convert", "to", "the", "given", "type", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorablePropertyAdapter.java#L300-L312
8,197
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/constraints/ConjunctiveConstraint.java
ConjunctiveConstraint.create
public static <Type> ConjunctiveConstraint<Type> create( @NonNull final Constraint<Type>[] constraints) { return new ConjunctiveConstraint<>(constraints); }
java
public static <Type> ConjunctiveConstraint<Type> create( @NonNull final Constraint<Type>[] constraints) { return new ConjunctiveConstraint<>(constraints); }
[ "public", "static", "<", "Type", ">", "ConjunctiveConstraint", "<", "Type", ">", "create", "(", "@", "NonNull", "final", "Constraint", "<", "Type", ">", "[", "]", "constraints", ")", "{", "return", "new", "ConjunctiveConstraint", "<>", "(", "constraints", ")...
Creates and returns a constraint, which allows to combine multiple constraints in a conjunctive manner. @param <Type> The type of the values, which should be verified @param constraints The single constraints, the constraint should consist of, as an array of the type {@link Constraint}. The constraints may neither be ...
[ "Creates", "and", "returns", "a", "constraint", "which", "allows", "to", "combine", "multiple", "constraints", "in", "a", "conjunctive", "manner", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/constraints/ConjunctiveConstraint.java#L60-L63
8,198
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/GenericStorableCodecFactory.java
GenericStorableCodecFactory.createStrategy
protected <S extends Storable> GenericEncodingStrategy<S> createStrategy (Class<S> type, StorableIndex<S> pkIndex) throws SupportException { return new GenericEncodingStrategy<S>(type, pkIndex); }
java
protected <S extends Storable> GenericEncodingStrategy<S> createStrategy (Class<S> type, StorableIndex<S> pkIndex) throws SupportException { return new GenericEncodingStrategy<S>(type, pkIndex); }
[ "protected", "<", "S", "extends", "Storable", ">", "GenericEncodingStrategy", "<", "S", ">", "createStrategy", "(", "Class", "<", "S", ">", "type", ",", "StorableIndex", "<", "S", ">", "pkIndex", ")", "throws", "SupportException", "{", "return", "new", "Gene...
Override to return a different EncodingStrategy. @param type type of Storable to generate code for @param pkIndex specifies sequence and ordering of key properties (optional)
[ "Override", "to", "return", "a", "different", "EncodingStrategy", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericStorableCodecFactory.java#L103-L108
8,199
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/util/Comparators.java
Comparators.arrayComparator
public static <T> Comparator<T> arrayComparator(Class<T> arrayType, boolean unsigned) { if (!arrayType.isArray()) { throw new IllegalArgumentException(); } Comparator c; TypeDesc componentType = TypeDesc.forClass(arrayType.getComponentType()); switch (compon...
java
public static <T> Comparator<T> arrayComparator(Class<T> arrayType, boolean unsigned) { if (!arrayType.isArray()) { throw new IllegalArgumentException(); } Comparator c; TypeDesc componentType = TypeDesc.forClass(arrayType.getComponentType()); switch (compon...
[ "public", "static", "<", "T", ">", "Comparator", "<", "T", ">", "arrayComparator", "(", "Class", "<", "T", ">", "arrayType", ",", "boolean", "unsigned", ")", "{", "if", "(", "!", "arrayType", ".", "isArray", "(", ")", ")", "{", "throw", "new", "Illeg...
Returns a comparator which can sort single or multi-dimensional arrays of primitves or Comparables. @param unsigned applicable only to arrays of bytes, shorts, ints, or longs @return null if unsupported
[ "Returns", "a", "comparator", "which", "can", "sort", "single", "or", "multi", "-", "dimensional", "arrays", "of", "primitves", "or", "Comparables", "." ]
eee29b365a61c8f03e1a1dc6bed0692e6b04b1db
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/util/Comparators.java#L38-L83