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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
111,900 | googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/StringUtils.java | StringUtils.getBytesUtf8 | public static byte[] getBytesUtf8(String string) {
if (string == null) {
return null;
}
return string.getBytes(StandardCharsets.UTF_8);
} | java | public static byte[] getBytesUtf8(String string) {
if (string == null) {
return null;
}
return string.getBytes(StandardCharsets.UTF_8);
} | [
"public",
"static",
"byte",
"[",
"]",
"getBytesUtf8",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"string",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"string",
".",
"getBytes",
"(",
"StandardCharsets",
".",
"UTF_8",
")",
";",
"}"
... | Encodes the given string into a sequence of bytes using the UTF-8 charset, storing the result
into a new byte array.
@param string the String to encode, may be <code>null</code>
@return encoded bytes, or <code>null</code> if the input string was <code>null</code>
@throws IllegalStateException Thrown when the charset i... | [
"Encodes",
"the",
"given",
"string",
"into",
"a",
"sequence",
"of",
"bytes",
"using",
"the",
"UTF",
"-",
"8",
"charset",
"storing",
"the",
"result",
"into",
"a",
"new",
"byte",
"array",
"."
] | 0988ae4e0f26a80f579b6adb2b276dd8254928de | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/StringUtils.java#L47-L52 |
111,901 | googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/IOUtils.java | IOUtils.copy | public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException {
copy(inputStream, outputStream, true);
} | java | public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException {
copy(inputStream, outputStream, true);
} | [
"public",
"static",
"void",
"copy",
"(",
"InputStream",
"inputStream",
",",
"OutputStream",
"outputStream",
")",
"throws",
"IOException",
"{",
"copy",
"(",
"inputStream",
",",
"outputStream",
",",
"true",
")",
";",
"}"
] | Writes the content provided by the given source input stream into the given destination output
stream.
<p>The input stream is guaranteed to be closed at the end of this method.
<p>Sample use:
<pre>
static void copy(InputStream inputStream, File file) throws IOException {
FileOutputStream out = new FileOutputStream(f... | [
"Writes",
"the",
"content",
"provided",
"by",
"the",
"given",
"source",
"input",
"stream",
"into",
"the",
"given",
"destination",
"output",
"stream",
"."
] | 0988ae4e0f26a80f579b6adb2b276dd8254928de | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java#L58-L60 |
111,902 | googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/IOUtils.java | IOUtils.copy | public static void copy(
InputStream inputStream, OutputStream outputStream, boolean closeInputStream)
throws IOException {
try {
ByteStreams.copy(inputStream, outputStream);
} finally {
if (closeInputStream) {
inputStream.close();
}
}
} | java | public static void copy(
InputStream inputStream, OutputStream outputStream, boolean closeInputStream)
throws IOException {
try {
ByteStreams.copy(inputStream, outputStream);
} finally {
if (closeInputStream) {
inputStream.close();
}
}
} | [
"public",
"static",
"void",
"copy",
"(",
"InputStream",
"inputStream",
",",
"OutputStream",
"outputStream",
",",
"boolean",
"closeInputStream",
")",
"throws",
"IOException",
"{",
"try",
"{",
"ByteStreams",
".",
"copy",
"(",
"inputStream",
",",
"outputStream",
")",... | Writes the content provided by the given source input stream into the given destination output
stream, optionally closing the input stream.
<p>Sample use:
<pre>
static void copy(InputStream inputStream, File file) throws IOException {
FileOutputStream out = new FileOutputStream(file);
try {
IOUtils.copy(inputStream, ... | [
"Writes",
"the",
"content",
"provided",
"by",
"the",
"given",
"source",
"input",
"stream",
"into",
"the",
"given",
"destination",
"output",
"stream",
"optionally",
"closing",
"the",
"input",
"stream",
"."
] | 0988ae4e0f26a80f579b6adb2b276dd8254928de | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java#L83-L93 |
111,903 | googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/IOUtils.java | IOUtils.serialize | public static byte[] serialize(Object value) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
serialize(value, out);
return out.toByteArray();
} | java | public static byte[] serialize(Object value) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
serialize(value, out);
return out.toByteArray();
} | [
"public",
"static",
"byte",
"[",
"]",
"serialize",
"(",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"ByteArrayOutputStream",
"out",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"serialize",
"(",
"value",
",",
"out",
")",
";",
"return",
"out"... | Serializes the given object value to a newly allocated byte array.
@param value object value to serialize
@since 1.16 | [
"Serializes",
"the",
"given",
"object",
"value",
"to",
"a",
"newly",
"allocated",
"byte",
"array",
"."
] | 0988ae4e0f26a80f579b6adb2b276dd8254928de | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java#L117-L121 |
111,904 | googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/IOUtils.java | IOUtils.serialize | public static void serialize(Object value, OutputStream outputStream) throws IOException {
try {
new ObjectOutputStream(outputStream).writeObject(value);
} finally {
outputStream.close();
}
} | java | public static void serialize(Object value, OutputStream outputStream) throws IOException {
try {
new ObjectOutputStream(outputStream).writeObject(value);
} finally {
outputStream.close();
}
} | [
"public",
"static",
"void",
"serialize",
"(",
"Object",
"value",
",",
"OutputStream",
"outputStream",
")",
"throws",
"IOException",
"{",
"try",
"{",
"new",
"ObjectOutputStream",
"(",
"outputStream",
")",
".",
"writeObject",
"(",
"value",
")",
";",
"}",
"finall... | Serializes the given object value to an output stream, and close the output stream.
@param value object value to serialize
@param outputStream output stream to serialize into
@since 1.16 | [
"Serializes",
"the",
"given",
"object",
"value",
"to",
"an",
"output",
"stream",
"and",
"close",
"the",
"output",
"stream",
"."
] | 0988ae4e0f26a80f579b6adb2b276dd8254928de | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java#L130-L136 |
111,905 | googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/IOUtils.java | IOUtils.deserialize | public static <S extends Serializable> S deserialize(byte[] bytes) throws IOException {
if (bytes == null) {
return null;
}
return deserialize(new ByteArrayInputStream(bytes));
} | java | public static <S extends Serializable> S deserialize(byte[] bytes) throws IOException {
if (bytes == null) {
return null;
}
return deserialize(new ByteArrayInputStream(bytes));
} | [
"public",
"static",
"<",
"S",
"extends",
"Serializable",
">",
"S",
"deserialize",
"(",
"byte",
"[",
"]",
"bytes",
")",
"throws",
"IOException",
"{",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"deserialize",
"(",
"... | Deserializes the given byte array into to a newly allocated object.
@param bytes byte array to deserialize or {@code null} for {@code null} result
@return new allocated object or {@code null} for {@code null} input
@since 1.16 | [
"Deserializes",
"the",
"given",
"byte",
"array",
"into",
"to",
"a",
"newly",
"allocated",
"object",
"."
] | 0988ae4e0f26a80f579b6adb2b276dd8254928de | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java#L145-L150 |
111,906 | googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/IOUtils.java | IOUtils.deserialize | @SuppressWarnings("unchecked")
public static <S extends Serializable> S deserialize(InputStream inputStream) throws IOException {
try {
return (S) new ObjectInputStream(inputStream).readObject();
} catch (ClassNotFoundException exception) {
IOException ioe = new IOException("Failed to deserialize ... | java | @SuppressWarnings("unchecked")
public static <S extends Serializable> S deserialize(InputStream inputStream) throws IOException {
try {
return (S) new ObjectInputStream(inputStream).readObject();
} catch (ClassNotFoundException exception) {
IOException ioe = new IOException("Failed to deserialize ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"S",
"extends",
"Serializable",
">",
"S",
"deserialize",
"(",
"InputStream",
"inputStream",
")",
"throws",
"IOException",
"{",
"try",
"{",
"return",
"(",
"S",
")",
"new",
"ObjectInput... | Deserializes the given input stream into to a newly allocated object, and close the input
stream.
@param inputStream input stream to deserialize
@since 1.16 | [
"Deserializes",
"the",
"given",
"input",
"stream",
"into",
"to",
"a",
"newly",
"allocated",
"object",
"and",
"close",
"the",
"input",
"stream",
"."
] | 0988ae4e0f26a80f579b6adb2b276dd8254928de | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java#L159-L170 |
111,907 | googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java | ArrayMap.set | public final V set(int index, V value) {
int size = this.size;
if (index < 0 || index >= size) {
throw new IndexOutOfBoundsException();
}
int valueDataIndex = 1 + (index << 1);
V result = valueAtDataIndex(valueDataIndex);
this.data[valueDataIndex] = value;
return result;
} | java | public final V set(int index, V value) {
int size = this.size;
if (index < 0 || index >= size) {
throw new IndexOutOfBoundsException();
}
int valueDataIndex = 1 + (index << 1);
V result = valueAtDataIndex(valueDataIndex);
this.data[valueDataIndex] = value;
return result;
} | [
"public",
"final",
"V",
"set",
"(",
"int",
"index",
",",
"V",
"value",
")",
"{",
"int",
"size",
"=",
"this",
".",
"size",
";",
"if",
"(",
"index",
"<",
"0",
"||",
"index",
">=",
"size",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
")... | Sets the value at the given index, overriding any existing value mapping.
@return previous value or {@code null} for none
@throws IndexOutOfBoundsException if index is negative or {@code >=} size | [
"Sets",
"the",
"value",
"at",
"the",
"given",
"index",
"overriding",
"any",
"existing",
"value",
"mapping",
"."
] | 0988ae4e0f26a80f579b6adb2b276dd8254928de | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java#L143-L152 |
111,908 | googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java | ArrayMap.put | @Override
public final V put(K key, V value) {
int index = getIndexOfKey(key);
if (index == -1) {
index = this.size;
}
return set(index, key, value);
} | java | @Override
public final V put(K key, V value) {
int index = getIndexOfKey(key);
if (index == -1) {
index = this.size;
}
return set(index, key, value);
} | [
"@",
"Override",
"public",
"final",
"V",
"put",
"(",
"K",
"key",
",",
"V",
"value",
")",
"{",
"int",
"index",
"=",
"getIndexOfKey",
"(",
"key",
")",
";",
"if",
"(",
"index",
"==",
"-",
"1",
")",
"{",
"index",
"=",
"this",
".",
"size",
";",
"}",... | Sets the value for the given key, overriding any existing value.
@return previous value or {@code null} for none | [
"Sets",
"the",
"value",
"for",
"the",
"given",
"key",
"overriding",
"any",
"existing",
"value",
"."
] | 0988ae4e0f26a80f579b6adb2b276dd8254928de | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java#L198-L205 |
111,909 | googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java | ArrayMap.ensureCapacity | public final void ensureCapacity(int minCapacity) {
if (minCapacity < 0) {
throw new IndexOutOfBoundsException();
}
Object[] data = this.data;
int minDataCapacity = minCapacity << 1;
int oldDataCapacity = data == null ? 0 : data.length;
if (minDataCapacity > oldDataCapacity) {
int ne... | java | public final void ensureCapacity(int minCapacity) {
if (minCapacity < 0) {
throw new IndexOutOfBoundsException();
}
Object[] data = this.data;
int minDataCapacity = minCapacity << 1;
int oldDataCapacity = data == null ? 0 : data.length;
if (minDataCapacity > oldDataCapacity) {
int ne... | [
"public",
"final",
"void",
"ensureCapacity",
"(",
"int",
"minCapacity",
")",
"{",
"if",
"(",
"minCapacity",
"<",
"0",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
")",
";",
"}",
"Object",
"[",
"]",
"data",
"=",
"this",
".",
"data",
";",
... | Ensures that the capacity of the internal arrays is at least a given capacity. | [
"Ensures",
"that",
"the",
"capacity",
"of",
"the",
"internal",
"arrays",
"is",
"at",
"least",
"a",
"given",
"capacity",
"."
] | 0988ae4e0f26a80f579b6adb2b276dd8254928de | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java#L223-L240 |
111,910 | googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java | ClassInfo.of | public static ClassInfo of(Class<?> underlyingClass, boolean ignoreCase) {
if (underlyingClass == null) {
return null;
}
final Map<Class<?>, ClassInfo> cache = ignoreCase ? CACHE_IGNORE_CASE : CACHE;
ClassInfo classInfo;
synchronized (cache) {
classInfo = cache.get(underlyingClass);
... | java | public static ClassInfo of(Class<?> underlyingClass, boolean ignoreCase) {
if (underlyingClass == null) {
return null;
}
final Map<Class<?>, ClassInfo> cache = ignoreCase ? CACHE_IGNORE_CASE : CACHE;
ClassInfo classInfo;
synchronized (cache) {
classInfo = cache.get(underlyingClass);
... | [
"public",
"static",
"ClassInfo",
"of",
"(",
"Class",
"<",
"?",
">",
"underlyingClass",
",",
"boolean",
"ignoreCase",
")",
"{",
"if",
"(",
"underlyingClass",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Map",
"<",
"Class",
"<",
"?",
">"... | Returns the class information for the given underlying class.
@param underlyingClass underlying class or {@code null} for {@code null} result
@param ignoreCase whether field names are case sensitive
@return class information or {@code null} for {@code null} input
@since 1.10 | [
"Returns",
"the",
"class",
"information",
"for",
"the",
"given",
"underlying",
"class",
"."
] | 0988ae4e0f26a80f579b6adb2b276dd8254928de | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java#L80-L94 |
111,911 | 2dxgujun/AndroidTagGroup | library/src/main/java/me/gujun/android/taggroup/TagGroup.java | TagGroup.submitTag | public void submitTag() {
final TagView inputTag = getInputTag();
if (inputTag != null && inputTag.isInputAvailable()) {
inputTag.endInput();
if (mOnTagChangeListener != null) {
mOnTagChangeListener.onAppend(TagGroup.this, inputTag.getText().toString());
... | java | public void submitTag() {
final TagView inputTag = getInputTag();
if (inputTag != null && inputTag.isInputAvailable()) {
inputTag.endInput();
if (mOnTagChangeListener != null) {
mOnTagChangeListener.onAppend(TagGroup.this, inputTag.getText().toString());
... | [
"public",
"void",
"submitTag",
"(",
")",
"{",
"final",
"TagView",
"inputTag",
"=",
"getInputTag",
"(",
")",
";",
"if",
"(",
"inputTag",
"!=",
"null",
"&&",
"inputTag",
".",
"isInputAvailable",
"(",
")",
")",
"{",
"inputTag",
".",
"endInput",
"(",
")",
... | Call this to submit the INPUT tag. | [
"Call",
"this",
"to",
"submit",
"the",
"INPUT",
"tag",
"."
] | 6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4 | https://github.com/2dxgujun/AndroidTagGroup/blob/6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4/library/src/main/java/me/gujun/android/taggroup/TagGroup.java#L197-L207 |
111,912 | 2dxgujun/AndroidTagGroup | library/src/main/java/me/gujun/android/taggroup/TagGroup.java | TagGroup.getInputTag | protected TagView getInputTag() {
if (isAppendMode) {
final int inputTagIndex = getChildCount() - 1;
final TagView inputTag = getTagAt(inputTagIndex);
if (inputTag != null && inputTag.mState == TagView.STATE_INPUT) {
return inputTag;
} else {
... | java | protected TagView getInputTag() {
if (isAppendMode) {
final int inputTagIndex = getChildCount() - 1;
final TagView inputTag = getTagAt(inputTagIndex);
if (inputTag != null && inputTag.mState == TagView.STATE_INPUT) {
return inputTag;
} else {
... | [
"protected",
"TagView",
"getInputTag",
"(",
")",
"{",
"if",
"(",
"isAppendMode",
")",
"{",
"final",
"int",
"inputTagIndex",
"=",
"getChildCount",
"(",
")",
"-",
"1",
";",
"final",
"TagView",
"inputTag",
"=",
"getTagAt",
"(",
"inputTagIndex",
")",
";",
"if"... | Returns the INPUT tag view in this group.
@return the INPUT state tag view or null if not exists | [
"Returns",
"the",
"INPUT",
"tag",
"view",
"in",
"this",
"group",
"."
] | 6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4 | https://github.com/2dxgujun/AndroidTagGroup/blob/6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4/library/src/main/java/me/gujun/android/taggroup/TagGroup.java#L332-L344 |
111,913 | 2dxgujun/AndroidTagGroup | library/src/main/java/me/gujun/android/taggroup/TagGroup.java | TagGroup.getInputTagText | public String getInputTagText() {
final TagView inputTagView = getInputTag();
if (inputTagView != null) {
return inputTagView.getText().toString();
}
return null;
} | java | public String getInputTagText() {
final TagView inputTagView = getInputTag();
if (inputTagView != null) {
return inputTagView.getText().toString();
}
return null;
} | [
"public",
"String",
"getInputTagText",
"(",
")",
"{",
"final",
"TagView",
"inputTagView",
"=",
"getInputTag",
"(",
")",
";",
"if",
"(",
"inputTagView",
"!=",
"null",
")",
"{",
"return",
"inputTagView",
".",
"getText",
"(",
")",
".",
"toString",
"(",
")",
... | Returns the INPUT state tag in this group.
@return the INPUT state tag view or null if not exists | [
"Returns",
"the",
"INPUT",
"state",
"tag",
"in",
"this",
"group",
"."
] | 6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4 | https://github.com/2dxgujun/AndroidTagGroup/blob/6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4/library/src/main/java/me/gujun/android/taggroup/TagGroup.java#L351-L357 |
111,914 | 2dxgujun/AndroidTagGroup | library/src/main/java/me/gujun/android/taggroup/TagGroup.java | TagGroup.getLastNormalTagView | protected TagView getLastNormalTagView() {
final int lastNormalTagIndex = isAppendMode ? getChildCount() - 2 : getChildCount() - 1;
TagView lastNormalTagView = getTagAt(lastNormalTagIndex);
return lastNormalTagView;
} | java | protected TagView getLastNormalTagView() {
final int lastNormalTagIndex = isAppendMode ? getChildCount() - 2 : getChildCount() - 1;
TagView lastNormalTagView = getTagAt(lastNormalTagIndex);
return lastNormalTagView;
} | [
"protected",
"TagView",
"getLastNormalTagView",
"(",
")",
"{",
"final",
"int",
"lastNormalTagIndex",
"=",
"isAppendMode",
"?",
"getChildCount",
"(",
")",
"-",
"2",
":",
"getChildCount",
"(",
")",
"-",
"1",
";",
"TagView",
"lastNormalTagView",
"=",
"getTagAt",
... | Return the last NORMAL state tag view in this group.
@return the last NORMAL state tag view or null if not exists | [
"Return",
"the",
"last",
"NORMAL",
"state",
"tag",
"view",
"in",
"this",
"group",
"."
] | 6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4 | https://github.com/2dxgujun/AndroidTagGroup/blob/6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4/library/src/main/java/me/gujun/android/taggroup/TagGroup.java#L364-L368 |
111,915 | 2dxgujun/AndroidTagGroup | library/src/main/java/me/gujun/android/taggroup/TagGroup.java | TagGroup.getTags | public String[] getTags() {
final int count = getChildCount();
final List<String> tagList = new ArrayList<>();
for (int i = 0; i < count; i++) {
final TagView tagView = getTagAt(i);
if (tagView.mState == TagView.STATE_NORMAL) {
tagList.add(tagView.getText(... | java | public String[] getTags() {
final int count = getChildCount();
final List<String> tagList = new ArrayList<>();
for (int i = 0; i < count; i++) {
final TagView tagView = getTagAt(i);
if (tagView.mState == TagView.STATE_NORMAL) {
tagList.add(tagView.getText(... | [
"public",
"String",
"[",
"]",
"getTags",
"(",
")",
"{",
"final",
"int",
"count",
"=",
"getChildCount",
"(",
")",
";",
"final",
"List",
"<",
"String",
">",
"tagList",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
... | Returns the tag array in group, except the INPUT tag.
@return the tag array. | [
"Returns",
"the",
"tag",
"array",
"in",
"group",
"except",
"the",
"INPUT",
"tag",
"."
] | 6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4 | https://github.com/2dxgujun/AndroidTagGroup/blob/6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4/library/src/main/java/me/gujun/android/taggroup/TagGroup.java#L375-L386 |
111,916 | 2dxgujun/AndroidTagGroup | library/src/main/java/me/gujun/android/taggroup/TagGroup.java | TagGroup.setTags | public void setTags(String... tags) {
removeAllViews();
for (final String tag : tags) {
appendTag(tag);
}
if (isAppendMode) {
appendInputTag();
}
} | java | public void setTags(String... tags) {
removeAllViews();
for (final String tag : tags) {
appendTag(tag);
}
if (isAppendMode) {
appendInputTag();
}
} | [
"public",
"void",
"setTags",
"(",
"String",
"...",
"tags",
")",
"{",
"removeAllViews",
"(",
")",
";",
"for",
"(",
"final",
"String",
"tag",
":",
"tags",
")",
"{",
"appendTag",
"(",
"tag",
")",
";",
"}",
"if",
"(",
"isAppendMode",
")",
"{",
"appendInp... | Set the tags. It will remove all previous tags first.
@param tags the tag list to set. | [
"Set",
"the",
"tags",
".",
"It",
"will",
"remove",
"all",
"previous",
"tags",
"first",
"."
] | 6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4 | https://github.com/2dxgujun/AndroidTagGroup/blob/6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4/library/src/main/java/me/gujun/android/taggroup/TagGroup.java#L400-L409 |
111,917 | 2dxgujun/AndroidTagGroup | library/src/main/java/me/gujun/android/taggroup/TagGroup.java | TagGroup.getCheckedTagIndex | protected int getCheckedTagIndex() {
final int count = getChildCount();
for (int i = 0; i < count; i++) {
final TagView tag = getTagAt(i);
if (tag.isChecked) {
return i;
}
}
return -1;
} | java | protected int getCheckedTagIndex() {
final int count = getChildCount();
for (int i = 0; i < count; i++) {
final TagView tag = getTagAt(i);
if (tag.isChecked) {
return i;
}
}
return -1;
} | [
"protected",
"int",
"getCheckedTagIndex",
"(",
")",
"{",
"final",
"int",
"count",
"=",
"getChildCount",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"i",
"++",
")",
"{",
"final",
"TagView",
"tag",
"=",
"getTagAt",
"... | Return the checked tag index.
@return the checked tag index, or -1 if not exists. | [
"Return",
"the",
"checked",
"tag",
"index",
"."
] | 6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4 | https://github.com/2dxgujun/AndroidTagGroup/blob/6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4/library/src/main/java/me/gujun/android/taggroup/TagGroup.java#L440-L449 |
111,918 | 2dxgujun/AndroidTagGroup | library/src/main/java/me/gujun/android/taggroup/TagGroup.java | TagGroup.appendInputTag | protected void appendInputTag(String tag) {
final TagView previousInputTag = getInputTag();
if (previousInputTag != null) {
throw new IllegalStateException("Already has a INPUT tag in group.");
}
final TagView newInputTag = new TagView(getContext(), TagView.STATE_INPUT, tag)... | java | protected void appendInputTag(String tag) {
final TagView previousInputTag = getInputTag();
if (previousInputTag != null) {
throw new IllegalStateException("Already has a INPUT tag in group.");
}
final TagView newInputTag = new TagView(getContext(), TagView.STATE_INPUT, tag)... | [
"protected",
"void",
"appendInputTag",
"(",
"String",
"tag",
")",
"{",
"final",
"TagView",
"previousInputTag",
"=",
"getInputTag",
"(",
")",
";",
"if",
"(",
"previousInputTag",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Already has ... | Append a INPUT tag to this group. It will throw an exception if there has a previous INPUT tag.
@param tag the tag text. | [
"Append",
"a",
"INPUT",
"tag",
"to",
"this",
"group",
".",
"It",
"will",
"throw",
"an",
"exception",
"if",
"there",
"has",
"a",
"previous",
"INPUT",
"tag",
"."
] | 6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4 | https://github.com/2dxgujun/AndroidTagGroup/blob/6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4/library/src/main/java/me/gujun/android/taggroup/TagGroup.java#L472-L481 |
111,919 | 2dxgujun/AndroidTagGroup | library/src/main/java/me/gujun/android/taggroup/TagGroup.java | TagGroup.appendTag | protected void appendTag(CharSequence tag) {
final TagView newTag = new TagView(getContext(), TagView.STATE_NORMAL, tag);
newTag.setOnClickListener(mInternalTagClickListener);
addView(newTag);
} | java | protected void appendTag(CharSequence tag) {
final TagView newTag = new TagView(getContext(), TagView.STATE_NORMAL, tag);
newTag.setOnClickListener(mInternalTagClickListener);
addView(newTag);
} | [
"protected",
"void",
"appendTag",
"(",
"CharSequence",
"tag",
")",
"{",
"final",
"TagView",
"newTag",
"=",
"new",
"TagView",
"(",
"getContext",
"(",
")",
",",
"TagView",
".",
"STATE_NORMAL",
",",
"tag",
")",
";",
"newTag",
".",
"setOnClickListener",
"(",
"... | Append tag to this group.
@param tag the tag to append. | [
"Append",
"tag",
"to",
"this",
"group",
"."
] | 6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4 | https://github.com/2dxgujun/AndroidTagGroup/blob/6d32f52409fabb0fdf24d665622fe3fe3f8f9ad4/library/src/main/java/me/gujun/android/taggroup/TagGroup.java#L488-L492 |
111,920 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/Configuration.java | Configuration.getEmbeddingDirectory | public File getEmbeddingDirectory() {
return new File(getReportDirectory().getAbsolutePath(), ReportBuilder.BASE_DIRECTORY
+ File.separatorChar + Configuration.EMBEDDINGS_DIRECTORY);
} | java | public File getEmbeddingDirectory() {
return new File(getReportDirectory().getAbsolutePath(), ReportBuilder.BASE_DIRECTORY
+ File.separatorChar + Configuration.EMBEDDINGS_DIRECTORY);
} | [
"public",
"File",
"getEmbeddingDirectory",
"(",
")",
"{",
"return",
"new",
"File",
"(",
"getReportDirectory",
"(",
")",
".",
"getAbsolutePath",
"(",
")",
",",
"ReportBuilder",
".",
"BASE_DIRECTORY",
"+",
"File",
".",
"separatorChar",
"+",
"Configuration",
".",
... | Gets directory where the attachments are stored.
@return directory for attachment | [
"Gets",
"directory",
"where",
"the",
"attachments",
"are",
"stored",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/Configuration.java#L162-L165 |
111,921 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/Configuration.java | Configuration.setTagsToExcludeFromChart | public void setTagsToExcludeFromChart(String... patterns) {
for (String pattern : patterns) {
try {
tagsToExcludeFromChart.add(Pattern.compile(pattern));
} catch (PatternSyntaxException e) {
throw new ValidationException(e);
}
}
} | java | public void setTagsToExcludeFromChart(String... patterns) {
for (String pattern : patterns) {
try {
tagsToExcludeFromChart.add(Pattern.compile(pattern));
} catch (PatternSyntaxException e) {
throw new ValidationException(e);
}
}
} | [
"public",
"void",
"setTagsToExcludeFromChart",
"(",
"String",
"...",
"patterns",
")",
"{",
"for",
"(",
"String",
"pattern",
":",
"patterns",
")",
"{",
"try",
"{",
"tagsToExcludeFromChart",
".",
"add",
"(",
"Pattern",
".",
"compile",
"(",
"pattern",
")",
")",... | Stores the regex patterns to be used for filtering out tags from the 'Tags Overview' chart
@param patterns Regex patterns to match against tags
@throws ValidationException when any of the given strings is not a valid regex pattern. | [
"Stores",
"the",
"regex",
"patterns",
"to",
"be",
"used",
"for",
"filtering",
"out",
"tags",
"from",
"the",
"Tags",
"Overview",
"chart"
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/Configuration.java#L180-L188 |
111,922 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/json/support/StatusCounter.java | StatusCounter.incrementFor | public void incrementFor(Status status) {
final int statusCounter = getValueFor(status) + 1;
this.counter.put(status, statusCounter);
size++;
if (finalStatus == Status.PASSED && status != Status.PASSED) {
finalStatus = Status.FAILED;
}
} | java | public void incrementFor(Status status) {
final int statusCounter = getValueFor(status) + 1;
this.counter.put(status, statusCounter);
size++;
if (finalStatus == Status.PASSED && status != Status.PASSED) {
finalStatus = Status.FAILED;
}
} | [
"public",
"void",
"incrementFor",
"(",
"Status",
"status",
")",
"{",
"final",
"int",
"statusCounter",
"=",
"getValueFor",
"(",
"status",
")",
"+",
"1",
";",
"this",
".",
"counter",
".",
"put",
"(",
"status",
",",
"statusCounter",
")",
";",
"size",
"++",
... | Increments finalStatus counter by single value.
@param status
finalStatus for which the counter should be incremented. | [
"Increments",
"finalStatus",
"counter",
"by",
"single",
"value",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/json/support/StatusCounter.java#L42-L50 |
111,923 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/json/Feature.java | Feature.setMetaData | public void setMetaData(int jsonFileNo, Configuration configuration) {
for (Element element : elements) {
element.setMetaData(this);
if (element.isScenario()) {
scenarios.add(element);
}
}
reportFileName = calculateReportFileName(jsonFileNo);... | java | public void setMetaData(int jsonFileNo, Configuration configuration) {
for (Element element : elements) {
element.setMetaData(this);
if (element.isScenario()) {
scenarios.add(element);
}
}
reportFileName = calculateReportFileName(jsonFileNo);... | [
"public",
"void",
"setMetaData",
"(",
"int",
"jsonFileNo",
",",
"Configuration",
"configuration",
")",
"{",
"for",
"(",
"Element",
"element",
":",
"elements",
")",
"{",
"element",
".",
"setMetaData",
"(",
"this",
")",
";",
"if",
"(",
"element",
".",
"isSce... | Sets additional information and calculates values which should be calculated during object creation.
@param jsonFileNo index of the JSON file
@param configuration configuration for the report | [
"Sets",
"additional",
"information",
"and",
"calculates",
"values",
"which",
"should",
"be",
"calculated",
"during",
"object",
"creation",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/json/Feature.java#L156-L169 |
111,924 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/Trends.java | Trends.addBuild | public void addBuild(String buildNumber, Reportable reportable) {
buildNumbers = (String[]) ArrayUtils.add(buildNumbers, buildNumber);
passedFeatures = ArrayUtils.add(passedFeatures, reportable.getPassedFeatures());
failedFeatures = ArrayUtils.add(failedFeatures, reportable.getFailedFeatures()... | java | public void addBuild(String buildNumber, Reportable reportable) {
buildNumbers = (String[]) ArrayUtils.add(buildNumbers, buildNumber);
passedFeatures = ArrayUtils.add(passedFeatures, reportable.getPassedFeatures());
failedFeatures = ArrayUtils.add(failedFeatures, reportable.getFailedFeatures()... | [
"public",
"void",
"addBuild",
"(",
"String",
"buildNumber",
",",
"Reportable",
"reportable",
")",
"{",
"buildNumbers",
"=",
"(",
"String",
"[",
"]",
")",
"ArrayUtils",
".",
"add",
"(",
"buildNumbers",
",",
"buildNumber",
")",
";",
"passedFeatures",
"=",
"Arr... | Adds build into the trends.
@param buildNumber number of the build
@param reportable stats for the generated report | [
"Adds",
"build",
"into",
"the",
"trends",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/Trends.java#L94-L123 |
111,925 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/Trends.java | Trends.limitItems | public void limitItems(int limit) {
buildNumbers = copyLastElements(buildNumbers, limit);
passedFeatures = copyLastElements(passedFeatures, limit);
failedFeatures = copyLastElements(failedFeatures, limit);
totalFeatures = copyLastElements(totalFeatures, limit);
passedScenarios ... | java | public void limitItems(int limit) {
buildNumbers = copyLastElements(buildNumbers, limit);
passedFeatures = copyLastElements(passedFeatures, limit);
failedFeatures = copyLastElements(failedFeatures, limit);
totalFeatures = copyLastElements(totalFeatures, limit);
passedScenarios ... | [
"public",
"void",
"limitItems",
"(",
"int",
"limit",
")",
"{",
"buildNumbers",
"=",
"copyLastElements",
"(",
"buildNumbers",
",",
"limit",
")",
";",
"passedFeatures",
"=",
"copyLastElements",
"(",
"passedFeatures",
",",
"limit",
")",
";",
"failedFeatures",
"=",
... | Removes elements that points to the oldest items.
Leave trends unchanged if the limit is bigger than current trends length.
@param limit number of elements that will be leave | [
"Removes",
"elements",
"that",
"points",
"to",
"the",
"oldest",
"items",
".",
"Leave",
"trends",
"unchanged",
"if",
"the",
"limit",
"is",
"bigger",
"than",
"current",
"trends",
"length",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/Trends.java#L131-L150 |
111,926 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/Trends.java | Trends.fillMissingSteps | private void fillMissingSteps() {
// correct only pending and undefined steps
passedFeatures = fillMissingArray(passedFeatures);
passedScenarios = fillMissingArray(passedScenarios);
passedSteps = fillMissingArray(passedSteps);
skippedSteps = fillMissingArray(skippedSteps);
... | java | private void fillMissingSteps() {
// correct only pending and undefined steps
passedFeatures = fillMissingArray(passedFeatures);
passedScenarios = fillMissingArray(passedScenarios);
passedSteps = fillMissingArray(passedSteps);
skippedSteps = fillMissingArray(skippedSteps);
... | [
"private",
"void",
"fillMissingSteps",
"(",
")",
"{",
"// correct only pending and undefined steps",
"passedFeatures",
"=",
"fillMissingArray",
"(",
"passedFeatures",
")",
";",
"passedScenarios",
"=",
"fillMissingArray",
"(",
"passedScenarios",
")",
";",
"passedSteps",
"=... | Since pending and undefined steps were added later
there is need to fill missing data for those statuses. | [
"Since",
"pending",
"and",
"undefined",
"steps",
"were",
"added",
"later",
"there",
"is",
"need",
"to",
"fill",
"missing",
"data",
"for",
"those",
"statuses",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/Trends.java#L210-L219 |
111,927 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/Trends.java | Trends.fillMissingDurations | private void fillMissingDurations() {
long[] extendedArray = new long[buildNumbers.length];
Arrays.fill(extendedArray, -1);
System.arraycopy(durations, 0, extendedArray, buildNumbers.length - durations.length, durations.length);
durations = extendedArray;
} | java | private void fillMissingDurations() {
long[] extendedArray = new long[buildNumbers.length];
Arrays.fill(extendedArray, -1);
System.arraycopy(durations, 0, extendedArray, buildNumbers.length - durations.length, durations.length);
durations = extendedArray;
} | [
"private",
"void",
"fillMissingDurations",
"(",
")",
"{",
"long",
"[",
"]",
"extendedArray",
"=",
"new",
"long",
"[",
"buildNumbers",
".",
"length",
"]",
";",
"Arrays",
".",
"fill",
"(",
"extendedArray",
",",
"-",
"1",
")",
";",
"System",
".",
"arraycopy... | Since durations were added later there is need to fill missing data for those statuses. | [
"Since",
"durations",
"were",
"added",
"later",
"there",
"is",
"need",
"to",
"fill",
"missing",
"data",
"for",
"those",
"statuses",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/Trends.java#L230-L235 |
111,928 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/ReportParser.java | ReportParser.parseJsonFiles | public List<Feature> parseJsonFiles(List<String> jsonFiles) {
if (jsonFiles.isEmpty()) {
throw new ValidationException("None report file was added!");
}
List<Feature> featureResults = new ArrayList<>();
for (int i = 0; i < jsonFiles.size(); i++) {
String jsonFile... | java | public List<Feature> parseJsonFiles(List<String> jsonFiles) {
if (jsonFiles.isEmpty()) {
throw new ValidationException("None report file was added!");
}
List<Feature> featureResults = new ArrayList<>();
for (int i = 0; i < jsonFiles.size(); i++) {
String jsonFile... | [
"public",
"List",
"<",
"Feature",
">",
"parseJsonFiles",
"(",
"List",
"<",
"String",
">",
"jsonFiles",
")",
"{",
"if",
"(",
"jsonFiles",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"ValidationException",
"(",
"\"None report file was added!\"",
")",
"... | Parsed passed files and extracts features files.
@param jsonFiles
JSON files to read
@return array of parsed features | [
"Parsed",
"passed",
"files",
"and",
"extracts",
"features",
"files",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/ReportParser.java#L58-L82 |
111,929 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/ReportParser.java | ReportParser.parseForFeature | private Feature[] parseForFeature(String jsonFile) {
try (Reader reader = new InputStreamReader(new FileInputStream(jsonFile), StandardCharsets.UTF_8)) {
Feature[] features = mapper.readValue(reader, Feature[].class);
if (ArrayUtils.isEmpty(features)) {
LOG.log(Level.INFO... | java | private Feature[] parseForFeature(String jsonFile) {
try (Reader reader = new InputStreamReader(new FileInputStream(jsonFile), StandardCharsets.UTF_8)) {
Feature[] features = mapper.readValue(reader, Feature[].class);
if (ArrayUtils.isEmpty(features)) {
LOG.log(Level.INFO... | [
"private",
"Feature",
"[",
"]",
"parseForFeature",
"(",
"String",
"jsonFile",
")",
"{",
"try",
"(",
"Reader",
"reader",
"=",
"new",
"InputStreamReader",
"(",
"new",
"FileInputStream",
"(",
"jsonFile",
")",
",",
"StandardCharsets",
".",
"UTF_8",
")",
")",
"{"... | Reads passed file and returns parsed features.
@param jsonFile
JSON file that should be read
@return array of parsed features | [
"Reads",
"passed",
"file",
"and",
"returns",
"parsed",
"features",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/ReportParser.java#L91-L104 |
111,930 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/ReportParser.java | ReportParser.parseClassificationsFiles | public void parseClassificationsFiles(List<String> propertiesFiles) {
if (isNotEmpty(propertiesFiles)) {
for (String propertyFile : propertiesFiles) {
if (StringUtils.isNotEmpty(propertyFile)) {
processClassificationFile(propertyFile);
}
... | java | public void parseClassificationsFiles(List<String> propertiesFiles) {
if (isNotEmpty(propertiesFiles)) {
for (String propertyFile : propertiesFiles) {
if (StringUtils.isNotEmpty(propertyFile)) {
processClassificationFile(propertyFile);
}
... | [
"public",
"void",
"parseClassificationsFiles",
"(",
"List",
"<",
"String",
">",
"propertiesFiles",
")",
"{",
"if",
"(",
"isNotEmpty",
"(",
"propertiesFiles",
")",
")",
"{",
"for",
"(",
"String",
"propertyFile",
":",
"propertiesFiles",
")",
"{",
"if",
"(",
"S... | Parses passed properties files for classifications. These classifications within each file get added to the overview-features page as metadata.
File and metadata order within the individual files are preserved when classifications are added.
@param propertiesFiles
property files to read | [
"Parses",
"passed",
"properties",
"files",
"for",
"classifications",
".",
"These",
"classifications",
"within",
"each",
"file",
"get",
"added",
"to",
"the",
"overview",
"-",
"features",
"page",
"as",
"metadata",
".",
"File",
"and",
"metadata",
"order",
"within",... | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/ReportParser.java#L113-L121 |
111,931 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/util/Util.java | Util.formatAsPercentage | public static String formatAsPercentage(int value, int total) {
// value '1F' is to force floating conversion instead of loosing decimal part
float average = total == 0 ? 0 : 1F * value / total;
return PERCENT_FORMATTER.format(average);
} | java | public static String formatAsPercentage(int value, int total) {
// value '1F' is to force floating conversion instead of loosing decimal part
float average = total == 0 ? 0 : 1F * value / total;
return PERCENT_FORMATTER.format(average);
} | [
"public",
"static",
"String",
"formatAsPercentage",
"(",
"int",
"value",
",",
"int",
"total",
")",
"{",
"// value '1F' is to force floating conversion instead of loosing decimal part",
"float",
"average",
"=",
"total",
"==",
"0",
"?",
"0",
":",
"1F",
"*",
"value",
"... | Returns value converted to percentage format.
@param value value to convert
@param total sum of all values
@return converted values including '%' character | [
"Returns",
"value",
"converted",
"to",
"percentage",
"format",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/util/Util.java#L55-L59 |
111,932 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/util/Util.java | Util.toValidFileName | public static String toValidFileName(String fileName) {
// adds MAX_VALUE to eliminate minus character which might be returned by hashCode()
return Long.toString((long) fileName.hashCode() + Integer.MAX_VALUE);
} | java | public static String toValidFileName(String fileName) {
// adds MAX_VALUE to eliminate minus character which might be returned by hashCode()
return Long.toString((long) fileName.hashCode() + Integer.MAX_VALUE);
} | [
"public",
"static",
"String",
"toValidFileName",
"(",
"String",
"fileName",
")",
"{",
"// adds MAX_VALUE to eliminate minus character which might be returned by hashCode()",
"return",
"Long",
".",
"toString",
"(",
"(",
"long",
")",
"fileName",
".",
"hashCode",
"(",
")",
... | Converts characters of passed string and replaces to hash which can be treated as valid file name.
@param fileName
sequence that should be converted
@return converted string | [
"Converts",
"characters",
"of",
"passed",
"string",
"and",
"replaces",
"to",
"hash",
"which",
"can",
"be",
"treated",
"as",
"valid",
"file",
"name",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/util/Util.java#L73-L76 |
111,933 | damianszczepanik/cucumber-reporting | src/main/java/net/masterthought/cucumber/ReportBuilder.java | ReportBuilder.generateReports | public Reportable generateReports() {
Trends trends = null;
try {
// first copy static resources so ErrorPage is displayed properly
copyStaticResources();
// create directory for embeddings before files are generated
createEmbeddingsDirectory();
... | java | public Reportable generateReports() {
Trends trends = null;
try {
// first copy static resources so ErrorPage is displayed properly
copyStaticResources();
// create directory for embeddings before files are generated
createEmbeddingsDirectory();
... | [
"public",
"Reportable",
"generateReports",
"(",
")",
"{",
"Trends",
"trends",
"=",
"null",
";",
"try",
"{",
"// first copy static resources so ErrorPage is displayed properly",
"copyStaticResources",
"(",
")",
";",
"// create directory for embeddings before files are generated",
... | Parses provided files and generates the report. When generating process fails
report with information about error is provided.
@return stats for the generated report | [
"Parses",
"provided",
"files",
"and",
"generates",
"the",
"report",
".",
"When",
"generating",
"process",
"fails",
"report",
"with",
"information",
"about",
"error",
"is",
"provided",
"."
] | 9ffe0d4a9c0aec161b0988a930a8312ba36dc742 | https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/ReportBuilder.java#L74-L117 |
111,934 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/Bufferer.java | Bufferer.buffer | Geometry buffer(Geometry geometry, double distance,
SpatialReference sr, double densify_dist,
int max_vertex_in_complete_circle, ProgressTracker progress_tracker) {
if (geometry == null)
throw new IllegalArgumentException();
if (densify_dist < 0)
throw new IllegalArgumentException();
if (geometry.is... | java | Geometry buffer(Geometry geometry, double distance,
SpatialReference sr, double densify_dist,
int max_vertex_in_complete_circle, ProgressTracker progress_tracker) {
if (geometry == null)
throw new IllegalArgumentException();
if (densify_dist < 0)
throw new IllegalArgumentException();
if (geometry.is... | [
"Geometry",
"buffer",
"(",
"Geometry",
"geometry",
",",
"double",
"distance",
",",
"SpatialReference",
"sr",
",",
"double",
"densify_dist",
",",
"int",
"max_vertex_in_complete_circle",
",",
"ProgressTracker",
"progress_tracker",
")",
"{",
"if",
"(",
"geometry",
"=="... | Result is always a polygon. For non positive distance and non-areas
returns an empty polygon. For points returns circles. | [
"Result",
"is",
"always",
"a",
"polygon",
".",
"For",
"non",
"positive",
"distance",
"and",
"non",
"-",
"areas",
"returns",
"an",
"empty",
"polygon",
".",
"For",
"points",
"returns",
"circles",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Bufferer.java#L52-L150 |
111,935 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/SimpleRasterizer.java | SimpleRasterizer.setup | public void setup(int width, int height, ScanCallback callback)
{
width_ = width; height_ = height;
ySortedEdges_ = null;
activeEdgesTable_ = null;
numEdges_ = 0;
callback_ = callback;
if (scanBuffer_ == null)
scanBuffer_ = new int[128 * 3];
startAddingEdges();
} | java | public void setup(int width, int height, ScanCallback callback)
{
width_ = width; height_ = height;
ySortedEdges_ = null;
activeEdgesTable_ = null;
numEdges_ = 0;
callback_ = callback;
if (scanBuffer_ == null)
scanBuffer_ = new int[128 * 3];
startAddingEdges();
} | [
"public",
"void",
"setup",
"(",
"int",
"width",
",",
"int",
"height",
",",
"ScanCallback",
"callback",
")",
"{",
"width_",
"=",
"width",
";",
"height_",
"=",
"height",
";",
"ySortedEdges_",
"=",
"null",
";",
"activeEdgesTable_",
"=",
"null",
";",
"numEdges... | Sets up the rasterizer. | [
"Sets",
"up",
"the",
"rasterizer",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/SimpleRasterizer.java#L69-L80 |
111,936 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/SimpleRasterizer.java | SimpleRasterizer.addTriangle | public final void addTriangle(double x1, double y1, double x2, double y2, double x3, double y3) {
addEdge(x1, y1, x2, y2);
addEdge(x2, y2, x3, y3);
addEdge(x1, y1, x3, y3);
} | java | public final void addTriangle(double x1, double y1, double x2, double y2, double x3, double y3) {
addEdge(x1, y1, x2, y2);
addEdge(x2, y2, x3, y3);
addEdge(x1, y1, x3, y3);
} | [
"public",
"final",
"void",
"addTriangle",
"(",
"double",
"x1",
",",
"double",
"y1",
",",
"double",
"x2",
",",
"double",
"y2",
",",
"double",
"x3",
",",
"double",
"y3",
")",
"{",
"addEdge",
"(",
"x1",
",",
"y1",
",",
"x2",
",",
"y2",
")",
";",
"ad... | Adds edges of a triangle. | [
"Adds",
"edges",
"of",
"a",
"triangle",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/SimpleRasterizer.java#L103-L107 |
111,937 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/SimpleRasterizer.java | SimpleRasterizer.addRing | public final void addRing(double xy[]) {
for (int i = 2; i < xy.length; i += 2) {
addEdge(xy[i-2], xy[i - 1], xy[i], xy[i + 1]);
}
} | java | public final void addRing(double xy[]) {
for (int i = 2; i < xy.length; i += 2) {
addEdge(xy[i-2], xy[i - 1], xy[i], xy[i + 1]);
}
} | [
"public",
"final",
"void",
"addRing",
"(",
"double",
"xy",
"[",
"]",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"2",
";",
"i",
"<",
"xy",
".",
"length",
";",
"i",
"+=",
"2",
")",
"{",
"addEdge",
"(",
"xy",
"[",
"i",
"-",
"2",
"]",
",",
"xy",
... | Adds edges of the ring to the rasterizer.
@param xy interleaved coordinates x1, y1, x2, y2,... | [
"Adds",
"edges",
"of",
"the",
"ring",
"to",
"the",
"rasterizer",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/SimpleRasterizer.java#L113-L117 |
111,938 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/SimpleRasterizer.java | SimpleRasterizer.startAddingEdges | public final void startAddingEdges() {
if (numEdges_ > 0) {
for (int i = 0; i < height_; i++) {
for (Edge e = ySortedEdges_[i]; e != null;) {
Edge p = e;
e = e.next;
p.next = null;
}
ySortedEdges_[i] = null;
}
activeEdgesTable_ = null;
}
minY_ = height_;
maxY_ = -1;
... | java | public final void startAddingEdges() {
if (numEdges_ > 0) {
for (int i = 0; i < height_; i++) {
for (Edge e = ySortedEdges_[i]; e != null;) {
Edge p = e;
e = e.next;
p.next = null;
}
ySortedEdges_[i] = null;
}
activeEdgesTable_ = null;
}
minY_ = height_;
maxY_ = -1;
... | [
"public",
"final",
"void",
"startAddingEdges",
"(",
")",
"{",
"if",
"(",
"numEdges_",
">",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"height_",
";",
"i",
"++",
")",
"{",
"for",
"(",
"Edge",
"e",
"=",
"ySortedEdges_",
"[",
... | Call before starting the edges.
For example to render two polygons that consist of a single ring:
startAddingEdges();
addRing(...);
renderEdges(Rasterizer.EVEN_ODD);
addRing(...);
renderEdges(Rasterizer.EVEN_ODD);
For example to render a polygon consisting of three rings:
startAddingEdges();
addRing(...);
addRing(...... | [
"Call",
"before",
"starting",
"the",
"edges",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/SimpleRasterizer.java#L136-L154 |
111,939 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/SimpleRasterizer.java | SimpleRasterizer.addEdge | public final void addEdge(double x1, double y1, double x2, double y2) {
if (y1 == y2)
return;
int dir = 1;
if (y1 > y2) {
double temp;
temp = x1; x1 = x2; x2 = temp;
temp = y1; y1 = y2; y2 = temp;
dir = -1;
}
if (y2 < 0 || y1 >= height_)
return;
if (x1 < 0 && x2 < 0)
{
x1 = -1... | java | public final void addEdge(double x1, double y1, double x2, double y2) {
if (y1 == y2)
return;
int dir = 1;
if (y1 > y2) {
double temp;
temp = x1; x1 = x2; x2 = temp;
temp = y1; y1 = y2; y2 = temp;
dir = -1;
}
if (y2 < 0 || y1 >= height_)
return;
if (x1 < 0 && x2 < 0)
{
x1 = -1... | [
"public",
"final",
"void",
"addEdge",
"(",
"double",
"x1",
",",
"double",
"y1",
",",
"double",
"x2",
",",
"double",
"y2",
")",
"{",
"if",
"(",
"y1",
"==",
"y2",
")",
"return",
";",
"int",
"dir",
"=",
"1",
";",
"if",
"(",
"y1",
">",
"y2",
")",
... | Add a single edge.
@param x1
@param y1
@param x2
@param y2 | [
"Add",
"a",
"single",
"edge",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/SimpleRasterizer.java#L182-L270 |
111,940 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/Line.java | Line.intersectionWithEnvelope2D | int intersectionWithEnvelope2D(Envelope2D clipEnv2D,
boolean includeEnvBoundary, double[] segParams,
double[] envelopeDistances) {
Point2D p1 = getStartXY();
Point2D p2 = getEndXY();
// includeEnvBoundary xxx ???
int modified = clipEnv2D.clipLine(p1, p2, 0, segParams,
envelopeDistances);
return mo... | java | int intersectionWithEnvelope2D(Envelope2D clipEnv2D,
boolean includeEnvBoundary, double[] segParams,
double[] envelopeDistances) {
Point2D p1 = getStartXY();
Point2D p2 = getEndXY();
// includeEnvBoundary xxx ???
int modified = clipEnv2D.clipLine(p1, p2, 0, segParams,
envelopeDistances);
return mo... | [
"int",
"intersectionWithEnvelope2D",
"(",
"Envelope2D",
"clipEnv2D",
",",
"boolean",
"includeEnvBoundary",
",",
"double",
"[",
"]",
"segParams",
",",
"double",
"[",
"]",
"envelopeDistances",
")",
"{",
"Point2D",
"p1",
"=",
"getStartXY",
"(",
")",
";",
"Point2D",... | inside clipEnv2D. | [
"inside",
"clipEnv2D",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Line.java#L346-L358 |
111,941 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/Line.java | Line._side | int _side(double ptX, double ptY) {
Point2D v1 = new Point2D(ptX, ptY);
v1.sub(getStartXY());
Point2D v2 = new Point2D();
v2.sub(getEndXY(), getStartXY());
double cross = v2.crossProduct(v1);
double crossError = 4 * NumberUtils.doubleEps()
* (Math.abs(v2.x * v1.y) + Math.abs(v2.y * v1.x));
return cros... | java | int _side(double ptX, double ptY) {
Point2D v1 = new Point2D(ptX, ptY);
v1.sub(getStartXY());
Point2D v2 = new Point2D();
v2.sub(getEndXY(), getStartXY());
double cross = v2.crossProduct(v1);
double crossError = 4 * NumberUtils.doubleEps()
* (Math.abs(v2.x * v1.y) + Math.abs(v2.y * v1.x));
return cros... | [
"int",
"_side",
"(",
"double",
"ptX",
",",
"double",
"ptY",
")",
"{",
"Point2D",
"v1",
"=",
"new",
"Point2D",
"(",
"ptX",
",",
"ptY",
")",
";",
"v1",
".",
"sub",
"(",
"getStartXY",
"(",
")",
")",
";",
"Point2D",
"v2",
"=",
"new",
"Point2D",
"(",
... | of the roundoff error) | [
"of",
"the",
"roundoff",
"error",
")"
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Line.java#L428-L437 |
111,942 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/Line.java | Line._isIntersectingHelper | static boolean _isIntersectingHelper(Line line1, Line line2) {
int s11 = line1._side(line2.m_xStart, line2.m_yStart);
int s12 = line1._side(line2.m_xEnd, line2.m_yEnd);
if (s11 < 0 && s12 < 0 || s11 > 0 && s12 > 0)
return false;// no intersection. The line2 lies to one side of an
// infinite line passin... | java | static boolean _isIntersectingHelper(Line line1, Line line2) {
int s11 = line1._side(line2.m_xStart, line2.m_yStart);
int s12 = line1._side(line2.m_xEnd, line2.m_yEnd);
if (s11 < 0 && s12 < 0 || s11 > 0 && s12 > 0)
return false;// no intersection. The line2 lies to one side of an
// infinite line passin... | [
"static",
"boolean",
"_isIntersectingHelper",
"(",
"Line",
"line1",
",",
"Line",
"line2",
")",
"{",
"int",
"s11",
"=",
"line1",
".",
"_side",
"(",
"line2",
".",
"m_xStart",
",",
"line2",
".",
"m_yStart",
")",
";",
"int",
"s12",
"=",
"line1",
".",
"_sid... | Tests if two lines intersect using projection of one line to another. | [
"Tests",
"if",
"two",
"lines",
"intersect",
"using",
"projection",
"of",
"one",
"line",
"to",
"another",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Line.java#L600-L620 |
111,943 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.geometryToJson | public static String geometryToJson(int wkid, Geometry geometry) {
return GeometryEngine.geometryToJson(
wkid > 0 ? SpatialReference.create(wkid) : null, geometry);
} | java | public static String geometryToJson(int wkid, Geometry geometry) {
return GeometryEngine.geometryToJson(
wkid > 0 ? SpatialReference.create(wkid) : null, geometry);
} | [
"public",
"static",
"String",
"geometryToJson",
"(",
"int",
"wkid",
",",
"Geometry",
"geometry",
")",
"{",
"return",
"GeometryEngine",
".",
"geometryToJson",
"(",
"wkid",
">",
"0",
"?",
"SpatialReference",
".",
"create",
"(",
"wkid",
")",
":",
"null",
",",
... | Exports the specified geometry instance to it's JSON representation.
See OperatorExportToJson.
@see GeometryEngine#geometryToJson(SpatialReference spatialiReference,
Geometry geometry)
@param wkid
The spatial reference Well Known ID to be used for the JSON
representation.
@param geometry
The geometry to be exported t... | [
"Exports",
"the",
"specified",
"geometry",
"instance",
"to",
"it",
"s",
"JSON",
"representation",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L111-L114 |
111,944 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.geometryToJson | public static String geometryToJson(SpatialReference spatialReference,
Geometry geometry) {
OperatorExportToJson exporter = (OperatorExportToJson) factory
.getOperator(Operator.Type.ExportToJson);
return exporter.execute(spatialReference, geometry);
} | java | public static String geometryToJson(SpatialReference spatialReference,
Geometry geometry) {
OperatorExportToJson exporter = (OperatorExportToJson) factory
.getOperator(Operator.Type.ExportToJson);
return exporter.execute(spatialReference, geometry);
} | [
"public",
"static",
"String",
"geometryToJson",
"(",
"SpatialReference",
"spatialReference",
",",
"Geometry",
"geometry",
")",
"{",
"OperatorExportToJson",
"exporter",
"=",
"(",
"OperatorExportToJson",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
".",
"Type",
... | Exports the specified geometry instance to it's JSON representation. M
and Z values are not imported from JSON representation.
See OperatorExportToJson.
@param spatialReference
The spatial reference of associated object.
@param geometry
The geometry.
@return The JSON representation of the specified geometry. | [
"Exports",
"the",
"specified",
"geometry",
"instance",
"to",
"it",
"s",
"JSON",
"representation",
".",
"M",
"and",
"Z",
"values",
"are",
"not",
"imported",
"from",
"JSON",
"representation",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L128-L134 |
111,945 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.geometryFromEsriShape | public static Geometry geometryFromEsriShape(byte[] esriShapeBuffer,
Geometry.Type geometryType) {
OperatorImportFromESRIShape op = (OperatorImportFromESRIShape) factory
.getOperator(Operator.Type.ImportFromESRIShape);
return op
.execute(
ShapeImportFlags.ShapeImportNonTrusted,
geometryType,
... | java | public static Geometry geometryFromEsriShape(byte[] esriShapeBuffer,
Geometry.Type geometryType) {
OperatorImportFromESRIShape op = (OperatorImportFromESRIShape) factory
.getOperator(Operator.Type.ImportFromESRIShape);
return op
.execute(
ShapeImportFlags.ShapeImportNonTrusted,
geometryType,
... | [
"public",
"static",
"Geometry",
"geometryFromEsriShape",
"(",
"byte",
"[",
"]",
"esriShapeBuffer",
",",
"Geometry",
".",
"Type",
"geometryType",
")",
"{",
"OperatorImportFromESRIShape",
"op",
"=",
"(",
"OperatorImportFromESRIShape",
")",
"factory",
".",
"getOperator",... | Imports geometry from the ESRI shape file format.
See OperatorImportFromESRIShape.
@param esriShapeBuffer
The buffer containing geometry in the ESRI shape file format.
@param geometryType
The required type of the Geometry to be imported. Use
Geometry.Type.Unknown if the geometry type needs to be
determined from the b... | [
"Imports",
"geometry",
"from",
"the",
"ESRI",
"shape",
"file",
"format",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L214-L224 |
111,946 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.geometryToEsriShape | public static byte[] geometryToEsriShape(Geometry geometry) {
if (geometry == null)
throw new IllegalArgumentException();
OperatorExportToESRIShape op = (OperatorExportToESRIShape) factory
.getOperator(Operator.Type.ExportToESRIShape);
return op.execute(0, geometry).array();
} | java | public static byte[] geometryToEsriShape(Geometry geometry) {
if (geometry == null)
throw new IllegalArgumentException();
OperatorExportToESRIShape op = (OperatorExportToESRIShape) factory
.getOperator(Operator.Type.ExportToESRIShape);
return op.execute(0, geometry).array();
} | [
"public",
"static",
"byte",
"[",
"]",
"geometryToEsriShape",
"(",
"Geometry",
"geometry",
")",
"{",
"if",
"(",
"geometry",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"OperatorExportToESRIShape",
"op",
"=",
"(",
"OperatorExportT... | Exports geometry to the ESRI shape file format.
See OperatorExportToESRIShape.
@param geometry
The geometry to export. (null value is not allowed)
@return Array containing the exported ESRI shape file. | [
"Exports",
"geometry",
"to",
"the",
"ESRI",
"shape",
"file",
"format",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L235-L241 |
111,947 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.geometryFromWkt | public static Geometry geometryFromWkt(String wkt, int importFlags,
Geometry.Type geometryType) {
OperatorImportFromWkt op = (OperatorImportFromWkt) factory
.getOperator(Operator.Type.ImportFromWkt);
return op.execute(importFlags, geometryType, wkt, null);
} | java | public static Geometry geometryFromWkt(String wkt, int importFlags,
Geometry.Type geometryType) {
OperatorImportFromWkt op = (OperatorImportFromWkt) factory
.getOperator(Operator.Type.ImportFromWkt);
return op.execute(importFlags, geometryType, wkt, null);
} | [
"public",
"static",
"Geometry",
"geometryFromWkt",
"(",
"String",
"wkt",
",",
"int",
"importFlags",
",",
"Geometry",
".",
"Type",
"geometryType",
")",
"{",
"OperatorImportFromWkt",
"op",
"=",
"(",
"OperatorImportFromWkt",
")",
"factory",
".",
"getOperator",
"(",
... | Imports a geometry from a WKT string.
See OperatorImportFromWkt.
@param wkt The string containing the geometry in WKT format.
@param importFlags Use the {@link WktImportFlags} interface.
@param geometryType The required type of the Geometry to be imported. Use Geometry.Type.Unknown if the geometry type needs to be de... | [
"Imports",
"a",
"geometry",
"from",
"a",
"WKT",
"string",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L255-L260 |
111,948 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.geometryToWkt | public static String geometryToWkt(Geometry geometry, int exportFlags) {
OperatorExportToWkt op = (OperatorExportToWkt) factory
.getOperator(Operator.Type.ExportToWkt);
return op.execute(exportFlags, geometry, null);
} | java | public static String geometryToWkt(Geometry geometry, int exportFlags) {
OperatorExportToWkt op = (OperatorExportToWkt) factory
.getOperator(Operator.Type.ExportToWkt);
return op.execute(exportFlags, geometry, null);
} | [
"public",
"static",
"String",
"geometryToWkt",
"(",
"Geometry",
"geometry",
",",
"int",
"exportFlags",
")",
"{",
"OperatorExportToWkt",
"op",
"=",
"(",
"OperatorExportToWkt",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
".",
"Type",
".",
"ExportToWkt",
"... | Exports a geometry to a string in WKT format.
See OperatorExportToWkt.
@param geometry The geometry to export. (null value is not allowed)
@param exportFlags Use the {@link WktExportFlags} interface.
@return A String containing the exported geometry in WKT format. | [
"Exports",
"a",
"geometry",
"to",
"a",
"string",
"in",
"WKT",
"format",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L271-L275 |
111,949 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.union | public static Geometry union(Geometry[] geometries,
SpatialReference spatialReference) {
OperatorUnion op = (OperatorUnion) factory
.getOperator(Operator.Type.Union);
SimpleGeometryCursor inputGeometries = new SimpleGeometryCursor(
geometries);
GeometryCursor result = op.execute(inputGeometries, spati... | java | public static Geometry union(Geometry[] geometries,
SpatialReference spatialReference) {
OperatorUnion op = (OperatorUnion) factory
.getOperator(Operator.Type.Union);
SimpleGeometryCursor inputGeometries = new SimpleGeometryCursor(
geometries);
GeometryCursor result = op.execute(inputGeometries, spati... | [
"public",
"static",
"Geometry",
"union",
"(",
"Geometry",
"[",
"]",
"geometries",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorUnion",
"op",
"=",
"(",
"OperatorUnion",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
".",
"Type",
".",
"U... | Constructs a new geometry by union an array of geometries. All inputs
must be of the same type of geometries and share one spatial reference.
See OperatorUnion.
@param geometries
The geometries to union.
@param spatialReference
The spatial reference of the geometries.
@return The geometry object representing the resu... | [
"Constructs",
"a",
"new",
"geometry",
"by",
"union",
"an",
"array",
"of",
"geometries",
".",
"All",
"inputs",
"must",
"be",
"of",
"the",
"same",
"type",
"of",
"geometries",
"and",
"share",
"one",
"spatial",
"reference",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L289-L299 |
111,950 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.difference | public static Geometry difference(Geometry geometry1, Geometry substractor,
SpatialReference spatialReference) {
OperatorDifference op = (OperatorDifference) factory
.getOperator(Operator.Type.Difference);
Geometry result = op.execute(geometry1, substractor, spatialReference,
null);
return result;
} | java | public static Geometry difference(Geometry geometry1, Geometry substractor,
SpatialReference spatialReference) {
OperatorDifference op = (OperatorDifference) factory
.getOperator(Operator.Type.Difference);
Geometry result = op.execute(geometry1, substractor, spatialReference,
null);
return result;
} | [
"public",
"static",
"Geometry",
"difference",
"(",
"Geometry",
"geometry1",
",",
"Geometry",
"substractor",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorDifference",
"op",
"=",
"(",
"OperatorDifference",
")",
"factory",
".",
"getOperator",
"(",
"O... | Creates the difference of two geometries. The dimension of geometry2 has
to be equal to or greater than that of geometry1.
See OperatorDifference.
@param geometry1
The geometry being subtracted.
@param substractor
The geometry object to subtract from.
@param spatialReference
The spatial reference of the geometries.
@... | [
"Creates",
"the",
"difference",
"of",
"two",
"geometries",
".",
"The",
"dimension",
"of",
"geometry2",
"has",
"to",
"be",
"equal",
"to",
"or",
"greater",
"than",
"that",
"of",
"geometry1",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L315-L322 |
111,951 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.symmetricDifference | public static Geometry symmetricDifference(Geometry leftGeometry,
Geometry rightGeometry, SpatialReference spatialReference) {
OperatorSymmetricDifference op = (OperatorSymmetricDifference) factory
.getOperator(Operator.Type.SymmetricDifference);
Geometry result = op.execute(leftGeometry, rightGeometry,
... | java | public static Geometry symmetricDifference(Geometry leftGeometry,
Geometry rightGeometry, SpatialReference spatialReference) {
OperatorSymmetricDifference op = (OperatorSymmetricDifference) factory
.getOperator(Operator.Type.SymmetricDifference);
Geometry result = op.execute(leftGeometry, rightGeometry,
... | [
"public",
"static",
"Geometry",
"symmetricDifference",
"(",
"Geometry",
"leftGeometry",
",",
"Geometry",
"rightGeometry",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorSymmetricDifference",
"op",
"=",
"(",
"OperatorSymmetricDifference",
")",
"factory",
"... | Creates the symmetric difference of two geometries.
See OperatorSymmetricDifference.
@param leftGeometry
is one of the Geometry instances in the XOR operation.
@param rightGeometry
is one of the Geometry instances in the XOR operation.
@param spatialReference
The spatial reference of the geometries.
@return Returns t... | [
"Creates",
"the",
"symmetric",
"difference",
"of",
"two",
"geometries",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L337-L344 |
111,952 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.disjoint | public static boolean disjoint(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorDisjoint op = (OperatorDisjoint) factory
.getOperator(Operator.Type.Disjoint);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | java | public static boolean disjoint(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorDisjoint op = (OperatorDisjoint) factory
.getOperator(Operator.Type.Disjoint);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | [
"public",
"static",
"boolean",
"disjoint",
"(",
"Geometry",
"geometry1",
",",
"Geometry",
"geometry2",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorDisjoint",
"op",
"=",
"(",
"OperatorDisjoint",
")",
"factory",
".",
"getOperator",
"(",
"Operator",... | See OperatorDisjoint. | [
"See",
"OperatorDisjoint",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L372-L379 |
111,953 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.intersect | static Geometry[] intersect(Geometry[] inputGeometries, Geometry geometry,
SpatialReference spatialReference) {
OperatorIntersection op = (OperatorIntersection) factory
.getOperator(Operator.Type.Intersection);
SimpleGeometryCursor inputGeometriesCursor = new SimpleGeometryCursor(
inputGeometries);
Sim... | java | static Geometry[] intersect(Geometry[] inputGeometries, Geometry geometry,
SpatialReference spatialReference) {
OperatorIntersection op = (OperatorIntersection) factory
.getOperator(Operator.Type.Intersection);
SimpleGeometryCursor inputGeometriesCursor = new SimpleGeometryCursor(
inputGeometries);
Sim... | [
"static",
"Geometry",
"[",
"]",
"intersect",
"(",
"Geometry",
"[",
"]",
"inputGeometries",
",",
"Geometry",
"geometry",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorIntersection",
"op",
"=",
"(",
"OperatorIntersection",
")",
"factory",
".",
"get... | Constructs the set-theoretic intersection between an array of geometries
and another geometry.
See OperatorIntersection (also for dimension specific intersection).
@param inputGeometries
An array of geometry objects.
@param geometry
The geometry object.
@return Any array of geometry objects showing the intersection. | [
"Constructs",
"the",
"set",
"-",
"theoretic",
"intersection",
"between",
"an",
"array",
"of",
"geometries",
"and",
"another",
"geometry",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L393-L412 |
111,954 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.intersect | public static Geometry intersect(Geometry geometry1, Geometry intersector,
SpatialReference spatialReference) {
OperatorIntersection op = (OperatorIntersection) factory
.getOperator(Operator.Type.Intersection);
Geometry result = op.execute(geometry1, intersector, spatialReference,
null);
return result;... | java | public static Geometry intersect(Geometry geometry1, Geometry intersector,
SpatialReference spatialReference) {
OperatorIntersection op = (OperatorIntersection) factory
.getOperator(Operator.Type.Intersection);
Geometry result = op.execute(geometry1, intersector, spatialReference,
null);
return result;... | [
"public",
"static",
"Geometry",
"intersect",
"(",
"Geometry",
"geometry1",
",",
"Geometry",
"intersector",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorIntersection",
"op",
"=",
"(",
"OperatorIntersection",
")",
"factory",
".",
"getOperator",
"(",
... | Creates a geometry through intersection between two geometries.
See OperatorIntersection.
@param geometry1
The first geometry.
@param intersector
The geometry to intersect the first geometry.
@param spatialReference
The spatial reference of the geometries.
@return The geometry created through intersection. | [
"Creates",
"a",
"geometry",
"through",
"intersection",
"between",
"two",
"geometries",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L427-L434 |
111,955 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.within | public static boolean within(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorWithin op = (OperatorWithin) factory
.getOperator(Operator.Type.Within);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | java | public static boolean within(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorWithin op = (OperatorWithin) factory
.getOperator(Operator.Type.Within);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | [
"public",
"static",
"boolean",
"within",
"(",
"Geometry",
"geometry1",
",",
"Geometry",
"geometry2",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorWithin",
"op",
"=",
"(",
"OperatorWithin",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
"."... | Indicates if one geometry is within another geometry.
See OperatorWithin.
@param geometry1
The base geometry that is tested for within relationship to
the other geometry.
@param geometry2
The comparison geometry that is tested for the contains
relationship to the other geometry.
@param spatialReference
The spatial re... | [
"Indicates",
"if",
"one",
"geometry",
"is",
"within",
"another",
"geometry",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L451-L458 |
111,956 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.contains | public static boolean contains(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorContains op = (OperatorContains) factory
.getOperator(Operator.Type.Contains);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | java | public static boolean contains(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorContains op = (OperatorContains) factory
.getOperator(Operator.Type.Contains);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | [
"public",
"static",
"boolean",
"contains",
"(",
"Geometry",
"geometry1",
",",
"Geometry",
"geometry2",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorContains",
"op",
"=",
"(",
"OperatorContains",
")",
"factory",
".",
"getOperator",
"(",
"Operator",... | Indicates if one geometry contains another geometry.
See OperatorContains.
@param geometry1
The geometry that is tested for the contains relationship to
the other geometry..
@param geometry2
The geometry that is tested for within relationship to the
other geometry.
@param spatialReference
The spatial reference of the... | [
"Indicates",
"if",
"one",
"geometry",
"contains",
"another",
"geometry",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L475-L482 |
111,957 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.crosses | public static boolean crosses(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorCrosses op = (OperatorCrosses) factory
.getOperator(Operator.Type.Crosses);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | java | public static boolean crosses(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorCrosses op = (OperatorCrosses) factory
.getOperator(Operator.Type.Crosses);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | [
"public",
"static",
"boolean",
"crosses",
"(",
"Geometry",
"geometry1",
",",
"Geometry",
"geometry2",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorCrosses",
"op",
"=",
"(",
"OperatorCrosses",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
... | Indicates if one geometry crosses another geometry.
See OperatorCrosses.
@param geometry1
The geometry to cross.
@param geometry2
The geometry being crossed.
@param spatialReference
The spatial reference of the geometries.
@return TRUE if geometry1 crosses geometry2. | [
"Indicates",
"if",
"one",
"geometry",
"crosses",
"another",
"geometry",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L497-L504 |
111,958 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.touches | public static boolean touches(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorTouches op = (OperatorTouches) factory
.getOperator(Operator.Type.Touches);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | java | public static boolean touches(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorTouches op = (OperatorTouches) factory
.getOperator(Operator.Type.Touches);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | [
"public",
"static",
"boolean",
"touches",
"(",
"Geometry",
"geometry1",
",",
"Geometry",
"geometry2",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorTouches",
"op",
"=",
"(",
"OperatorTouches",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
... | Indicates if one geometry touches another geometry.
See OperatorTouches.
@param geometry1
The geometry to touch.
@param geometry2
The geometry to be touched.
@param spatialReference
The spatial reference of the geometries.
@return TRUE if geometry1 touches geometry2. | [
"Indicates",
"if",
"one",
"geometry",
"touches",
"another",
"geometry",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L519-L526 |
111,959 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.overlaps | public static boolean overlaps(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorOverlaps op = (OperatorOverlaps) factory
.getOperator(Operator.Type.Overlaps);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | java | public static boolean overlaps(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorOverlaps op = (OperatorOverlaps) factory
.getOperator(Operator.Type.Overlaps);
boolean result = op.execute(geometry1, geometry2, spatialReference,
null);
return result;
} | [
"public",
"static",
"boolean",
"overlaps",
"(",
"Geometry",
"geometry1",
",",
"Geometry",
"geometry2",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorOverlaps",
"op",
"=",
"(",
"OperatorOverlaps",
")",
"factory",
".",
"getOperator",
"(",
"Operator",... | Indicates if one geometry overlaps another geometry.
See OperatorOverlaps.
@param geometry1
The geometry to overlap.
@param geometry2
The geometry to be overlapped.
@param spatialReference
The spatial reference of the geometries.
@return TRUE if geometry1 overlaps geometry2. | [
"Indicates",
"if",
"one",
"geometry",
"overlaps",
"another",
"geometry",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L541-L548 |
111,960 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.relate | public static boolean relate(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference, String relation) {
OperatorRelate op = (OperatorRelate) factory
.getOperator(Operator.Type.Relate);
boolean result = op.execute(geometry1, geometry2, spatialReference,
relation, null);
return result;... | java | public static boolean relate(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference, String relation) {
OperatorRelate op = (OperatorRelate) factory
.getOperator(Operator.Type.Relate);
boolean result = op.execute(geometry1, geometry2, spatialReference,
relation, null);
return result;... | [
"public",
"static",
"boolean",
"relate",
"(",
"Geometry",
"geometry1",
",",
"Geometry",
"geometry2",
",",
"SpatialReference",
"spatialReference",
",",
"String",
"relation",
")",
"{",
"OperatorRelate",
"op",
"=",
"(",
"OperatorRelate",
")",
"factory",
".",
"getOper... | Indicates if the given relation holds for the two geometries.
See OperatorRelate.
@param geometry1
The first geometry for the relation.
@param geometry2
The second geometry for the relation.
@param spatialReference
The spatial reference of the geometries.
@param relation
The DE-9IM relation.
@return TRUE if the given... | [
"Indicates",
"if",
"the",
"given",
"relation",
"holds",
"for",
"the",
"two",
"geometries",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L565-L572 |
111,961 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.distance | public static double distance(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorDistance op = (OperatorDistance) factory
.getOperator(Operator.Type.Distance);
double result = op.execute(geometry1, geometry2, null);
return result;
} | java | public static double distance(Geometry geometry1, Geometry geometry2,
SpatialReference spatialReference) {
OperatorDistance op = (OperatorDistance) factory
.getOperator(Operator.Type.Distance);
double result = op.execute(geometry1, geometry2, null);
return result;
} | [
"public",
"static",
"double",
"distance",
"(",
"Geometry",
"geometry1",
",",
"Geometry",
"geometry2",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorDistance",
"op",
"=",
"(",
"OperatorDistance",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
... | Calculates the 2D planar distance between two geometries.
See OperatorDistance.
@param geometry1
Geometry.
@param geometry2
Geometry.
@param spatialReference
The spatial reference of the geometries. This parameter is not
used and can be null.
@return The distance between the two geometries. | [
"Calculates",
"the",
"2D",
"planar",
"distance",
"between",
"two",
"geometries",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L588-L594 |
111,962 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.clip | public static Geometry clip(Geometry geometry, Envelope envelope,
SpatialReference spatialReference) {
OperatorClip op = (OperatorClip) factory
.getOperator(Operator.Type.Clip);
Geometry result = op.execute(geometry, Envelope2D.construct(
envelope.getXMin(), envelope.getYMin(), envelope.getXMax(),
en... | java | public static Geometry clip(Geometry geometry, Envelope envelope,
SpatialReference spatialReference) {
OperatorClip op = (OperatorClip) factory
.getOperator(Operator.Type.Clip);
Geometry result = op.execute(geometry, Envelope2D.construct(
envelope.getXMin(), envelope.getYMin(), envelope.getXMax(),
en... | [
"public",
"static",
"Geometry",
"clip",
"(",
"Geometry",
"geometry",
",",
"Envelope",
"envelope",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorClip",
"op",
"=",
"(",
"OperatorClip",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
".",
"Ty... | Calculates the clipped geometry from a target geometry using an envelope.
See OperatorClip.
@param geometry
The geometry to be clipped.
@param envelope
The envelope used to clip.
@param spatialReference
The spatial reference of the geometries.
@return The geometry created by clipping. | [
"Calculates",
"the",
"clipped",
"geometry",
"from",
"a",
"target",
"geometry",
"using",
"an",
"envelope",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L609-L617 |
111,963 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.cut | public static Geometry[] cut(Geometry cuttee, Polyline cutter,
SpatialReference spatialReference) {
if (cuttee == null || cutter == null)
return null;
OperatorCut op = (OperatorCut) factory.getOperator(Operator.Type.Cut);
GeometryCursor cursor = op.execute(true, cuttee, cutter,
spatialReference, null);... | java | public static Geometry[] cut(Geometry cuttee, Polyline cutter,
SpatialReference spatialReference) {
if (cuttee == null || cutter == null)
return null;
OperatorCut op = (OperatorCut) factory.getOperator(Operator.Type.Cut);
GeometryCursor cursor = op.execute(true, cuttee, cutter,
spatialReference, null);... | [
"public",
"static",
"Geometry",
"[",
"]",
"cut",
"(",
"Geometry",
"cuttee",
",",
"Polyline",
"cutter",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"if",
"(",
"cuttee",
"==",
"null",
"||",
"cutter",
"==",
"null",
")",
"return",
"null",
";",
"Oper... | Calculates the cut geometry from a target geometry using a polyline. For
Polylines, all left cuts will be grouped together in the first Geometry,
Right cuts and coincident cuts are grouped in the second Geometry, and
each undefined cut, along with any uncut parts, are output as separate
Polylines. For Polygons, all lef... | [
"Calculates",
"the",
"cut",
"geometry",
"from",
"a",
"target",
"geometry",
"using",
"a",
"polyline",
".",
"For",
"Polylines",
"all",
"left",
"cuts",
"will",
"be",
"grouped",
"together",
"in",
"the",
"first",
"Geometry",
"Right",
"cuts",
"and",
"coincident",
... | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L642-L660 |
111,964 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.buffer | public static Polygon[] buffer(Geometry[] geometries,
SpatialReference spatialReference, double[] distances,
boolean toUnionResults) {
// initially assume distances are in unit of spatial reference
double[] bufferDistances = distances;
OperatorBuffer op = (OperatorBuffer) factory
.getOperator(Operator.... | java | public static Polygon[] buffer(Geometry[] geometries,
SpatialReference spatialReference, double[] distances,
boolean toUnionResults) {
// initially assume distances are in unit of spatial reference
double[] bufferDistances = distances;
OperatorBuffer op = (OperatorBuffer) factory
.getOperator(Operator.... | [
"public",
"static",
"Polygon",
"[",
"]",
"buffer",
"(",
"Geometry",
"[",
"]",
"geometries",
",",
"SpatialReference",
"spatialReference",
",",
"double",
"[",
"]",
"distances",
",",
"boolean",
"toUnionResults",
")",
"{",
"// initially assume distances are in unit of spa... | Calculates a buffer polygon for each geometry at each of the
corresponding specified distances. It is assumed that all geometries have
the same spatial reference. There is an option to union the
returned geometries.
See OperatorBuffer.
@param geometries An array of geometries to be buffered.
@param spatialReference ... | [
"Calculates",
"a",
"buffer",
"polygon",
"for",
"each",
"geometry",
"at",
"each",
"of",
"the",
"corresponding",
"specified",
"distances",
".",
"It",
"is",
"assumed",
"that",
"all",
"geometries",
"have",
"the",
"same",
"spatial",
"reference",
".",
"There",
"is",... | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L675-L705 |
111,965 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.buffer | public static Polygon buffer(Geometry geometry,
SpatialReference spatialReference, double distance) {
double bufferDistance = distance;
OperatorBuffer op = (OperatorBuffer) factory
.getOperator(Operator.Type.Buffer);
Geometry result = op.execute(geometry, spatialReference,
bufferDistance, null);
ret... | java | public static Polygon buffer(Geometry geometry,
SpatialReference spatialReference, double distance) {
double bufferDistance = distance;
OperatorBuffer op = (OperatorBuffer) factory
.getOperator(Operator.Type.Buffer);
Geometry result = op.execute(geometry, spatialReference,
bufferDistance, null);
ret... | [
"public",
"static",
"Polygon",
"buffer",
"(",
"Geometry",
"geometry",
",",
"SpatialReference",
"spatialReference",
",",
"double",
"distance",
")",
"{",
"double",
"bufferDistance",
"=",
"distance",
";",
"OperatorBuffer",
"op",
"=",
"(",
"OperatorBuffer",
")",
"fact... | Calculates a buffer polygon of the geometry as specified by the
distance input. The buffer is implemented in the xy-plane.
See OperatorBuffer
@param geometry Geometry to be buffered.
@param spatialReference The spatial reference of the geometry.
@param distance The specified distance for buffer. Same units as the spa... | [
"Calculates",
"a",
"buffer",
"polygon",
"of",
"the",
"geometry",
"as",
"specified",
"by",
"the",
"distance",
"input",
".",
"The",
"buffer",
"is",
"implemented",
"in",
"the",
"xy",
"-",
"plane",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L718-L727 |
111,966 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.convexHull | public static Geometry convexHull(Geometry geometry) {
OperatorConvexHull op = (OperatorConvexHull) factory
.getOperator(Operator.Type.ConvexHull);
return op.execute(geometry, null);
} | java | public static Geometry convexHull(Geometry geometry) {
OperatorConvexHull op = (OperatorConvexHull) factory
.getOperator(Operator.Type.ConvexHull);
return op.execute(geometry, null);
} | [
"public",
"static",
"Geometry",
"convexHull",
"(",
"Geometry",
"geometry",
")",
"{",
"OperatorConvexHull",
"op",
"=",
"(",
"OperatorConvexHull",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
".",
"Type",
".",
"ConvexHull",
")",
";",
"return",
"op",
".",... | Calculates the convex hull geometry.
See OperatorConvexHull.
@param geometry The input geometry.
@return Returns the convex hull.
For a Point - returns the same point. For an Envelope -
returns the same envelope. For a MultiPoint - If the point
count is one, returns the same multipoint. If the point count
is two, re... | [
"Calculates",
"the",
"convex",
"hull",
"geometry",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L749-L753 |
111,967 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.convexHull | public static Geometry[] convexHull(Geometry[] geometries, boolean b_merge) {
OperatorConvexHull op = (OperatorConvexHull) factory
.getOperator(Operator.Type.ConvexHull);
SimpleGeometryCursor simple_cursor = new SimpleGeometryCursor(
geometries);
GeometryCursor cursor = op.execute(simple_cursor, b_merge, ... | java | public static Geometry[] convexHull(Geometry[] geometries, boolean b_merge) {
OperatorConvexHull op = (OperatorConvexHull) factory
.getOperator(Operator.Type.ConvexHull);
SimpleGeometryCursor simple_cursor = new SimpleGeometryCursor(
geometries);
GeometryCursor cursor = op.execute(simple_cursor, b_merge, ... | [
"public",
"static",
"Geometry",
"[",
"]",
"convexHull",
"(",
"Geometry",
"[",
"]",
"geometries",
",",
"boolean",
"b_merge",
")",
"{",
"OperatorConvexHull",
"op",
"=",
"(",
"OperatorConvexHull",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
".",
"Type",
... | Calculates the convex hull.
See OperatorConvexHull
@param geometries
The input geometry array.
@param b_merge
Put true if you want the convex hull of all the geometries in
the array combined. Put false if you want the convex hull of
each geometry in the array individually.
@return Returns an array of convex hulls. If... | [
"Calculates",
"the",
"convex",
"hull",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L769-L788 |
111,968 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.getNearestCoordinate | public static Proximity2DResult getNearestCoordinate(Geometry geometry,
Point inputPoint, boolean bTestPolygonInterior) {
OperatorProximity2D proximity = (OperatorProximity2D) factory
.getOperator(com.esri.core.geometry.Operator.Type.Proximity2D);
Proximity2DResult result = proximity.getNearestCoordinate(ge... | java | public static Proximity2DResult getNearestCoordinate(Geometry geometry,
Point inputPoint, boolean bTestPolygonInterior) {
OperatorProximity2D proximity = (OperatorProximity2D) factory
.getOperator(com.esri.core.geometry.Operator.Type.Proximity2D);
Proximity2DResult result = proximity.getNearestCoordinate(ge... | [
"public",
"static",
"Proximity2DResult",
"getNearestCoordinate",
"(",
"Geometry",
"geometry",
",",
"Point",
"inputPoint",
",",
"boolean",
"bTestPolygonInterior",
")",
"{",
"OperatorProximity2D",
"proximity",
"=",
"(",
"OperatorProximity2D",
")",
"factory",
".",
"getOper... | Finds the coordinate of the geometry which is closest to the specified
point.
See OperatorProximity2D.
@param inputPoint
The point to find the nearest coordinate in the geometry for.
@param geometry
The geometry to consider.
@return Proximity2DResult containing the nearest coordinate. | [
"Finds",
"the",
"coordinate",
"of",
"the",
"geometry",
"which",
"is",
"closest",
"to",
"the",
"specified",
"point",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L802-L810 |
111,969 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.getNearestVertices | public static Proximity2DResult[] getNearestVertices(Geometry geometry,
Point inputPoint, double searchRadius, int maxVertexCountToReturn) {
OperatorProximity2D proximity = (OperatorProximity2D) factory
.getOperator(com.esri.core.geometry.Operator.Type.Proximity2D);
Proximity2DResult[] results = proximity.g... | java | public static Proximity2DResult[] getNearestVertices(Geometry geometry,
Point inputPoint, double searchRadius, int maxVertexCountToReturn) {
OperatorProximity2D proximity = (OperatorProximity2D) factory
.getOperator(com.esri.core.geometry.Operator.Type.Proximity2D);
Proximity2DResult[] results = proximity.g... | [
"public",
"static",
"Proximity2DResult",
"[",
"]",
"getNearestVertices",
"(",
"Geometry",
"geometry",
",",
"Point",
"inputPoint",
",",
"double",
"searchRadius",
",",
"int",
"maxVertexCountToReturn",
")",
"{",
"OperatorProximity2D",
"proximity",
"=",
"(",
"OperatorProx... | Finds all vertices in the given distance from the specified point, sorted
from the closest to the furthest.
See OperatorProximity2D.
@param inputPoint
The point to start from.
@param geometry
The geometry to consider.
@param searchRadius
The search radius.
@param maxVertexCountToReturn
The maximum number number of ve... | [
"Finds",
"all",
"vertices",
"in",
"the",
"given",
"distance",
"from",
"the",
"specified",
"point",
"sorted",
"from",
"the",
"closest",
"to",
"the",
"furthest",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L849-L858 |
111,970 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.simplify | public static Geometry simplify(Geometry geometry,
SpatialReference spatialReference) {
OperatorSimplify op = (OperatorSimplify) factory
.getOperator(Operator.Type.Simplify);
Geometry result = op.execute(geometry, spatialReference, false, null);
return result;
} | java | public static Geometry simplify(Geometry geometry,
SpatialReference spatialReference) {
OperatorSimplify op = (OperatorSimplify) factory
.getOperator(Operator.Type.Simplify);
Geometry result = op.execute(geometry, spatialReference, false, null);
return result;
} | [
"public",
"static",
"Geometry",
"simplify",
"(",
"Geometry",
"geometry",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorSimplify",
"op",
"=",
"(",
"OperatorSimplify",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
".",
"Type",
".",
"Simplify... | Performs the simplify operation on the geometry.
See OperatorSimplify and See OperatorSimplifyOGC.
@param geometry
The geometry to be simplified.
@param spatialReference
The spatial reference of the geometry to be simplified.
@return The simplified geometry. | [
"Performs",
"the",
"simplify",
"operation",
"on",
"the",
"geometry",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L871-L877 |
111,971 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/GeometryEngine.java | GeometryEngine.isSimple | static boolean isSimple(Geometry geometry, SpatialReference spatialReference) {
OperatorSimplify op = (OperatorSimplify) factory
.getOperator(Operator.Type.Simplify);
boolean result = op.isSimpleAsFeature(geometry, spatialReference, null);
return result;
} | java | static boolean isSimple(Geometry geometry, SpatialReference spatialReference) {
OperatorSimplify op = (OperatorSimplify) factory
.getOperator(Operator.Type.Simplify);
boolean result = op.isSimpleAsFeature(geometry, spatialReference, null);
return result;
} | [
"static",
"boolean",
"isSimple",
"(",
"Geometry",
"geometry",
",",
"SpatialReference",
"spatialReference",
")",
"{",
"OperatorSimplify",
"op",
"=",
"(",
"OperatorSimplify",
")",
"factory",
".",
"getOperator",
"(",
"Operator",
".",
"Type",
".",
"Simplify",
")",
"... | Checks if the Geometry is simple.
See OperatorSimplify.
@param geometry
The geometry to be checked.
@param spatialReference
The spatial reference of the geometry.
@return TRUE if the geometry is simple. | [
"Checks",
"if",
"the",
"Geometry",
"is",
"simple",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L890-L895 |
111,972 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/Proximity2DResult.java | Proximity2DResult.setRightSide | public void setRightSide(boolean bRight) {
if (bRight)
m_info |= (int) OperatorProximity2D.ProxResultInfo.rightSide;
else
m_info &= ~(int) OperatorProximity2D.ProxResultInfo.rightSide;
} | java | public void setRightSide(boolean bRight) {
if (bRight)
m_info |= (int) OperatorProximity2D.ProxResultInfo.rightSide;
else
m_info &= ~(int) OperatorProximity2D.ProxResultInfo.rightSide;
} | [
"public",
"void",
"setRightSide",
"(",
"boolean",
"bRight",
")",
"{",
"if",
"(",
"bRight",
")",
"m_info",
"|=",
"(",
"int",
")",
"OperatorProximity2D",
".",
"ProxResultInfo",
".",
"rightSide",
";",
"else",
"m_info",
"&=",
"~",
"(",
"int",
")",
"OperatorPro... | Sets the right_side info to true or false.
@param bRight
Whether the nearest coordinate is to the right or left of the
geometry. | [
"Sets",
"the",
"right_side",
"info",
"to",
"true",
"or",
"false",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Proximity2DResult.java#L44-L49 |
111,973 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/SegmentIteratorImpl.java | SegmentIteratorImpl.nextSegment | public Segment nextSegment() {
if (m_currentSegmentIndex != m_nextSegmentIndex)
_updateSegment();
if (m_bCirculator) {
m_nextSegmentIndex = (m_nextSegmentIndex + 1) % m_segmentCount;
} else {
if (m_nextSegmentIndex == m_segmentCount)
throw new IndexOutOfBoundsException();
m_nextSegmentIndex++;
... | java | public Segment nextSegment() {
if (m_currentSegmentIndex != m_nextSegmentIndex)
_updateSegment();
if (m_bCirculator) {
m_nextSegmentIndex = (m_nextSegmentIndex + 1) % m_segmentCount;
} else {
if (m_nextSegmentIndex == m_segmentCount)
throw new IndexOutOfBoundsException();
m_nextSegmentIndex++;
... | [
"public",
"Segment",
"nextSegment",
"(",
")",
"{",
"if",
"(",
"m_currentSegmentIndex",
"!=",
"m_nextSegmentIndex",
")",
"_updateSegment",
"(",
")",
";",
"if",
"(",
"m_bCirculator",
")",
"{",
"m_nextSegmentIndex",
"=",
"(",
"m_nextSegmentIndex",
"+",
"1",
")",
... | Moves the iterator to next segment and returns the segment.
The Segment is returned by value and is owned by the iterator. | [
"Moves",
"the",
"iterator",
"to",
"next",
"segment",
"and",
"returns",
"the",
"segment",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/SegmentIteratorImpl.java#L148-L162 |
111,974 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/SegmentIteratorImpl.java | SegmentIteratorImpl.resetToPath | public void resetToPath(int pathIndex) {
if (pathIndex < 0)
throw new IndexOutOfBoundsException();
m_nextPathIndex = pathIndex;
m_currentPathIndex = -1;
m_currentSegmentIndex = -1;
m_nextSegmentIndex = -1;
m_segmentCount = -1;
m_pathBegin = -1;
} | java | public void resetToPath(int pathIndex) {
if (pathIndex < 0)
throw new IndexOutOfBoundsException();
m_nextPathIndex = pathIndex;
m_currentPathIndex = -1;
m_currentSegmentIndex = -1;
m_nextSegmentIndex = -1;
m_segmentCount = -1;
m_pathBegin = -1;
} | [
"public",
"void",
"resetToPath",
"(",
"int",
"pathIndex",
")",
"{",
"if",
"(",
"pathIndex",
"<",
"0",
")",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
")",
";",
"m_nextPathIndex",
"=",
"pathIndex",
";",
"m_currentPathIndex",
"=",
"-",
"1",
";",
"m_curr... | Resets the iterator such that the subsequent call to the NextPath will
set the iterator to the first segment of the given path. The call to
PreviousPath will reset the iterator to the last segment of path
pathIndex - 1. | [
"Resets",
"the",
"iterator",
"such",
"that",
"the",
"subsequent",
"call",
"to",
"the",
"NextPath",
"will",
"set",
"the",
"iterator",
"to",
"the",
"first",
"segment",
"of",
"the",
"given",
"path",
".",
"The",
"call",
"to",
"PreviousPath",
"will",
"reset",
"... | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/SegmentIteratorImpl.java#L310-L320 |
111,975 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/OperatorDistanceLocal.java | OperatorDistanceLocal.execute | @Override
public double execute(Geometry geom1, Geometry geom2,
ProgressTracker progressTracker) {
if (null == geom1 || null == geom2) {
throw new IllegalArgumentException();
}
Geometry geometryA = geom1;
Geometry geometryB = geom2;
if (geometryA.isEmpty() || geometryB.isEmpty())
return NumberUtil... | java | @Override
public double execute(Geometry geom1, Geometry geom2,
ProgressTracker progressTracker) {
if (null == geom1 || null == geom2) {
throw new IllegalArgumentException();
}
Geometry geometryA = geom1;
Geometry geometryB = geom2;
if (geometryA.isEmpty() || geometryB.isEmpty())
return NumberUtil... | [
"@",
"Override",
"public",
"double",
"execute",
"(",
"Geometry",
"geom1",
",",
"Geometry",
"geom2",
",",
"ProgressTracker",
"progressTracker",
")",
"{",
"if",
"(",
"null",
"==",
"geom1",
"||",
"null",
"==",
"geom2",
")",
"{",
"throw",
"new",
"IllegalArgument... | Performs the Distance operation on two geometries
@return Returns a double. | [
"Performs",
"the",
"Distance",
"operation",
"on",
"two",
"geometries"
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/OperatorDistanceLocal.java#L34-L99 |
111,976 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/NumberUtils.java | NumberUtils.hash | static int hash(int n) {
int hash = 5381;
hash = ((hash << 5) + hash) + (n & 0xFF); /* hash * 33 + c */
hash = ((hash << 5) + hash) + ((n >> 8) & 0xFF);
hash = ((hash << 5) + hash) + ((n >> 16) & 0xFF);
hash = ((hash << 5) + hash) + ((n >> 24) & 0xFF);
hash &= 0x7FFFFFFF;
return hash;
} | java | static int hash(int n) {
int hash = 5381;
hash = ((hash << 5) + hash) + (n & 0xFF); /* hash * 33 + c */
hash = ((hash << 5) + hash) + ((n >> 8) & 0xFF);
hash = ((hash << 5) + hash) + ((n >> 16) & 0xFF);
hash = ((hash << 5) + hash) + ((n >> 24) & 0xFF);
hash &= 0x7FFFFFFF;
return hash;
} | [
"static",
"int",
"hash",
"(",
"int",
"n",
")",
"{",
"int",
"hash",
"=",
"5381",
";",
"hash",
"=",
"(",
"(",
"hash",
"<<",
"5",
")",
"+",
"hash",
")",
"+",
"(",
"n",
"&",
"0xFF",
")",
";",
"/* hash * 33 + c */",
"hash",
"=",
"(",
"(",
"hash",
... | makes a hash out of an int | [
"makes",
"a",
"hash",
"out",
"of",
"an",
"int"
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/NumberUtils.java#L77-L85 |
111,977 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/NumberUtils.java | NumberUtils.hash | static int hash(int hashIn, int n) {
int hash = ((hashIn << 5) + hashIn) + (n & 0xFF); /* hash * 33 + c */
hash = ((hash << 5) + hash) + ((n >> 8) & 0xFF);
hash = ((hash << 5) + hash) + ((n >> 16) & 0xFF);
hash = ((hash << 5) + hash) + ((n >> 24) & 0xFF);
hash &= 0x7FFFFFFF;
return hash;
} | java | static int hash(int hashIn, int n) {
int hash = ((hashIn << 5) + hashIn) + (n & 0xFF); /* hash * 33 + c */
hash = ((hash << 5) + hash) + ((n >> 8) & 0xFF);
hash = ((hash << 5) + hash) + ((n >> 16) & 0xFF);
hash = ((hash << 5) + hash) + ((n >> 24) & 0xFF);
hash &= 0x7FFFFFFF;
return hash;
} | [
"static",
"int",
"hash",
"(",
"int",
"hashIn",
",",
"int",
"n",
")",
"{",
"int",
"hash",
"=",
"(",
"(",
"hashIn",
"<<",
"5",
")",
"+",
"hashIn",
")",
"+",
"(",
"n",
"&",
"0xFF",
")",
";",
"/* hash * 33 + c */",
"hash",
"=",
"(",
"(",
"hash",
"<... | adds an int to a hash value | [
"adds",
"an",
"int",
"to",
"a",
"hash",
"value"
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/NumberUtils.java#L95-L102 |
111,978 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/MultiPointImpl.java | MultiPointImpl.add | public void add(double x, double y) {
resize(m_pointCount + 1);
Point2D pt = new Point2D();
pt.setCoords(x, y);
setXY(m_pointCount - 1, pt);
} | java | public void add(double x, double y) {
resize(m_pointCount + 1);
Point2D pt = new Point2D();
pt.setCoords(x, y);
setXY(m_pointCount - 1, pt);
} | [
"public",
"void",
"add",
"(",
"double",
"x",
",",
"double",
"y",
")",
"{",
"resize",
"(",
"m_pointCount",
"+",
"1",
")",
";",
"Point2D",
"pt",
"=",
"new",
"Point2D",
"(",
")",
";",
"pt",
".",
"setCoords",
"(",
"x",
",",
"y",
")",
";",
"setXY",
... | Adds a Point to this MultiPoint with given x, y coordinates. | [
"Adds",
"a",
"Point",
"to",
"this",
"MultiPoint",
"with",
"given",
"x",
"y",
"coordinates",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/MultiPointImpl.java#L66-L71 |
111,979 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/MultiPointImpl.java | MultiPointImpl.add | public void add(double x, double y, double z) {
resize(m_pointCount + 1);
Point3D pt = new Point3D();
pt.setCoords(x, y, z);
setXYZ(m_pointCount - 1, pt);
} | java | public void add(double x, double y, double z) {
resize(m_pointCount + 1);
Point3D pt = new Point3D();
pt.setCoords(x, y, z);
setXYZ(m_pointCount - 1, pt);
} | [
"public",
"void",
"add",
"(",
"double",
"x",
",",
"double",
"y",
",",
"double",
"z",
")",
"{",
"resize",
"(",
"m_pointCount",
"+",
"1",
")",
";",
"Point3D",
"pt",
"=",
"new",
"Point3D",
"(",
")",
";",
"pt",
".",
"setCoords",
"(",
"x",
",",
"y",
... | Adds a Point to this MultiPoint with given x, y, z coordinates. | [
"Adds",
"a",
"Point",
"to",
"this",
"MultiPoint",
"with",
"given",
"x",
"y",
"z",
"coordinates",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/MultiPointImpl.java#L76-L81 |
111,980 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/MultiPointImpl.java | MultiPointImpl.add | public void add(MultiVertexGeometryImpl src, int beginIndex, int endIndex) {
int endIndexC = endIndex < 0 ? src.getPointCount() : endIndex;
if (beginIndex < 0 || beginIndex > src.getPointCount()
|| endIndexC < beginIndex)
throw new IllegalArgumentException();
if (beginIndex == endIndexC)
return;
mer... | java | public void add(MultiVertexGeometryImpl src, int beginIndex, int endIndex) {
int endIndexC = endIndex < 0 ? src.getPointCount() : endIndex;
if (beginIndex < 0 || beginIndex > src.getPointCount()
|| endIndexC < beginIndex)
throw new IllegalArgumentException();
if (beginIndex == endIndexC)
return;
mer... | [
"public",
"void",
"add",
"(",
"MultiVertexGeometryImpl",
"src",
",",
"int",
"beginIndex",
",",
"int",
"endIndex",
")",
"{",
"int",
"endIndexC",
"=",
"endIndex",
"<",
"0",
"?",
"src",
".",
"getPointCount",
"(",
")",
":",
"endIndex",
";",
"if",
"(",
"begin... | Appends points from another MultiVertexGeometryImpl at the end of this
one.
@param src
The source MultiVertexGeometryImpl | [
"Appends",
"points",
"from",
"another",
"MultiVertexGeometryImpl",
"at",
"the",
"end",
"of",
"this",
"one",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/MultiPointImpl.java#L90-L114 |
111,981 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/RasterizedGeometry2D.java | RasterizedGeometry2D.create | public static RasterizedGeometry2D create(Geometry geom,
double toleranceXY, int rasterSizeBytes) {
if (!canUseAccelerator(geom))
throw new IllegalArgumentException();
RasterizedGeometry2DImpl gc = RasterizedGeometry2DImpl.createImpl(geom,
toleranceXY, rasterSizeBytes);
return (RasterizedGeometry2D) gc... | java | public static RasterizedGeometry2D create(Geometry geom,
double toleranceXY, int rasterSizeBytes) {
if (!canUseAccelerator(geom))
throw new IllegalArgumentException();
RasterizedGeometry2DImpl gc = RasterizedGeometry2DImpl.createImpl(geom,
toleranceXY, rasterSizeBytes);
return (RasterizedGeometry2D) gc... | [
"public",
"static",
"RasterizedGeometry2D",
"create",
"(",
"Geometry",
"geom",
",",
"double",
"toleranceXY",
",",
"int",
"rasterSizeBytes",
")",
"{",
"if",
"(",
"!",
"canUseAccelerator",
"(",
"geom",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
")"... | Creates a rasterized geometry from a given Geometry.
@param geom
The input geometry to rasterize. It has to be a MultiVertexGeometry instance.
@param toleranceXY
The tolerance of the rasterization. Raster pixels that are
closer than given tolerance to the Geometry will be set.
@param rasterSizeBytes
The max size of th... | [
"Creates",
"a",
"rasterized",
"geometry",
"from",
"a",
"given",
"Geometry",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/RasterizedGeometry2D.java#L68-L76 |
111,982 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/SegmentIntersector.java | SegmentIntersector.pushSegment | public int pushSegment(Segment seg) {
assert (m_input_segments.size() < 2);
m_input_segments.add(newIntersectionPart_(seg));
// m_param_1.resize(15);
// m_param_2.resize(15);
return (int) m_input_segments.size() - 1;
} | java | public int pushSegment(Segment seg) {
assert (m_input_segments.size() < 2);
m_input_segments.add(newIntersectionPart_(seg));
// m_param_1.resize(15);
// m_param_2.resize(15);
return (int) m_input_segments.size() - 1;
} | [
"public",
"int",
"pushSegment",
"(",
"Segment",
"seg",
")",
"{",
"assert",
"(",
"m_input_segments",
".",
"size",
"(",
")",
"<",
"2",
")",
";",
"m_input_segments",
".",
"add",
"(",
"newIntersectionPart_",
"(",
"seg",
")",
")",
";",
"// m_param_1.resize(15);",... | Two segments has to be pushed for the intersect method to succeed. | [
"Two",
"segments",
"has",
"to",
"be",
"pushed",
"for",
"the",
"intersect",
"method",
"to",
"succeed",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/SegmentIntersector.java#L143-L149 |
111,983 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/IndexMultiDCList.java | IndexMultiDCList.createList | int createList(int listData) {
int list = newList_();
// m_lists.set_field(list, 0, null_node());//head
// m_lists.set_field(list, 1, null_node());//tail
// m_lists.set_field(list, 2, null_node());//prev list
m_lists.setField(list, 3, m_list_of_lists); // next list
m_lists.setField(list, 4, 0);// node count... | java | int createList(int listData) {
int list = newList_();
// m_lists.set_field(list, 0, null_node());//head
// m_lists.set_field(list, 1, null_node());//tail
// m_lists.set_field(list, 2, null_node());//prev list
m_lists.setField(list, 3, m_list_of_lists); // next list
m_lists.setField(list, 4, 0);// node count... | [
"int",
"createList",
"(",
"int",
"listData",
")",
"{",
"int",
"list",
"=",
"newList_",
"(",
")",
";",
"// m_lists.set_field(list, 0, null_node());//head",
"// m_lists.set_field(list, 1, null_node());//tail",
"// m_lists.set_field(list, 2, null_node());//prev list",
"m_lists",
"."... | listData is user's info associated with the list | [
"listData",
"is",
"user",
"s",
"info",
"associated",
"with",
"the",
"list"
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/IndexMultiDCList.java#L103-L116 |
111,984 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/IndexMultiDCList.java | IndexMultiDCList.deleteList | int deleteList(int list) {
clear(list);
int prevList = m_lists.getField(list, 2);
int nextList = m_lists.getField(list, 3);
if (prevList != nullNode())
setNextList_(prevList, nextList);
else
m_list_of_lists = nextList;
if (nextList != nullNode())
setPrevList_(nextList, prevList);
freeList_(list... | java | int deleteList(int list) {
clear(list);
int prevList = m_lists.getField(list, 2);
int nextList = m_lists.getField(list, 3);
if (prevList != nullNode())
setNextList_(prevList, nextList);
else
m_list_of_lists = nextList;
if (nextList != nullNode())
setPrevList_(nextList, prevList);
freeList_(list... | [
"int",
"deleteList",
"(",
"int",
"list",
")",
"{",
"clear",
"(",
"list",
")",
";",
"int",
"prevList",
"=",
"m_lists",
".",
"getField",
"(",
"list",
",",
"2",
")",
";",
"int",
"nextList",
"=",
"m_lists",
".",
"getField",
"(",
"list",
",",
"3",
")",
... | Deletes a list and returns the index of the next list. | [
"Deletes",
"a",
"list",
"and",
"returns",
"the",
"index",
"of",
"the",
"next",
"list",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/IndexMultiDCList.java#L119-L133 |
111,985 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/IndexMultiDCList.java | IndexMultiDCList.insertElement | int insertElement(int list, int beforeNode, int data) {
int node = newNode_();
int prev = -1;
if (beforeNode != nullNode()) {
prev = getPrev(beforeNode);
setPrev_(beforeNode, node);
}
setNext_(node, beforeNode);
if (prev != nullNode())
setNext_(prev, node);
int head = m_lists.getField(list, 0);... | java | int insertElement(int list, int beforeNode, int data) {
int node = newNode_();
int prev = -1;
if (beforeNode != nullNode()) {
prev = getPrev(beforeNode);
setPrev_(beforeNode, node);
}
setNext_(node, beforeNode);
if (prev != nullNode())
setNext_(prev, node);
int head = m_lists.getField(list, 0);... | [
"int",
"insertElement",
"(",
"int",
"list",
",",
"int",
"beforeNode",
",",
"int",
"data",
")",
"{",
"int",
"node",
"=",
"newNode_",
"(",
")",
";",
"int",
"prev",
"=",
"-",
"1",
";",
"if",
"(",
"beforeNode",
"!=",
"nullNode",
"(",
")",
")",
"{",
"... | Inserts a new node before the given one . | [
"Inserts",
"a",
"new",
"node",
"before",
"the",
"given",
"one",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/IndexMultiDCList.java#L164-L196 |
111,986 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/IndexMultiDCList.java | IndexMultiDCList.deleteElement | int deleteElement(int list, int node) {
int prev = getPrev(node);
int next = getNext(node);
if (prev != nullNode())
setNext_(prev, next);
else
m_lists.setField(list, 0, next);// change head
if (next != nullNode())
setPrev_(next, prev);
else
m_lists.setField(list, 1, prev);// change tail
freeN... | java | int deleteElement(int list, int node) {
int prev = getPrev(node);
int next = getNext(node);
if (prev != nullNode())
setNext_(prev, next);
else
m_lists.setField(list, 0, next);// change head
if (next != nullNode())
setPrev_(next, prev);
else
m_lists.setField(list, 1, prev);// change tail
freeN... | [
"int",
"deleteElement",
"(",
"int",
"list",
",",
"int",
"node",
")",
"{",
"int",
"prev",
"=",
"getPrev",
"(",
"node",
")",
";",
"int",
"next",
"=",
"getNext",
"(",
"node",
")",
";",
"if",
"(",
"prev",
"!=",
"nullNode",
"(",
")",
")",
"setNext_",
... | Deletes a node from a list. Returns the next node after the deleted one. | [
"Deletes",
"a",
"node",
"from",
"a",
"list",
".",
"Returns",
"the",
"next",
"node",
"after",
"the",
"deleted",
"one",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/IndexMultiDCList.java#L199-L214 |
111,987 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/IndexMultiDCList.java | IndexMultiDCList.clear | void clear(int list) {
int last = getLast(list);
while (last != nullNode()) {
int n = last;
last = getPrev(n);
freeNode_(n);
}
m_lists.setField(list, 0, -1);
m_lists.setField(list, 1, -1);
setListSize_(list, 0);
} | java | void clear(int list) {
int last = getLast(list);
while (last != nullNode()) {
int n = last;
last = getPrev(n);
freeNode_(n);
}
m_lists.setField(list, 0, -1);
m_lists.setField(list, 1, -1);
setListSize_(list, 0);
} | [
"void",
"clear",
"(",
"int",
"list",
")",
"{",
"int",
"last",
"=",
"getLast",
"(",
"list",
")",
";",
"while",
"(",
"last",
"!=",
"nullNode",
"(",
")",
")",
"{",
"int",
"n",
"=",
"last",
";",
"last",
"=",
"getPrev",
"(",
"n",
")",
";",
"freeNode... | Clears all nodes from the list. | [
"Clears",
"all",
"nodes",
"from",
"the",
"list",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/IndexMultiDCList.java#L264-L274 |
111,988 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/Transformation3D.java | Transformation3D.setZero | public void setZero() {
xx = 0.0;
yx = 0.0;
zx = 0.0;
xy = 0.0;
yy = 0.0;
zy = 0.0;
xz = 0.0;
yz = 0.0;
zz = 0.0;
xd = 0.0;
yd = 0.0;
zd = 0.0;
} | java | public void setZero() {
xx = 0.0;
yx = 0.0;
zx = 0.0;
xy = 0.0;
yy = 0.0;
zy = 0.0;
xz = 0.0;
yz = 0.0;
zz = 0.0;
xd = 0.0;
yd = 0.0;
zd = 0.0;
} | [
"public",
"void",
"setZero",
"(",
")",
"{",
"xx",
"=",
"0.0",
";",
"yx",
"=",
"0.0",
";",
"zx",
"=",
"0.0",
";",
"xy",
"=",
"0.0",
";",
"yy",
"=",
"0.0",
";",
"zy",
"=",
"0.0",
";",
"xz",
"=",
"0.0",
";",
"yz",
"=",
"0.0",
";",
"zz",
"=",... | Sets all elements to 0, thus producing and invalid transformation. | [
"Sets",
"all",
"elements",
"to",
"0",
"thus",
"producing",
"and",
"invalid",
"transformation",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Transformation3D.java#L47-L60 |
111,989 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/Transformation3D.java | Transformation3D.transform | public Envelope3D transform(Envelope3D env) {
if (env.isEmpty())
return env;
Point3D[] buf = new Point3D[8];
env.queryCorners(buf);
transform(buf, 8, buf);
env.setFromPoints(buf);
return env;
} | java | public Envelope3D transform(Envelope3D env) {
if (env.isEmpty())
return env;
Point3D[] buf = new Point3D[8];
env.queryCorners(buf);
transform(buf, 8, buf);
env.setFromPoints(buf);
return env;
} | [
"public",
"Envelope3D",
"transform",
"(",
"Envelope3D",
"env",
")",
"{",
"if",
"(",
"env",
".",
"isEmpty",
"(",
")",
")",
"return",
"env",
";",
"Point3D",
"[",
"]",
"buf",
"=",
"new",
"Point3D",
"[",
"8",
"]",
";",
"env",
".",
"queryCorners",
"(",
... | Transforms an envelope. The result is the bounding box of the transformed
envelope. | [
"Transforms",
"an",
"envelope",
".",
"The",
"result",
"is",
"the",
"bounding",
"box",
"of",
"the",
"transformed",
"envelope",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Transformation3D.java#L102-L113 |
111,990 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/Transformation3D.java | Transformation3D.inverse | public static void inverse(Transformation3D src, Transformation3D result) {
double det = src.xx * (src.yy * src.zz - src.zy * src.yz) - src.yx
* (src.xy * src.zz - src.zy * src.xz) + src.zx
* (src.xy * src.yz - src.yy * src.xz);
if (det != 0) {
double xx, yx, zx;
double xy, yy, zy;
double xz, yz, z... | java | public static void inverse(Transformation3D src, Transformation3D result) {
double det = src.xx * (src.yy * src.zz - src.zy * src.yz) - src.yx
* (src.xy * src.zz - src.zy * src.xz) + src.zx
* (src.xy * src.yz - src.yy * src.xz);
if (det != 0) {
double xx, yx, zx;
double xy, yy, zy;
double xz, yz, z... | [
"public",
"static",
"void",
"inverse",
"(",
"Transformation3D",
"src",
",",
"Transformation3D",
"result",
")",
"{",
"double",
"det",
"=",
"src",
".",
"xx",
"*",
"(",
"src",
".",
"yy",
"*",
"src",
".",
"zz",
"-",
"src",
".",
"zy",
"*",
"src",
".",
"... | Calculates the Inverse transformation.
@param src
The input transformation.
@param result
The inverse of the input transformation. Throws the
GeometryException("math singularity") exception if the Inverse
can not be calculated. | [
"Calculates",
"the",
"Inverse",
"transformation",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Transformation3D.java#L204-L246 |
111,991 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java | RelationalOperationsMatrix.relationCompare_ | private static boolean relationCompare_(int[] matrix, String scl) {
for (int i = 0; i < 9; i++) {
switch (scl.charAt(i)) {
case 'T':
assert (matrix[i] != -2);
if (matrix[i] == -1)
return false;
break;
case 'F':
assert (matrix[i] != -2);
if (matrix[i] != -1)
return false;
br... | java | private static boolean relationCompare_(int[] matrix, String scl) {
for (int i = 0; i < 9; i++) {
switch (scl.charAt(i)) {
case 'T':
assert (matrix[i] != -2);
if (matrix[i] == -1)
return false;
break;
case 'F':
assert (matrix[i] != -2);
if (matrix[i] != -1)
return false;
br... | [
"private",
"static",
"boolean",
"relationCompare_",
"(",
"int",
"[",
"]",
"matrix",
",",
"String",
"scl",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"9",
";",
"i",
"++",
")",
"{",
"switch",
"(",
"scl",
".",
"charAt",
"(",
"i",
"... | Compares the DE-9I matrix against the scl string. | [
"Compares",
"the",
"DE",
"-",
"9I",
"matrix",
"against",
"the",
"scl",
"string",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java#L1001-L1040 |
111,992 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java | RelationalOperationsMatrix.getPredefinedRelation_ | private static int getPredefinedRelation_(String scl, int dim_a, int dim_b) {
if (equals_(scl))
return RelationalOperations.Relation.equals;
if (disjoint_(scl))
return RelationalOperations.Relation.disjoint;
if (touches_(scl, dim_a, dim_b))
return RelationalOperations.Relation.touches;
if (crosses_(... | java | private static int getPredefinedRelation_(String scl, int dim_a, int dim_b) {
if (equals_(scl))
return RelationalOperations.Relation.equals;
if (disjoint_(scl))
return RelationalOperations.Relation.disjoint;
if (touches_(scl, dim_a, dim_b))
return RelationalOperations.Relation.touches;
if (crosses_(... | [
"private",
"static",
"int",
"getPredefinedRelation_",
"(",
"String",
"scl",
",",
"int",
"dim_a",
",",
"int",
"dim_b",
")",
"{",
"if",
"(",
"equals_",
"(",
"scl",
")",
")",
"return",
"RelationalOperations",
".",
"Relation",
".",
"equals",
";",
"if",
"(",
... | Checks whether scl string is a predefined relation. | [
"Checks",
"whether",
"scl",
"string",
"is",
"a",
"predefined",
"relation",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java#L1122-L1142 |
111,993 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java | RelationalOperationsMatrix.equals_ | private static boolean equals_(String scl) {
// Valid for all
if (scl.charAt(0) == 'T' && scl.charAt(1) == '*'
&& scl.charAt(2) == 'F' && scl.charAt(3) == '*'
&& scl.charAt(4) == '*' && scl.charAt(5) == 'F'
&& scl.charAt(6) == 'F' && scl.charAt(7) == 'F'
&& scl.charAt(8) == '*')
return true;
r... | java | private static boolean equals_(String scl) {
// Valid for all
if (scl.charAt(0) == 'T' && scl.charAt(1) == '*'
&& scl.charAt(2) == 'F' && scl.charAt(3) == '*'
&& scl.charAt(4) == '*' && scl.charAt(5) == 'F'
&& scl.charAt(6) == 'F' && scl.charAt(7) == 'F'
&& scl.charAt(8) == '*')
return true;
r... | [
"private",
"static",
"boolean",
"equals_",
"(",
"String",
"scl",
")",
"{",
"// Valid for all",
"if",
"(",
"scl",
".",
"charAt",
"(",
"0",
")",
"==",
"'",
"'",
"&&",
"scl",
".",
"charAt",
"(",
"1",
")",
"==",
"'",
"'",
"&&",
"scl",
".",
"charAt",
... | Checks whether the scl string is the equals relation. | [
"Checks",
"whether",
"the",
"scl",
"string",
"is",
"the",
"equals",
"relation",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java#L1145-L1155 |
111,994 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java | RelationalOperationsMatrix.disjoint_ | private static boolean disjoint_(String scl) {
if (scl.charAt(0) == 'F' && scl.charAt(1) == 'F'
&& scl.charAt(2) == '*' && scl.charAt(3) == 'F'
&& scl.charAt(4) == 'F' && scl.charAt(5) == '*'
&& scl.charAt(6) == '*' && scl.charAt(7) == '*'
&& scl.charAt(8) == '*')
return true;
return false;
} | java | private static boolean disjoint_(String scl) {
if (scl.charAt(0) == 'F' && scl.charAt(1) == 'F'
&& scl.charAt(2) == '*' && scl.charAt(3) == 'F'
&& scl.charAt(4) == 'F' && scl.charAt(5) == '*'
&& scl.charAt(6) == '*' && scl.charAt(7) == '*'
&& scl.charAt(8) == '*')
return true;
return false;
} | [
"private",
"static",
"boolean",
"disjoint_",
"(",
"String",
"scl",
")",
"{",
"if",
"(",
"scl",
".",
"charAt",
"(",
"0",
")",
"==",
"'",
"'",
"&&",
"scl",
".",
"charAt",
"(",
"1",
")",
"==",
"'",
"'",
"&&",
"scl",
".",
"charAt",
"(",
"2",
")",
... | Checks whether the scl string is the disjoint relation. | [
"Checks",
"whether",
"the",
"scl",
"string",
"is",
"the",
"disjoint",
"relation",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java#L1158-L1167 |
111,995 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java | RelationalOperationsMatrix.touches_ | private static boolean touches_(String scl, int dim_a, int dim_b) {
// Points cant touch
if (dim_a == 0 && dim_b == 0)
return false;
if (!(dim_a == 2 && dim_b == 2)) {
// Valid for area-Line, Line-Line, area-Point, and Line-Point
if (scl.charAt(0) == 'F' && scl.charAt(1) == '*'
&& scl.charAt(2) == ... | java | private static boolean touches_(String scl, int dim_a, int dim_b) {
// Points cant touch
if (dim_a == 0 && dim_b == 0)
return false;
if (!(dim_a == 2 && dim_b == 2)) {
// Valid for area-Line, Line-Line, area-Point, and Line-Point
if (scl.charAt(0) == 'F' && scl.charAt(1) == '*'
&& scl.charAt(2) == ... | [
"private",
"static",
"boolean",
"touches_",
"(",
"String",
"scl",
",",
"int",
"dim_a",
",",
"int",
"dim_b",
")",
"{",
"// Points cant touch",
"if",
"(",
"dim_a",
"==",
"0",
"&&",
"dim_b",
"==",
"0",
")",
"return",
"false",
";",
"if",
"(",
"!",
"(",
"... | Checks whether the scl string is the touches relation. | [
"Checks",
"whether",
"the",
"scl",
"string",
"is",
"the",
"touches",
"relation",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java#L1170-L1207 |
111,996 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java | RelationalOperationsMatrix.crosses_ | private static boolean crosses_(String scl, int dim_a, int dim_b) {
if (dim_a > dim_b) {
// Valid for area-Line, area-Point, Line-Point
if (scl.charAt(0) == 'T' && scl.charAt(1) == '*'
&& scl.charAt(2) == '*' && scl.charAt(3) == '*'
&& scl.charAt(4) == '*' && scl.charAt(5) == '*'
&& scl.charAt(6)... | java | private static boolean crosses_(String scl, int dim_a, int dim_b) {
if (dim_a > dim_b) {
// Valid for area-Line, area-Point, Line-Point
if (scl.charAt(0) == 'T' && scl.charAt(1) == '*'
&& scl.charAt(2) == '*' && scl.charAt(3) == '*'
&& scl.charAt(4) == '*' && scl.charAt(5) == '*'
&& scl.charAt(6)... | [
"private",
"static",
"boolean",
"crosses_",
"(",
"String",
"scl",
",",
"int",
"dim_a",
",",
"int",
"dim_b",
")",
"{",
"if",
"(",
"dim_a",
">",
"dim_b",
")",
"{",
"// Valid for area-Line, area-Point, Line-Point",
"if",
"(",
"scl",
".",
"charAt",
"(",
"0",
"... | Checks whether the scl string is the crosses relation. | [
"Checks",
"whether",
"the",
"scl",
"string",
"is",
"the",
"crosses",
"relation",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java#L1210-L1234 |
111,997 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java | RelationalOperationsMatrix.contains_ | private static boolean contains_(String scl) {
// Valid for all
if (scl.charAt(0) == 'T' && scl.charAt(1) == '*'
&& scl.charAt(2) == '*' && scl.charAt(3) == '*'
&& scl.charAt(4) == '*' && scl.charAt(5) == '*'
&& scl.charAt(6) == 'F' && scl.charAt(7) == 'F'
&& scl.charAt(8) == '*')
return true;
... | java | private static boolean contains_(String scl) {
// Valid for all
if (scl.charAt(0) == 'T' && scl.charAt(1) == '*'
&& scl.charAt(2) == '*' && scl.charAt(3) == '*'
&& scl.charAt(4) == '*' && scl.charAt(5) == '*'
&& scl.charAt(6) == 'F' && scl.charAt(7) == 'F'
&& scl.charAt(8) == '*')
return true;
... | [
"private",
"static",
"boolean",
"contains_",
"(",
"String",
"scl",
")",
"{",
"// Valid for all",
"if",
"(",
"scl",
".",
"charAt",
"(",
"0",
")",
"==",
"'",
"'",
"&&",
"scl",
".",
"charAt",
"(",
"1",
")",
"==",
"'",
"'",
"&&",
"scl",
".",
"charAt",
... | Checks whether the scl string is the contains relation. | [
"Checks",
"whether",
"the",
"scl",
"string",
"is",
"the",
"contains",
"relation",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java#L1237-L1247 |
111,998 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java | RelationalOperationsMatrix.overlaps_ | private static boolean overlaps_(String scl, int dim_a, int dim_b) {
if (dim_a == dim_b) {
if (dim_a != 1) {
// Valid for area-area, Point-Point
if (scl.charAt(0) == 'T' && scl.charAt(1) == '*'
&& scl.charAt(2) == 'T' && scl.charAt(3) == '*'
&& scl.charAt(4) == '*' && scl.charAt(5) == '*'
... | java | private static boolean overlaps_(String scl, int dim_a, int dim_b) {
if (dim_a == dim_b) {
if (dim_a != 1) {
// Valid for area-area, Point-Point
if (scl.charAt(0) == 'T' && scl.charAt(1) == '*'
&& scl.charAt(2) == 'T' && scl.charAt(3) == '*'
&& scl.charAt(4) == '*' && scl.charAt(5) == '*'
... | [
"private",
"static",
"boolean",
"overlaps_",
"(",
"String",
"scl",
",",
"int",
"dim_a",
",",
"int",
"dim_b",
")",
"{",
"if",
"(",
"dim_a",
"==",
"dim_b",
")",
"{",
"if",
"(",
"dim_a",
"!=",
"1",
")",
"{",
"// Valid for area-area, Point-Point",
"if",
"(",... | Checks whether the scl string is the overlaps relation. | [
"Checks",
"whether",
"the",
"scl",
"string",
"is",
"the",
"overlaps",
"relation",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java#L1250-L1274 |
111,999 | Esri/geometry-api-java | src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java | RelationalOperationsMatrix.setPredicates_ | private void setPredicates_(String scl) {
m_scl = scl;
for (int i = 0; i < 9; i++) {
if (m_scl.charAt(i) != '*') {
m_perform_predicates[i] = true;
m_predicate_count++;
} else
m_perform_predicates[i] = false;
}
} | java | private void setPredicates_(String scl) {
m_scl = scl;
for (int i = 0; i < 9; i++) {
if (m_scl.charAt(i) != '*') {
m_perform_predicates[i] = true;
m_predicate_count++;
} else
m_perform_predicates[i] = false;
}
} | [
"private",
"void",
"setPredicates_",
"(",
"String",
"scl",
")",
"{",
"m_scl",
"=",
"scl",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"9",
";",
"i",
"++",
")",
"{",
"if",
"(",
"m_scl",
".",
"charAt",
"(",
"i",
")",
"!=",
"'",
"'",
... | Sets the relation predicates from the scl string. | [
"Sets",
"the",
"relation",
"predicates",
"from",
"the",
"scl",
"string",
"."
] | 494da8ec953d76e7c6072afbc081abfe48ff07cf | https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/RelationalOperationsMatrix.java#L1360-L1370 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.