repo_name stringlengths 7 104 | file_path stringlengths 13 198 | context stringlengths 67 7.15k | import_statement stringlengths 16 4.43k | code stringlengths 40 6.98k | prompt stringlengths 227 8.27k | next_line stringlengths 8 795 |
|---|---|---|---|---|---|---|
JOML-CI/JOML | src/org/joml/Matrix3x2f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | * <p>
* The given 2D-vector is treated as a 3D-vector with its z-component being <code>0.0</code>, so it
* will represent a direction in 2D-space rather than a position. This method will therefore
* not take the translation part of the matrix into account.
* <p>
* In order to store the result in the same vector, use {@link #transformDirection(Vector2f)}.
*
* @see #transformDirection(Vector2f)
*
* @param x
* the x component of the vector to transform
* @param y
* the y component of the vector to transform
* @param dest
* will hold the result
* @return dest
*/
public Vector2f transformDirection(float x, float y, Vector2f dest) {
return dest.set(m00 * x + m10 * y, m01 * x + m11 * y);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(m00);
out.writeFloat(m01);
out.writeFloat(m10);
out.writeFloat(m11);
out.writeFloat(m20);
out.writeFloat(m21);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix3x2f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
* <p>
* The given 2D-vector is treated as a 3D-vector with its z-component being <code>0.0</code>, so it
* will represent a direction in 2D-space rather than a position. This method will therefore
* not take the translation part of the matrix into account.
* <p>
* In order to store the result in the same vector, use {@link #transformDirection(Vector2f)}.
*
* @see #transformDirection(Vector2f)
*
* @param x
* the x component of the vector to transform
* @param y
* the y component of the vector to transform
* @param dest
* will hold the result
* @return dest
*/
public Vector2f transformDirection(float x, float y, Vector2f dest) {
return dest.set(m00 * x + m10 * y, m01 * x + m11 * y);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(m00);
out.writeFloat(m01);
out.writeFloat(m10);
out.writeFloat(m11);
out.writeFloat(m20);
out.writeFloat(m21);
}
| public void readExternal(ObjectInput in) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix3x2fStack.java | // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
| import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput; | result = prime * result + mats[i].hashCode();
}
return result;
}
/*
* Contract between Matrix3x2f and Matrix3x2fStack:
*
* - Matrix3x2f.equals(Matrix3x2fStack) is true iff all the 6 matrix elements are equal
* - Matrix3x2fStack.equals(Matrix3x2f) is true iff all the 6 matrix elements are equal
* - Matrix3x2fStack.equals(Matrix3x2fStack) is true iff all 6 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix3x2fStack) {
Matrix3x2fStack other = (Matrix3x2fStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
| // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
// Path: src/org/joml/Matrix3x2fStack.java
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
result = prime * result + mats[i].hashCode();
}
return result;
}
/*
* Contract between Matrix3x2f and Matrix3x2fStack:
*
* - Matrix3x2f.equals(Matrix3x2fStack) is true iff all the 6 matrix elements are equal
* - Matrix3x2fStack.equals(Matrix3x2f) is true iff all the 6 matrix elements are equal
* - Matrix3x2fStack.equals(Matrix3x2fStack) is true iff all 6 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix3x2fStack) {
Matrix3x2fStack other = (Matrix3x2fStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix3x2fStack.java | // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
| import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput; | * - Matrix3x2f.equals(Matrix3x2fStack) is true iff all the 6 matrix elements are equal
* - Matrix3x2fStack.equals(Matrix3x2f) is true iff all the 6 matrix elements are equal
* - Matrix3x2fStack.equals(Matrix3x2fStack) is true iff all 6 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix3x2fStack) {
Matrix3x2fStack other = (Matrix3x2fStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal(out);
out.writeInt(curr);
for (int i = 0; i < curr; i++) {
out.writeObject(mats[i]);
}
}
| // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
// Path: src/org/joml/Matrix3x2fStack.java
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
* - Matrix3x2f.equals(Matrix3x2fStack) is true iff all the 6 matrix elements are equal
* - Matrix3x2fStack.equals(Matrix3x2f) is true iff all the 6 matrix elements are equal
* - Matrix3x2fStack.equals(Matrix3x2fStack) is true iff all 6 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix3x2fStack) {
Matrix3x2fStack other = (Matrix3x2fStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal(out);
out.writeInt(curr);
for (int i = 0; i < curr; i++) {
out.writeObject(mats[i]);
}
}
| public void readExternal(ObjectInput in) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix4f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | *
* @return the string representation
*/
public String toString() {
String str = toString(Options.NUMBER_FORMAT);
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
/**
* Return a string representation of this matrix by formatting the matrix elements with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the matrix values with
* @return the string representation
*/ | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix4f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
*
* @return the string representation
*/
public String toString() {
String str = toString(Options.NUMBER_FORMAT);
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
/**
* Return a string representation of this matrix by formatting the matrix elements with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the matrix values with
* @return the string representation
*/ | public String toString(NumberFormat formatter) { |
JOML-CI/JOML | src/org/joml/Matrix4f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | ._m33(m33())
._properties(properties & ~(PROPERTY_PERSPECTIVE | PROPERTY_IDENTITY));
}
/**
* Pre-multiply a translation to this matrix by translating by the given number of
* units in x, y and z.
* <p>
* If <code>M</code> is <code>this</code> matrix and <code>T</code> the translation
* matrix, then the new matrix will be <code>T * M</code>. So when
* transforming a vector <code>v</code> with the new matrix by using
* <code>T * M * v</code>, the translation will be applied last!
* <p>
* In order to set the matrix to a translation transformation without pre-multiplying
* it, use {@link #translation(float, float, float)}.
*
* @see #translation(float, float, float)
*
* @param x
* the offset to translate in x
* @param y
* the offset to translate in y
* @param z
* the offset to translate in z
* @return this
*/
public Matrix4f translateLocal(float x, float y, float z) {
return translateLocal(x, y, z, this);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix4f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
._m33(m33())
._properties(properties & ~(PROPERTY_PERSPECTIVE | PROPERTY_IDENTITY));
}
/**
* Pre-multiply a translation to this matrix by translating by the given number of
* units in x, y and z.
* <p>
* If <code>M</code> is <code>this</code> matrix and <code>T</code> the translation
* matrix, then the new matrix will be <code>T * M</code>. So when
* transforming a vector <code>v</code> with the new matrix by using
* <code>T * M * v</code>, the translation will be applied last!
* <p>
* In order to set the matrix to a translation transformation without pre-multiplying
* it, use {@link #translation(float, float, float)}.
*
* @see #translation(float, float, float)
*
* @param x
* the offset to translate in x
* @param y
* the offset to translate in y
* @param z
* the offset to translate in z
* @return this
*/
public Matrix4f translateLocal(float x, float y, float z) {
return translateLocal(x, y, z, this);
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix4f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | * the offset to translate in x
* @param y
* the offset to translate in y
* @param z
* the offset to translate in z
* @return this
*/
public Matrix4f translateLocal(float x, float y, float z) {
return translateLocal(x, y, z, this);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(m00());
out.writeFloat(m01());
out.writeFloat(m02());
out.writeFloat(m03());
out.writeFloat(m10());
out.writeFloat(m11());
out.writeFloat(m12());
out.writeFloat(m13());
out.writeFloat(m20());
out.writeFloat(m21());
out.writeFloat(m22());
out.writeFloat(m23());
out.writeFloat(m30());
out.writeFloat(m31());
out.writeFloat(m32());
out.writeFloat(m33());
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix4f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
* the offset to translate in x
* @param y
* the offset to translate in y
* @param z
* the offset to translate in z
* @return this
*/
public Matrix4f translateLocal(float x, float y, float z) {
return translateLocal(x, y, z, this);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(m00());
out.writeFloat(m01());
out.writeFloat(m02());
out.writeFloat(m03());
out.writeFloat(m10());
out.writeFloat(m11());
out.writeFloat(m12());
out.writeFloat(m13());
out.writeFloat(m20());
out.writeFloat(m21());
out.writeFloat(m22());
out.writeFloat(m23());
out.writeFloat(m30());
out.writeFloat(m31());
out.writeFloat(m32());
out.writeFloat(m33());
}
| public void readExternal(ObjectInput in) throws IOException { |
JOML-CI/JOML | src/org/joml/Runtime.java | // Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.NumberFormat; | return doubleToLongBits1_2(dbl);
}
//#ifndef __GWT__
private static long doubleToLongBits1_3(double dbl) {
return Double.doubleToRawLongBits(dbl);
}
//#endif
private static long doubleToLongBits1_2(double dbl) {
return Double.doubleToLongBits(dbl);
}
public static String formatNumbers(String str) {
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
| // Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Runtime.java
import java.text.NumberFormat;
return doubleToLongBits1_2(dbl);
}
//#ifndef __GWT__
private static long doubleToLongBits1_3(double dbl) {
return Double.doubleToRawLongBits(dbl);
}
//#endif
private static long doubleToLongBits1_2(double dbl) {
return Double.doubleToLongBits(dbl);
}
public static String formatNumbers(String str) {
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
| public static String format(double number, NumberFormat format) { |
JOML-CI/JOML | src/org/joml/Vector2d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | */
public Vector2d add(Vector2fc v) {
this.x = x + v.x();
this.y = y + v.y();
return this;
}
public Vector2d add(Vector2dc v, Vector2d dest) {
dest.x = x + v.x();
dest.y = y + v.y();
return dest;
}
public Vector2d add(Vector2fc v, Vector2d dest) {
dest.x = x + v.x();
dest.y = y + v.y();
return dest;
}
/**
* Set all components to zero.
*
* @return this
*/
public Vector2d zero() {
this.x = 0;
this.y = 0;
return this;
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector2d.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
*/
public Vector2d add(Vector2fc v) {
this.x = x + v.x();
this.y = y + v.y();
return this;
}
public Vector2d add(Vector2dc v, Vector2d dest) {
dest.x = x + v.x();
dest.y = y + v.y();
return dest;
}
public Vector2d add(Vector2fc v, Vector2d dest) {
dest.x = x + v.x();
dest.y = y + v.y();
return dest;
}
/**
* Set all components to zero.
*
* @return this
*/
public Vector2d zero() {
this.x = 0;
this.y = 0;
return this;
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Vector2d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | }
public Vector2d add(Vector2dc v, Vector2d dest) {
dest.x = x + v.x();
dest.y = y + v.y();
return dest;
}
public Vector2d add(Vector2fc v, Vector2d dest) {
dest.x = x + v.x();
dest.y = y + v.y();
return dest;
}
/**
* Set all components to zero.
*
* @return this
*/
public Vector2d zero() {
this.x = 0;
this.y = 0;
return this;
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(x);
out.writeDouble(y);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector2d.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
}
public Vector2d add(Vector2dc v, Vector2d dest) {
dest.x = x + v.x();
dest.y = y + v.y();
return dest;
}
public Vector2d add(Vector2fc v, Vector2d dest) {
dest.x = x + v.x();
dest.y = y + v.y();
return dest;
}
/**
* Set all components to zero.
*
* @return this
*/
public Vector2d zero() {
this.x = 0;
this.y = 0;
return this;
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(x);
out.writeDouble(y);
}
| public void readExternal(ObjectInput in) throws IOException, |
JOML-CI/JOML | src/org/joml/Vector2d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | return false;
return true;
}
public boolean equals(double x, double y) {
if (Double.doubleToLongBits(this.x) != Double.doubleToLongBits(x))
return false;
if (Double.doubleToLongBits(this.y) != Double.doubleToLongBits(y))
return false;
return true;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector2d.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
return false;
return true;
}
public boolean equals(double x, double y) {
if (Double.doubleToLongBits(this.x) != Double.doubleToLongBits(x))
return false;
if (Double.doubleToLongBits(this.y) != Double.doubleToLongBits(y))
return false;
return true;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | public String toString(NumberFormat formatter) { |
JOML-CI/JOML | src/org/joml/AxisAngle4f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat; | * @param m
* the matrix to set
* @return m
*/
public Matrix3d get(Matrix3d m) {
return m.set(this);
}
/**
* Set the given {@link AxisAngle4d} to this {@link AxisAngle4f}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4d get(AxisAngle4d dest) {
return dest.set(this);
}
/**
* Set the given {@link AxisAngle4f} to this {@link AxisAngle4f}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4f get(AxisAngle4f dest) {
return dest.set(this);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/AxisAngle4f.java
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
* @param m
* the matrix to set
* @return m
*/
public Matrix3d get(Matrix3d m) {
return m.set(this);
}
/**
* Set the given {@link AxisAngle4d} to this {@link AxisAngle4f}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4d get(AxisAngle4d dest) {
return dest.set(this);
}
/**
* Set the given {@link AxisAngle4f} to this {@link AxisAngle4f}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4f get(AxisAngle4f dest) {
return dest.set(this);
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/AxisAngle4f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat; |
/**
* Set the given {@link AxisAngle4d} to this {@link AxisAngle4f}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4d get(AxisAngle4d dest) {
return dest.set(this);
}
/**
* Set the given {@link AxisAngle4f} to this {@link AxisAngle4f}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4f get(AxisAngle4f dest) {
return dest.set(this);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(angle);
out.writeFloat(x);
out.writeFloat(y);
out.writeFloat(z);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/AxisAngle4f.java
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
/**
* Set the given {@link AxisAngle4d} to this {@link AxisAngle4f}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4d get(AxisAngle4d dest) {
return dest.set(this);
}
/**
* Set the given {@link AxisAngle4f} to this {@link AxisAngle4f}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4f get(AxisAngle4f dest) {
return dest.set(this);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(angle);
out.writeFloat(x);
out.writeFloat(y);
out.writeFloat(z);
}
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { |
JOML-CI/JOML | src/org/joml/AxisAngle4f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat; | */
public Vector4f transform(Vector4fc v, Vector4f dest) {
double sin = Math.sin(angle);
double cos = Math.cosFromSin(sin, angle);
float dot = x * v.x() + y * v.y() + z * v.z();
dest.set((float) (v.x() * cos + sin * (y * v.z() - z * v.y()) + (1.0 - cos) * dot * x),
(float) (v.y() * cos + sin * (z * v.x() - x * v.z()) + (1.0 - cos) * dot * y),
(float) (v.z() * cos + sin * (x * v.y() - y * v.x()) + (1.0 - cos) * dot * z),
dest.w);
return dest;
}
/**
* Return a string representation of this {@link AxisAngle4f}.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code> 0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this {@link AxisAngle4f} by formatting the components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/AxisAngle4f.java
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
*/
public Vector4f transform(Vector4fc v, Vector4f dest) {
double sin = Math.sin(angle);
double cos = Math.cosFromSin(sin, angle);
float dot = x * v.x() + y * v.y() + z * v.z();
dest.set((float) (v.x() * cos + sin * (y * v.z() - z * v.y()) + (1.0 - cos) * dot * x),
(float) (v.y() * cos + sin * (z * v.x() - x * v.z()) + (1.0 - cos) * dot * y),
(float) (v.z() * cos + sin * (x * v.y() - y * v.x()) + (1.0 - cos) * dot * z),
dest.w);
return dest;
}
/**
* Return a string representation of this {@link AxisAngle4f}.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code> 0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this {@link AxisAngle4f} by formatting the components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | public String toString(NumberFormat formatter) { |
JOML-CI/JOML | src/org/joml/Matrix3f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | *
* @return the string representation
*/
public String toString() {
String str = toString(Options.NUMBER_FORMAT);
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
/**
* Return a string representation of this matrix by formatting the matrix elements with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the matrix values with
* @return the string representation
*/ | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix3f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
*
* @return the string representation
*/
public String toString() {
String str = toString(Options.NUMBER_FORMAT);
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
/**
* Return a string representation of this matrix by formatting the matrix elements with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the matrix values with
* @return the string representation
*/ | public String toString(NumberFormat formatter) { |
JOML-CI/JOML | src/org/joml/Matrix3f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | }
public Vector3f transform(Vector3f v) {
return v.mul(this);
}
public Vector3f transform(Vector3fc v, Vector3f dest) {
return v.mul(this, dest);
}
public Vector3f transform(float x, float y, float z, Vector3f dest) {
return dest.set(Math.fma(m00, x, Math.fma(m10, y, m20 * z)),
Math.fma(m01, x, Math.fma(m11, y, m21 * z)),
Math.fma(m02, x, Math.fma(m12, y, m22 * z)));
}
public Vector3f transformTranspose(Vector3f v) {
return v.mulTranspose(this);
}
public Vector3f transformTranspose(Vector3fc v, Vector3f dest) {
return v.mulTranspose(this, dest);
}
public Vector3f transformTranspose(float x, float y, float z, Vector3f dest) {
return dest.set(Math.fma(m00, x, Math.fma(m01, y, m02 * z)),
Math.fma(m10, x, Math.fma(m11, y, m12 * z)),
Math.fma(m20, x, Math.fma(m21, y, m22 * z)));
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix3f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
}
public Vector3f transform(Vector3f v) {
return v.mul(this);
}
public Vector3f transform(Vector3fc v, Vector3f dest) {
return v.mul(this, dest);
}
public Vector3f transform(float x, float y, float z, Vector3f dest) {
return dest.set(Math.fma(m00, x, Math.fma(m10, y, m20 * z)),
Math.fma(m01, x, Math.fma(m11, y, m21 * z)),
Math.fma(m02, x, Math.fma(m12, y, m22 * z)));
}
public Vector3f transformTranspose(Vector3f v) {
return v.mulTranspose(this);
}
public Vector3f transformTranspose(Vector3fc v, Vector3f dest) {
return v.mulTranspose(this, dest);
}
public Vector3f transformTranspose(float x, float y, float z, Vector3f dest) {
return dest.set(Math.fma(m00, x, Math.fma(m01, y, m02 * z)),
Math.fma(m10, x, Math.fma(m11, y, m12 * z)),
Math.fma(m20, x, Math.fma(m21, y, m22 * z)));
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix3f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | Math.fma(m01, x, Math.fma(m11, y, m21 * z)),
Math.fma(m02, x, Math.fma(m12, y, m22 * z)));
}
public Vector3f transformTranspose(Vector3f v) {
return v.mulTranspose(this);
}
public Vector3f transformTranspose(Vector3fc v, Vector3f dest) {
return v.mulTranspose(this, dest);
}
public Vector3f transformTranspose(float x, float y, float z, Vector3f dest) {
return dest.set(Math.fma(m00, x, Math.fma(m01, y, m02 * z)),
Math.fma(m10, x, Math.fma(m11, y, m12 * z)),
Math.fma(m20, x, Math.fma(m21, y, m22 * z)));
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(m00);
out.writeFloat(m01);
out.writeFloat(m02);
out.writeFloat(m10);
out.writeFloat(m11);
out.writeFloat(m12);
out.writeFloat(m20);
out.writeFloat(m21);
out.writeFloat(m22);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix3f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float32Array;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
Math.fma(m01, x, Math.fma(m11, y, m21 * z)),
Math.fma(m02, x, Math.fma(m12, y, m22 * z)));
}
public Vector3f transformTranspose(Vector3f v) {
return v.mulTranspose(this);
}
public Vector3f transformTranspose(Vector3fc v, Vector3f dest) {
return v.mulTranspose(this, dest);
}
public Vector3f transformTranspose(float x, float y, float z, Vector3f dest) {
return dest.set(Math.fma(m00, x, Math.fma(m01, y, m02 * z)),
Math.fma(m10, x, Math.fma(m11, y, m12 * z)),
Math.fma(m20, x, Math.fma(m21, y, m22 * z)));
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(m00);
out.writeFloat(m01);
out.writeFloat(m02);
out.writeFloat(m10);
out.writeFloat(m11);
out.writeFloat(m12);
out.writeFloat(m20);
out.writeFloat(m21);
out.writeFloat(m22);
}
| public void readExternal(ObjectInput in) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix4dStack.java | // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
| import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput; | result = prime * result + mats[i].hashCode();
}
return result;
}
/*
* Contract between Matrix4d and Matrix4dStack:
*
* - Matrix4d.equals(Matrix4dStack) is true iff all the 16 matrix elements are equal
* - Matrix4dStack.equals(Matrix4d) is true iff all the 16 matrix elements are equal
* - Matrix4dStack.equals(Matrix4dStack) is true iff all 16 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix4dStack) {
Matrix4dStack other = (Matrix4dStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
| // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
// Path: src/org/joml/Matrix4dStack.java
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
result = prime * result + mats[i].hashCode();
}
return result;
}
/*
* Contract between Matrix4d and Matrix4dStack:
*
* - Matrix4d.equals(Matrix4dStack) is true iff all the 16 matrix elements are equal
* - Matrix4dStack.equals(Matrix4d) is true iff all the 16 matrix elements are equal
* - Matrix4dStack.equals(Matrix4dStack) is true iff all 16 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix4dStack) {
Matrix4dStack other = (Matrix4dStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix4dStack.java | // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
| import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput; | * - Matrix4d.equals(Matrix4dStack) is true iff all the 16 matrix elements are equal
* - Matrix4dStack.equals(Matrix4d) is true iff all the 16 matrix elements are equal
* - Matrix4dStack.equals(Matrix4dStack) is true iff all 16 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix4dStack) {
Matrix4dStack other = (Matrix4dStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal(out);
out.writeInt(curr);
for (int i = 0; i < curr; i++) {
out.writeObject(mats[i]);
}
}
| // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
// Path: src/org/joml/Matrix4dStack.java
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
* - Matrix4d.equals(Matrix4dStack) is true iff all the 16 matrix elements are equal
* - Matrix4dStack.equals(Matrix4d) is true iff all the 16 matrix elements are equal
* - Matrix4dStack.equals(Matrix4dStack) is true iff all 16 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix4dStack) {
Matrix4dStack other = (Matrix4dStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal(out);
out.writeInt(curr);
for (int i = 0; i < curr; i++) {
out.writeObject(mats[i]);
}
}
| public void readExternal(ObjectInput in) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix2d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float64Array;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | *
* @return the string representation
*/
public String toString() {
String str = toString(Options.NUMBER_FORMAT);
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
/**
* Return a string representation of this matrix by formatting the matrix elements with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the matrix values with
* @return the string representation
*/ | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix2d.java
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float64Array;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
*
* @return the string representation
*/
public String toString() {
String str = toString(Options.NUMBER_FORMAT);
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
/**
* Return a string representation of this matrix by formatting the matrix elements with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the matrix values with
* @return the string representation
*/ | public String toString(NumberFormat formatter) { |
JOML-CI/JOML | src/org/joml/Matrix2d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float64Array;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | public Vector2d transform(Vector2d v) {
return v.mul(this);
}
public Vector2d transform(Vector2dc v, Vector2d dest) {
v.mul(this, dest);
return dest;
}
public Vector2d transform(double x, double y, Vector2d dest) {
dest.set(m00 * x + m10 * y,
m01 * x + m11 * y);
return dest;
}
public Vector2d transformTranspose(Vector2d v) {
return v.mulTranspose(this);
}
public Vector2d transformTranspose(Vector2dc v, Vector2d dest) {
v.mulTranspose(this, dest);
return dest;
}
public Vector2d transformTranspose(double x, double y, Vector2d dest) {
dest.set(m00 * x + m01 * y,
m10 * x + m11 * y);
return dest;
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix2d.java
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float64Array;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
public Vector2d transform(Vector2d v) {
return v.mul(this);
}
public Vector2d transform(Vector2dc v, Vector2d dest) {
v.mul(this, dest);
return dest;
}
public Vector2d transform(double x, double y, Vector2d dest) {
dest.set(m00 * x + m10 * y,
m01 * x + m11 * y);
return dest;
}
public Vector2d transformTranspose(Vector2d v) {
return v.mulTranspose(this);
}
public Vector2d transformTranspose(Vector2dc v, Vector2d dest) {
v.mulTranspose(this, dest);
return dest;
}
public Vector2d transformTranspose(double x, double y, Vector2d dest) {
dest.set(m00 * x + m01 * y,
m10 * x + m11 * y);
return dest;
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix2d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float64Array;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | }
public Vector2d transform(double x, double y, Vector2d dest) {
dest.set(m00 * x + m10 * y,
m01 * x + m11 * y);
return dest;
}
public Vector2d transformTranspose(Vector2d v) {
return v.mulTranspose(this);
}
public Vector2d transformTranspose(Vector2dc v, Vector2d dest) {
v.mulTranspose(this, dest);
return dest;
}
public Vector2d transformTranspose(double x, double y, Vector2d dest) {
dest.set(m00 * x + m01 * y,
m10 * x + m11 * y);
return dest;
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(m00);
out.writeDouble(m01);
out.writeDouble(m10);
out.writeDouble(m11);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix2d.java
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import com.google.gwt.typedarrays.shared.Float64Array;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
}
public Vector2d transform(double x, double y, Vector2d dest) {
dest.set(m00 * x + m10 * y,
m01 * x + m11 * y);
return dest;
}
public Vector2d transformTranspose(Vector2d v) {
return v.mulTranspose(this);
}
public Vector2d transformTranspose(Vector2dc v, Vector2d dest) {
v.mulTranspose(this, dest);
return dest;
}
public Vector2d transformTranspose(double x, double y, Vector2d dest) {
dest.set(m00 * x + m01 * y,
m10 * x + m11 * y);
return dest;
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(m00);
out.writeDouble(m01);
out.writeDouble(m10);
out.writeDouble(m11);
}
| public void readExternal(ObjectInput in) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix4d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | *
* @return the string representation
*/
public String toString() {
String str = toString(Options.NUMBER_FORMAT);
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
/**
* Return a string representation of this matrix by formatting the matrix elements with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the matrix values with
* @return the string representation
*/ | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix4d.java
import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
*
* @return the string representation
*/
public String toString() {
String str = toString(Options.NUMBER_FORMAT);
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
/**
* Return a string representation of this matrix by formatting the matrix elements with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the matrix values with
* @return the string representation
*/ | public String toString(NumberFormat formatter) { |
JOML-CI/JOML | src/org/joml/Matrix4d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | return dest;
}
/**
* Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Z axis.
* <p>
* When used with a right-handed coordinate system, the produced rotation will rotate a vector
* counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin.
* When used with a left-handed coordinate system, the rotation is clockwise.
* <p>
* If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix,
* then the new matrix will be <code>R * M</code>. So when transforming a
* vector <code>v</code> with the new matrix by using <code>R * M * v</code>, the
* rotation will be applied last!
* <p>
* In order to set the matrix to a rotation matrix without pre-multiplying the rotation
* transformation, use {@link #rotationZ(double) rotationY()}.
* <p>
* Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>
*
* @see #rotationY(double)
*
* @param ang
* the angle in radians to rotate about the Z axis
* @return this
*/
public Matrix4d rotateLocalZ(double ang) {
return rotateLocalZ(ang, this);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix4d.java
import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
return dest;
}
/**
* Pre-multiply a rotation to this matrix by rotating the given amount of radians about the Z axis.
* <p>
* When used with a right-handed coordinate system, the produced rotation will rotate a vector
* counter-clockwise around the rotation axis, when viewing along the negative axis direction towards the origin.
* When used with a left-handed coordinate system, the rotation is clockwise.
* <p>
* If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix,
* then the new matrix will be <code>R * M</code>. So when transforming a
* vector <code>v</code> with the new matrix by using <code>R * M * v</code>, the
* rotation will be applied last!
* <p>
* In order to set the matrix to a rotation matrix without pre-multiplying the rotation
* transformation, use {@link #rotationZ(double) rotationY()}.
* <p>
* Reference: <a href="http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle">http://en.wikipedia.org</a>
*
* @see #rotationY(double)
*
* @param ang
* the angle in radians to rotate about the Z axis
* @return this
*/
public Matrix4d rotateLocalZ(double ang) {
return rotateLocalZ(ang, this);
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix4d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | *
* @see #rotationY(double)
*
* @param ang
* the angle in radians to rotate about the Z axis
* @return this
*/
public Matrix4d rotateLocalZ(double ang) {
return rotateLocalZ(ang, this);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(m00);
out.writeDouble(m01);
out.writeDouble(m02);
out.writeDouble(m03);
out.writeDouble(m10);
out.writeDouble(m11);
out.writeDouble(m12);
out.writeDouble(m13);
out.writeDouble(m20);
out.writeDouble(m21);
out.writeDouble(m22);
out.writeDouble(m23);
out.writeDouble(m30);
out.writeDouble(m31);
out.writeDouble(m32);
out.writeDouble(m33);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix4d.java
import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
*
* @see #rotationY(double)
*
* @param ang
* the angle in radians to rotate about the Z axis
* @return this
*/
public Matrix4d rotateLocalZ(double ang) {
return rotateLocalZ(ang, this);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(m00);
out.writeDouble(m01);
out.writeDouble(m02);
out.writeDouble(m03);
out.writeDouble(m10);
out.writeDouble(m11);
out.writeDouble(m12);
out.writeDouble(m13);
out.writeDouble(m20);
out.writeDouble(m21);
out.writeDouble(m22);
out.writeDouble(m23);
out.writeDouble(m30);
out.writeDouble(m31);
out.writeDouble(m32);
out.writeDouble(m33);
}
| public void readExternal(ObjectInput in) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix4x3d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | *
* @return the string representation
*/
public String toString() {
String str = toString(Options.NUMBER_FORMAT);
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
/**
* Return a string representation of this matrix by formatting the matrix elements with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the matrix values with
* @return the string representation
*/ | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix4x3d.java
import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
*
* @return the string representation
*/
public String toString() {
String str = toString(Options.NUMBER_FORMAT);
StringBuffer res = new StringBuffer();
int eIndex = Integer.MIN_VALUE;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == 'E') {
eIndex = i;
} else if (c == ' ' && eIndex == i - 1) {
// workaround Java 1.4 DecimalFormat bug
res.append('+');
continue;
} else if (Character.isDigit(c) && eIndex == i - 1) {
res.append('+');
}
res.append(c);
}
return res.toString();
}
/**
* Return a string representation of this matrix by formatting the matrix elements with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the matrix values with
* @return the string representation
*/ | public String toString(NumberFormat formatter) { |
JOML-CI/JOML | src/org/joml/Matrix4x3d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | dest.properties = properties & ~(PROPERTY_IDENTITY);
return dest;
}
/**
* Pre-multiply a translation to this matrix by translating by the given number of
* units in x, y and z.
* <p>
* If <code>M</code> is <code>this</code> matrix and <code>T</code> the translation
* matrix, then the new matrix will be <code>T * M</code>. So when
* transforming a vector <code>v</code> with the new matrix by using
* <code>T * M * v</code>, the translation will be applied last!
* <p>
* In order to set the matrix to a translation transformation without pre-multiplying
* it, use {@link #translation(double, double, double)}.
*
* @see #translation(double, double, double)
*
* @param x
* the offset to translate in x
* @param y
* the offset to translate in y
* @param z
* the offset to translate in z
* @return this
*/
public Matrix4x3d translateLocal(double x, double y, double z) {
return translateLocal(x, y, z, this);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix4x3d.java
import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
dest.properties = properties & ~(PROPERTY_IDENTITY);
return dest;
}
/**
* Pre-multiply a translation to this matrix by translating by the given number of
* units in x, y and z.
* <p>
* If <code>M</code> is <code>this</code> matrix and <code>T</code> the translation
* matrix, then the new matrix will be <code>T * M</code>. So when
* transforming a vector <code>v</code> with the new matrix by using
* <code>T * M * v</code>, the translation will be applied last!
* <p>
* In order to set the matrix to a translation transformation without pre-multiplying
* it, use {@link #translation(double, double, double)}.
*
* @see #translation(double, double, double)
*
* @param x
* the offset to translate in x
* @param y
* the offset to translate in y
* @param z
* the offset to translate in z
* @return this
*/
public Matrix4x3d translateLocal(double x, double y, double z) {
return translateLocal(x, y, z, this);
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix4x3d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer; | *
* @see #translation(double, double, double)
*
* @param x
* the offset to translate in x
* @param y
* the offset to translate in y
* @param z
* the offset to translate in z
* @return this
*/
public Matrix4x3d translateLocal(double x, double y, double z) {
return translateLocal(x, y, z, this);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(m00);
out.writeDouble(m01);
out.writeDouble(m02);
out.writeDouble(m10);
out.writeDouble(m11);
out.writeDouble(m12);
out.writeDouble(m20);
out.writeDouble(m21);
out.writeDouble(m22);
out.writeDouble(m30);
out.writeDouble(m31);
out.writeDouble(m32);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Matrix4x3d.java
import java.nio.FloatBuffer;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
*
* @see #translation(double, double, double)
*
* @param x
* the offset to translate in x
* @param y
* the offset to translate in y
* @param z
* the offset to translate in z
* @return this
*/
public Matrix4x3d translateLocal(double x, double y, double z) {
return translateLocal(x, y, z, this);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(m00);
out.writeDouble(m01);
out.writeDouble(m02);
out.writeDouble(m10);
out.writeDouble(m11);
out.writeDouble(m12);
out.writeDouble(m20);
out.writeDouble(m21);
out.writeDouble(m22);
out.writeDouble(m30);
out.writeDouble(m31);
out.writeDouble(m32);
}
| public void readExternal(ObjectInput in) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix4fStack.java | // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
| import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput; | result = prime * result + mats[i].hashCode();
}
return result;
}
/*
* Contract between Matrix4f and Matrix4fStack:
*
* - Matrix4f.equals(Matrix4fStack) is true iff all the 16 matrix elements are equal
* - Matrix4fStack.equals(Matrix4f) is true iff all the 16 matrix elements are equal
* - Matrix4fStack.equals(Matrix4fStack) is true iff all 16 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix4fStack) {
Matrix4fStack other = (Matrix4fStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
| // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
// Path: src/org/joml/Matrix4fStack.java
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
result = prime * result + mats[i].hashCode();
}
return result;
}
/*
* Contract between Matrix4f and Matrix4fStack:
*
* - Matrix4f.equals(Matrix4fStack) is true iff all the 16 matrix elements are equal
* - Matrix4fStack.equals(Matrix4f) is true iff all the 16 matrix elements are equal
* - Matrix4fStack.equals(Matrix4fStack) is true iff all 16 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix4fStack) {
Matrix4fStack other = (Matrix4fStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Matrix4fStack.java | // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
| import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput; | * - Matrix4f.equals(Matrix4fStack) is true iff all the 16 matrix elements are equal
* - Matrix4fStack.equals(Matrix4f) is true iff all the 16 matrix elements are equal
* - Matrix4fStack.equals(Matrix4fStack) is true iff all 16 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix4fStack) {
Matrix4fStack other = (Matrix4fStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal(out);
out.writeInt(curr);
for (int i = 0; i < curr; i++) {
out.writeObject(mats[i]);
}
}
| // Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
// Path: src/org/joml/Matrix4fStack.java
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
* - Matrix4f.equals(Matrix4fStack) is true iff all the 16 matrix elements are equal
* - Matrix4fStack.equals(Matrix4f) is true iff all the 16 matrix elements are equal
* - Matrix4fStack.equals(Matrix4fStack) is true iff all 16 matrix elements are equal AND the matrix arrays as well as the stack pointer are equal
* - everything else is inequal
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (obj instanceof Matrix4fStack) {
Matrix4fStack other = (Matrix4fStack) obj;
if (curr != other.curr)
return false;
for (int i = 0; i < curr; i++) {
if (!mats[i].equals(other.mats[i]))
return false;
}
}
return true;
}
public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal(out);
out.writeInt(curr);
for (int i = 0; i < curr; i++) {
out.writeObject(mats[i]);
}
}
| public void readExternal(ObjectInput in) throws IOException { |
JOML-CI/JOML | src/org/joml/Vector3d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.*; | /**
* Set all components to zero.
*
* @return this
*/
public Vector3d zero() {
this.x = 0;
this.y = 0;
this.z = 0;
return this;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector3d.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.*;
/**
* Set all components to zero.
*
* @return this
*/
public Vector3d zero() {
this.x = 0;
this.y = 0;
this.z = 0;
return this;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | public String toString(NumberFormat formatter) { |
JOML-CI/JOML | src/org/joml/Vector3d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.*; | */
public Vector3d zero() {
this.x = 0;
this.y = 0;
this.z = 0;
return this;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + ")";
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector3d.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.*;
*/
public Vector3d zero() {
this.x = 0;
this.y = 0;
this.z = 0;
return this;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + ")";
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Vector3d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.*; | }
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + ")";
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(x);
out.writeDouble(y);
out.writeDouble(z);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector3d.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.*;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + ")";
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(x);
out.writeDouble(y);
out.writeDouble(z);
}
| public void readExternal(ObjectInput in) throws IOException, |
JOML-CI/JOML | test/org/joml/experimental/test/Vector4faTest.java | // Path: src/org/joml/experimental/Vector4fa.java
// public class Vector4fa {
// private final float[] arr = new float[4];
//
// public Vector4fa() {
// arr[3] = 1;
// }
//
// public Vector4fa(float x, float y, float z, float w) {
// arr[0] = x;
// arr[1] = y;
// arr[2] = z;
// arr[3] = w;
// }
//
// public Vector4fa add(Vector4fa v) {
// FloatVector.fromArray(FloatVector.SPECIES_128, arr, 0)
// .add(FloatVector.fromArray(FloatVector.SPECIES_128, v.arr, 0))
// .intoArray(arr, 0);
// return this;
// }
//
// public int hashCode() {
// final int prime = 31;
// int result = 1;
// result = prime * result + Float.floatToIntBits(arr[0]);
// result = prime * result + Float.floatToIntBits(arr[1]);
// result = prime * result + Float.floatToIntBits(arr[2]);
// result = prime * result + Float.floatToIntBits(arr[3]);
// return result;
// }
//
// public boolean equals(Object obj) {
// if (this == obj)
// return true;
// if (obj == null)
// return false;
// if (getClass() != obj.getClass())
// return false;
// Vector4fa other = (Vector4fa) obj;
// return equals(other.arr[0], other.arr[1], other.arr[2], other.arr[3]);
// }
//
// public boolean equals(Vector4fa v, float delta) {
// if (this == v)
// return true;
// if (v == null)
// return false;
// if (!Runtime.equals(arr[0], v.arr[0], delta))
// return false;
// if (!Runtime.equals(arr[1], v.arr[1], delta))
// return false;
// if (!Runtime.equals(arr[2], v.arr[2], delta))
// return false;
// if (!Runtime.equals(arr[3], v.arr[3], delta))
// return false;
// return true;
// }
//
// public boolean equals(float x, float y, float z, float w) {
// if (Float.floatToIntBits(arr[0]) != Float.floatToIntBits(x))
// return false;
// if (Float.floatToIntBits(arr[1]) != Float.floatToIntBits(y))
// return false;
// if (Float.floatToIntBits(arr[2]) != Float.floatToIntBits(z))
// return false;
// if (Float.floatToIntBits(arr[3]) != Float.floatToIntBits(w))
// return false;
// return true;
// }
//
// public String toString() {
// return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
// }
//
// public String toString(NumberFormat formatter) {
// return "(" + Runtime.format(arr[0], formatter) + " " + Runtime.format(arr[1], formatter) + " " + Runtime.format(arr[2], formatter) + " " + Runtime.format(arr[3], formatter) + ")";
// }
// }
| import org.joml.experimental.Vector4fa;
import junit.framework.TestCase; | /*
* The MIT License
*
* Copyright (c) 2021 JOML.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
//#ifdef __HAS_VECTOR_API__
package org.joml.experimental.test;
public class Vector4faTest extends TestCase {
public void testAdd() { | // Path: src/org/joml/experimental/Vector4fa.java
// public class Vector4fa {
// private final float[] arr = new float[4];
//
// public Vector4fa() {
// arr[3] = 1;
// }
//
// public Vector4fa(float x, float y, float z, float w) {
// arr[0] = x;
// arr[1] = y;
// arr[2] = z;
// arr[3] = w;
// }
//
// public Vector4fa add(Vector4fa v) {
// FloatVector.fromArray(FloatVector.SPECIES_128, arr, 0)
// .add(FloatVector.fromArray(FloatVector.SPECIES_128, v.arr, 0))
// .intoArray(arr, 0);
// return this;
// }
//
// public int hashCode() {
// final int prime = 31;
// int result = 1;
// result = prime * result + Float.floatToIntBits(arr[0]);
// result = prime * result + Float.floatToIntBits(arr[1]);
// result = prime * result + Float.floatToIntBits(arr[2]);
// result = prime * result + Float.floatToIntBits(arr[3]);
// return result;
// }
//
// public boolean equals(Object obj) {
// if (this == obj)
// return true;
// if (obj == null)
// return false;
// if (getClass() != obj.getClass())
// return false;
// Vector4fa other = (Vector4fa) obj;
// return equals(other.arr[0], other.arr[1], other.arr[2], other.arr[3]);
// }
//
// public boolean equals(Vector4fa v, float delta) {
// if (this == v)
// return true;
// if (v == null)
// return false;
// if (!Runtime.equals(arr[0], v.arr[0], delta))
// return false;
// if (!Runtime.equals(arr[1], v.arr[1], delta))
// return false;
// if (!Runtime.equals(arr[2], v.arr[2], delta))
// return false;
// if (!Runtime.equals(arr[3], v.arr[3], delta))
// return false;
// return true;
// }
//
// public boolean equals(float x, float y, float z, float w) {
// if (Float.floatToIntBits(arr[0]) != Float.floatToIntBits(x))
// return false;
// if (Float.floatToIntBits(arr[1]) != Float.floatToIntBits(y))
// return false;
// if (Float.floatToIntBits(arr[2]) != Float.floatToIntBits(z))
// return false;
// if (Float.floatToIntBits(arr[3]) != Float.floatToIntBits(w))
// return false;
// return true;
// }
//
// public String toString() {
// return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
// }
//
// public String toString(NumberFormat formatter) {
// return "(" + Runtime.format(arr[0], formatter) + " " + Runtime.format(arr[1], formatter) + " " + Runtime.format(arr[2], formatter) + " " + Runtime.format(arr[3], formatter) + ")";
// }
// }
// Path: test/org/joml/experimental/test/Vector4faTest.java
import org.joml.experimental.Vector4fa;
import junit.framework.TestCase;
/*
* The MIT License
*
* Copyright (c) 2021 JOML.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
//#ifdef __HAS_VECTOR_API__
package org.joml.experimental.test;
public class Vector4faTest extends TestCase {
public void testAdd() { | Vector4fa v1 = new Vector4fa(1, 2, 3, 4); |
JOML-CI/JOML | src/org/joml/Vector3f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | /**
* Set all components to zero.
*
* @return this
*/
public Vector3f zero() {
this.x = 0;
this.y = 0;
this.z = 0;
return this;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector3f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
/**
* Set all components to zero.
*
* @return this
*/
public Vector3f zero() {
this.x = 0;
this.y = 0;
this.z = 0;
return this;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | public String toString(NumberFormat formatter) { |
JOML-CI/JOML | src/org/joml/Vector3f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | */
public Vector3f zero() {
this.x = 0;
this.y = 0;
this.z = 0;
return this;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + ")";
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector3f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
*/
public Vector3f zero() {
this.x = 0;
this.y = 0;
this.z = 0;
return this;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + ")";
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Vector3f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | }
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + ")";
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(x);
out.writeFloat(y);
out.writeFloat(z);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector3f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + ")";
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(x);
out.writeFloat(y);
out.writeFloat(z);
}
| public void readExternal(ObjectInput in) throws IOException, |
JOML-CI/JOML | src/org/joml/AxisAngle4d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat; | * @param m
* the matrix to set
* @return m
*/
public Matrix3d get(Matrix3d m) {
return m.set(this);
}
/**
* Set the given {@link AxisAngle4d} to this {@link AxisAngle4d}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4d get(AxisAngle4d dest) {
return dest.set(this);
}
/**
* Set the given {@link AxisAngle4f} to this {@link AxisAngle4d}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4f get(AxisAngle4f dest) {
return dest.set(this);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/AxisAngle4d.java
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
* @param m
* the matrix to set
* @return m
*/
public Matrix3d get(Matrix3d m) {
return m.set(this);
}
/**
* Set the given {@link AxisAngle4d} to this {@link AxisAngle4d}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4d get(AxisAngle4d dest) {
return dest.set(this);
}
/**
* Set the given {@link AxisAngle4f} to this {@link AxisAngle4d}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4f get(AxisAngle4f dest) {
return dest.set(this);
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/AxisAngle4d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat; |
/**
* Set the given {@link AxisAngle4d} to this {@link AxisAngle4d}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4d get(AxisAngle4d dest) {
return dest.set(this);
}
/**
* Set the given {@link AxisAngle4f} to this {@link AxisAngle4d}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4f get(AxisAngle4f dest) {
return dest.set(this);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(angle);
out.writeDouble(x);
out.writeDouble(y);
out.writeDouble(z);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/AxisAngle4d.java
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
/**
* Set the given {@link AxisAngle4d} to this {@link AxisAngle4d}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4d get(AxisAngle4d dest) {
return dest.set(this);
}
/**
* Set the given {@link AxisAngle4f} to this {@link AxisAngle4d}.
*
* @param dest
* will hold the result
* @return dest
*/
public AxisAngle4f get(AxisAngle4f dest) {
return dest.set(this);
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeDouble(angle);
out.writeDouble(x);
out.writeDouble(y);
out.writeDouble(z);
}
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { |
JOML-CI/JOML | src/org/joml/AxisAngle4d.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat; | */
public Vector4d transform(Vector4dc v, Vector4d dest) {
double sin = Math.sin(angle);
double cos = Math.cosFromSin(sin, angle);
double dot = x * v.x() + y * v.y() + z * v.z();
dest.set(v.x() * cos + sin * (y * v.z() - z * v.y()) + (1.0 - cos) * dot * x,
v.y() * cos + sin * (z * v.x() - x * v.z()) + (1.0 - cos) * dot * y,
v.z() * cos + sin * (x * v.y() - y * v.x()) + (1.0 - cos) * dot * z,
dest.w);
return dest;
}
/**
* Return a string representation of this {@link AxisAngle4d}.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code> 0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this {@link AxisAngle4d} by formatting the components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/AxisAngle4d.java
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.text.DecimalFormat;
import java.text.NumberFormat;
*/
public Vector4d transform(Vector4dc v, Vector4d dest) {
double sin = Math.sin(angle);
double cos = Math.cosFromSin(sin, angle);
double dot = x * v.x() + y * v.y() + z * v.z();
dest.set(v.x() * cos + sin * (y * v.z() - z * v.y()) + (1.0 - cos) * dot * x,
v.y() * cos + sin * (z * v.x() - x * v.z()) + (1.0 - cos) * dot * y,
v.z() * cos + sin * (x * v.y() - y * v.x()) + (1.0 - cos) * dot * z,
dest.w);
return dest;
}
/**
* Return a string representation of this {@link AxisAngle4d}.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code> 0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this {@link AxisAngle4d} by formatting the components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | public String toString(NumberFormat formatter) { |
JOML-CI/JOML | src/org/joml/Vector4f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | this.w = -w;
return this;
}
public Vector4f negate(Vector4f dest) {
dest.x = -x;
dest.y = -y;
dest.z = -z;
dest.w = -w;
return dest;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector4f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
this.w = -w;
return this;
}
public Vector4f negate(Vector4f dest) {
dest.x = -x;
dest.y = -y;
dest.z = -z;
dest.w = -w;
return dest;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/ | public String toString(NumberFormat formatter) { |
JOML-CI/JOML | src/org/joml/Vector4f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; | public Vector4f negate(Vector4f dest) {
dest.x = -x;
dest.y = -y;
dest.z = -z;
dest.w = -w;
return dest;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + " " + Runtime.format(w, formatter) + ")";
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector4f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
public Vector4f negate(Vector4f dest) {
dest.x = -x;
dest.y = -y;
dest.z = -z;
dest.w = -w;
return dest;
}
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + " " + Runtime.format(w, formatter) + ")";
}
| public void writeExternal(ObjectOutput out) throws IOException { |
JOML-CI/JOML | src/org/joml/Vector4f.java | // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
| import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer; |
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + " " + Runtime.format(w, formatter) + ")";
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(x);
out.writeFloat(y);
out.writeFloat(z);
out.writeFloat(w);
}
| // Path: src/org/joml/jre/java/io/Externalizable.java
// public interface Externalizable extends java.io.Serializable {
// void writeExternal(ObjectOutput out) throws IOException;
// void readExternal(ObjectInput in) throws IOException, ClassNotFoundException;
// }
//
// Path: src/org/joml/jre/java/io/ObjectInput.java
// public interface ObjectInput extends DataOutput {
//
// double readDouble() throws IOException;
// float readFloat() throws IOException;
// int readInt() throws IOException;
//
// }
//
// Path: src/org/joml/jre/java/io/ObjectOutput.java
// public interface ObjectOutput extends DataOutput {
// void writeObject(Object obj);
// }
//
// Path: src/org/joml/jre/java/text/DecimalFormat.java
// public class DecimalFormat extends NumberFormat {
//
// public DecimalFormat() {
// }
// public DecimalFormat(String pattern) {
// }
// public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
// }
//
// public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Number parse(String source, ParsePosition parsePosition) {
// return null;
// }
// public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
// return null;
// }
// public Object parseObject(String source, ParsePosition pos) {
// return null;
// }
//
// }
//
// Path: src/org/joml/jre/java/text/NumberFormat.java
// public abstract class NumberFormat extends Format {
// public final String format(double number) {
// return Double.toString(number);
// }
// public final String format(long number) {
// return Long.toString(number);
// }
// }
// Path: src/org/joml/Vector4f.java
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
/**
* Return a string representation of this vector.
* <p>
* This method creates a new {@link DecimalFormat} on every invocation with the format string "<code>0.000E0;-</code>".
*
* @return the string representation
*/
public String toString() {
return Runtime.formatNumbers(toString(Options.NUMBER_FORMAT));
}
/**
* Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
*
* @param formatter
* the {@link NumberFormat} used to format the vector components with
* @return the string representation
*/
public String toString(NumberFormat formatter) {
return "(" + Runtime.format(x, formatter) + " " + Runtime.format(y, formatter) + " " + Runtime.format(z, formatter) + " " + Runtime.format(w, formatter) + ")";
}
public void writeExternal(ObjectOutput out) throws IOException {
out.writeFloat(x);
out.writeFloat(y);
out.writeFloat(z);
out.writeFloat(w);
}
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/ProjectConversionType.java
// public enum ProjectConversionType {
// TO_STANDARD(false), TO_COMPOSITE(true);
//
// private final boolean isTargetedProjectComposite;
//
// private ProjectConversionType (boolean isTargetedProjectComposite) {
// this.isTargetedProjectComposite= isTargetedProjectComposite;
// }
//
// public boolean isTargetedProjectComposite() {
// return isTargetedProjectComposite;
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
| import org.apache.commons.lang.StringUtils;
import org.ktc.soapui.maven.extension.impl.ProjectConversionType;
import org.ktc.soapui.maven.extension.impl.RunnerType; | /*
* Copyright 2012 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.enums;
// needed because maven 2.2.1 does not support enum parameter
// this let us provide convenient error message to end user (available enum values)
public class EnumConverter {
public static ProjectConversionType toProjectConversionType(String value) {
try {
return ProjectConversionType.valueOf(value);
} catch (RuntimeException e) {
throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
+ buildEnumValuesToString(ProjectConversionType.values()) + "", e);
}
}
| // Path: src/main/java/org/ktc/soapui/maven/extension/impl/ProjectConversionType.java
// public enum ProjectConversionType {
// TO_STANDARD(false), TO_COMPOSITE(true);
//
// private final boolean isTargetedProjectComposite;
//
// private ProjectConversionType (boolean isTargetedProjectComposite) {
// this.isTargetedProjectComposite= isTargetedProjectComposite;
// }
//
// public boolean isTargetedProjectComposite() {
// return isTargetedProjectComposite;
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
import org.apache.commons.lang.StringUtils;
import org.ktc.soapui.maven.extension.impl.ProjectConversionType;
import org.ktc.soapui.maven.extension.impl.RunnerType;
/*
* Copyright 2012 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.enums;
// needed because maven 2.2.1 does not support enum parameter
// this let us provide convenient error message to end user (available enum values)
public class EnumConverter {
public static ProjectConversionType toProjectConversionType(String value) {
try {
return ProjectConversionType.valueOf(value);
} catch (RuntimeException e) {
throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
+ buildEnumValuesToString(ProjectConversionType.values()) + "", e);
}
}
| public static RunnerType toRunnerType(String value) { |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/impl/runner/SoapUIExtensionTestCaseRunner.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/report/ReportCollectorFactory.java
// public class ReportCollectorFactory {
// private static final Logger log = Logger.getLogger(ReportCollectorFactory.class);
//
// // TODO manage maxErrors
// // currently do not use it as SmartBear JUnitSecurityReportCollector have no constuctor with int argument
// public static JUnitSecurityReportCollector newReportCollector() {
// String className = System.getProperty("soapui.junit.reportCollector", null);
// if (StringUtils.isNotBlank(className)) {
// try {
// return (JUnitSecurityReportCollector) Class.forName(className).getConstructor().newInstance();
// } catch (Exception e) {
// log.warn("Failed to create JUnitReportCollector class [" + className + "] so use the default one;"
// + " error cause: " + e.toString());
// }
// }
// return new JUnitSecurityReportCollector();
// }
//
// }
| import com.eviware.soapui.impl.wsdl.WsdlProject;
import com.eviware.soapui.report.JUnitSecurityReportCollector;
import com.eviware.soapui.tools.SoapUITestCaseRunner;
import org.ktc.soapui.maven.extension.impl.report.ReportCollectorFactory; | /*
* Copyright 2013-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner;
public class SoapUIExtensionTestCaseRunner extends SoapUITestCaseRunner {
private String[] testSuiteProperties = {};
public SoapUIExtensionTestCaseRunner() {
super();
}
public SoapUIExtensionTestCaseRunner(String title) {
super(title);
}
public void setTestSuiteProperties(String[] testSuiteProperties) {
this.testSuiteProperties = testSuiteProperties;
}
@Override
protected void initProject(WsdlProject project) throws Exception {
super.initProject(project);
initTestSuiteProperties(project);
}
private void initTestSuiteProperties(WsdlProject project) {
TestSuitePropertiesModifier.overrideTestSuiteProperties(project, testSuiteProperties);
}
@Override
protected JUnitSecurityReportCollector createJUnitSecurityReportCollector() { | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/report/ReportCollectorFactory.java
// public class ReportCollectorFactory {
// private static final Logger log = Logger.getLogger(ReportCollectorFactory.class);
//
// // TODO manage maxErrors
// // currently do not use it as SmartBear JUnitSecurityReportCollector have no constuctor with int argument
// public static JUnitSecurityReportCollector newReportCollector() {
// String className = System.getProperty("soapui.junit.reportCollector", null);
// if (StringUtils.isNotBlank(className)) {
// try {
// return (JUnitSecurityReportCollector) Class.forName(className).getConstructor().newInstance();
// } catch (Exception e) {
// log.warn("Failed to create JUnitReportCollector class [" + className + "] so use the default one;"
// + " error cause: " + e.toString());
// }
// }
// return new JUnitSecurityReportCollector();
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/SoapUIExtensionTestCaseRunner.java
import com.eviware.soapui.impl.wsdl.WsdlProject;
import com.eviware.soapui.report.JUnitSecurityReportCollector;
import com.eviware.soapui.tools.SoapUITestCaseRunner;
import org.ktc.soapui.maven.extension.impl.report.ReportCollectorFactory;
/*
* Copyright 2013-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner;
public class SoapUIExtensionTestCaseRunner extends SoapUITestCaseRunner {
private String[] testSuiteProperties = {};
public SoapUIExtensionTestCaseRunner() {
super();
}
public SoapUIExtensionTestCaseRunner(String title) {
super(title);
}
public void setTestSuiteProperties(String[] testSuiteProperties) {
this.testSuiteProperties = testSuiteProperties;
}
@Override
protected void initProject(WsdlProject project) throws Exception {
super.initProject(project);
initTestSuiteProperties(project);
}
private void initTestSuiteProperties(WsdlProject project) {
TestSuitePropertiesModifier.overrideTestSuiteProperties(project, testSuiteProperties);
}
@Override
protected JUnitSecurityReportCollector createJUnitSecurityReportCollector() { | return ReportCollectorFactory.newReportCollector(); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/AbstractSoapuiMojo.java | // Path: src/main/java-templates/org/ktc/soapui/maven/extension/impl/ProjectInfo.java
// public class ProjectInfo {
//
// public static String getName() {
// return "${project.artifactId}";
// }
//
// public static String getVersion() {
// return "${project.version}";
// }
//
// public static String getFullVersion() {
// return getVersion() + " (${buildnumber-scm-changeset}; ${buildnumber-date})";
// }
//
// public static String getSoapuiVersion() {
// return "${soapuiVersionCurrent}";
// }
//
// }
| import org.apache.maven.model.Build;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import org.ktc.soapui.maven.extension.impl.ProjectInfo; | /*
* Copyright 2012 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public abstract class AbstractSoapuiMojo extends AbstractMojo {
protected MavenProject project;
protected abstract void performExecute() throws MojoExecutionException, MojoFailureException;
@Override
public final void execute() throws MojoExecutionException, MojoFailureException { | // Path: src/main/java-templates/org/ktc/soapui/maven/extension/impl/ProjectInfo.java
// public class ProjectInfo {
//
// public static String getName() {
// return "${project.artifactId}";
// }
//
// public static String getVersion() {
// return "${project.version}";
// }
//
// public static String getFullVersion() {
// return getVersion() + " (${buildnumber-scm-changeset}; ${buildnumber-date})";
// }
//
// public static String getSoapuiVersion() {
// return "${soapuiVersionCurrent}";
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/AbstractSoapuiMojo.java
import org.apache.maven.model.Build;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import org.ktc.soapui.maven.extension.impl.ProjectInfo;
/*
* Copyright 2012 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public abstract class AbstractSoapuiMojo extends AbstractMojo {
protected MavenProject project;
protected abstract void performExecute() throws MojoExecutionException, MojoFailureException;
@Override
public final void execute() throws MojoExecutionException, MojoFailureException { | getLog().info("You are using " + ProjectInfo.getName() + " " + ProjectInfo.getFullVersion()); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/ConvertProjectMojo.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/ProjectConversionType.java
// public enum ProjectConversionType {
// TO_STANDARD(false), TO_COMPOSITE(true);
//
// private final boolean isTargetedProjectComposite;
//
// private ProjectConversionType (boolean isTargetedProjectComposite) {
// this.isTargetedProjectComposite= isTargetedProjectComposite;
// }
//
// public boolean isTargetedProjectComposite() {
// return isTargetedProjectComposite;
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
| import com.eviware.soapui.impl.wsdl.WsdlProjectPro;
import java.io.File;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.ktc.soapui.maven.extension.impl.ProjectConversionType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter; | /*
* Copyright 2012 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class ConvertProjectMojo extends AbstractSoapuiMojo {
private File inputProject;
private File outputProject;
private String conversionType;
@Override
public void performExecute() throws MojoExecutionException, MojoFailureException {
getLog().info("Converting project " + conversionType);
getLog().info("from " + inputProject);
getLog().info("to " + outputProject);
| // Path: src/main/java/org/ktc/soapui/maven/extension/impl/ProjectConversionType.java
// public enum ProjectConversionType {
// TO_STANDARD(false), TO_COMPOSITE(true);
//
// private final boolean isTargetedProjectComposite;
//
// private ProjectConversionType (boolean isTargetedProjectComposite) {
// this.isTargetedProjectComposite= isTargetedProjectComposite;
// }
//
// public boolean isTargetedProjectComposite() {
// return isTargetedProjectComposite;
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/ConvertProjectMojo.java
import com.eviware.soapui.impl.wsdl.WsdlProjectPro;
import java.io.File;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.ktc.soapui.maven.extension.impl.ProjectConversionType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter;
/*
* Copyright 2012 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class ConvertProjectMojo extends AbstractSoapuiMojo {
private File inputProject;
private File outputProject;
private String conversionType;
@Override
public void performExecute() throws MojoExecutionException, MojoFailureException {
getLog().info("Converting project " + conversionType);
getLog().info("from " + inputProject);
getLog().info("to " + outputProject);
| ProjectConversionType conversionTypeEnum = EnumConverter.toProjectConversionType(conversionType); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/ConvertProjectMojo.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/ProjectConversionType.java
// public enum ProjectConversionType {
// TO_STANDARD(false), TO_COMPOSITE(true);
//
// private final boolean isTargetedProjectComposite;
//
// private ProjectConversionType (boolean isTargetedProjectComposite) {
// this.isTargetedProjectComposite= isTargetedProjectComposite;
// }
//
// public boolean isTargetedProjectComposite() {
// return isTargetedProjectComposite;
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
| import com.eviware.soapui.impl.wsdl.WsdlProjectPro;
import java.io.File;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.ktc.soapui.maven.extension.impl.ProjectConversionType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter; | /*
* Copyright 2012 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class ConvertProjectMojo extends AbstractSoapuiMojo {
private File inputProject;
private File outputProject;
private String conversionType;
@Override
public void performExecute() throws MojoExecutionException, MojoFailureException {
getLog().info("Converting project " + conversionType);
getLog().info("from " + inputProject);
getLog().info("to " + outputProject);
| // Path: src/main/java/org/ktc/soapui/maven/extension/impl/ProjectConversionType.java
// public enum ProjectConversionType {
// TO_STANDARD(false), TO_COMPOSITE(true);
//
// private final boolean isTargetedProjectComposite;
//
// private ProjectConversionType (boolean isTargetedProjectComposite) {
// this.isTargetedProjectComposite= isTargetedProjectComposite;
// }
//
// public boolean isTargetedProjectComposite() {
// return isTargetedProjectComposite;
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/ConvertProjectMojo.java
import com.eviware.soapui.impl.wsdl.WsdlProjectPro;
import java.io.File;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.ktc.soapui.maven.extension.impl.ProjectConversionType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter;
/*
* Copyright 2012 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class ConvertProjectMojo extends AbstractSoapuiMojo {
private File inputProject;
private File outputProject;
private String conversionType;
@Override
public void performExecute() throws MojoExecutionException, MojoFailureException {
getLog().info("Converting project " + conversionType);
getLog().info("from " + inputProject);
getLog().info("to " + outputProject);
| ProjectConversionType conversionTypeEnum = EnumConverter.toProjectConversionType(conversionType); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/MockAsWarMojo.java | // Path: src/main/java-templates/org/ktc/soapui/maven/extension/impl/ProjectInfo.java
// public class ProjectInfo {
//
// public static String getName() {
// return "${project.artifactId}";
// }
//
// public static String getVersion() {
// return "${project.version}";
// }
//
// public static String getFullVersion() {
// return getVersion() + " (${buildnumber-scm-changeset}; ${buildnumber-date})";
// }
//
// public static String getSoapuiVersion() {
// return "${soapuiVersionCurrent}";
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
| import static org.sonatype.aether.util.filter.DependencyFilterUtils.classpathFilter;
import com.eviware.soapui.tools.SoapUIMockAsWarGenerator;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.apache.maven.model.Build;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.ktc.soapui.maven.extension.impl.ProjectInfo;
import org.ktc.soapui.maven.extension.impl.RunnerType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter;
import org.sonatype.aether.RepositorySystem;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.collection.CollectRequest;
import org.sonatype.aether.graph.Dependency;
import org.sonatype.aether.repository.RemoteRepository;
import org.sonatype.aether.resolution.ArtifactResult;
import org.sonatype.aether.resolution.DependencyRequest;
import org.sonatype.aether.resolution.DependencyResolutionException;
import org.sonatype.aether.util.artifact.DefaultArtifact;
import org.sonatype.aether.util.artifact.JavaScopes; | warFile.getParentFile().mkdirs();
runner.setWarFile(warFile.getAbsolutePath());
}
// specific configuration
runner.setEnableWebUI(enableWebUI);
// runner.setLocalEndpoint(null);
// TODO related java system properties must be correctly set (add documentation)
// WARN the mock generator does not respect properties (it used directories in the soapui.home directory)
// runner.setIncludeActions(false);
// runner.setIncludeLibraries(false);
// runner.setIncludeListeners(false);
// TODO pro feature: include scripts
runner.run();
} catch (Exception e) {
getLog().debug(e);
throw new MojoFailureException("SoapUI has errors: " + e.getMessage(), e);
}
}
// TODO extend this: add a boolean parameter to specify if jars must be downloaded
// can create the /ext and /script (pro only?) directory
// if system properties are not set to configure the 2 directories, set them to use directories in soapui fake. This
// will avoid warning on soapui startup
// if the soapui.home property if already set, we should restore the initial value after the call of this mojo
private void buildSoapuiGuiEnvironment() throws DependencyResolutionException, IOException {
getLog().info("Building a SoapUI Gui environment");
| // Path: src/main/java-templates/org/ktc/soapui/maven/extension/impl/ProjectInfo.java
// public class ProjectInfo {
//
// public static String getName() {
// return "${project.artifactId}";
// }
//
// public static String getVersion() {
// return "${project.version}";
// }
//
// public static String getFullVersion() {
// return getVersion() + " (${buildnumber-scm-changeset}; ${buildnumber-date})";
// }
//
// public static String getSoapuiVersion() {
// return "${soapuiVersionCurrent}";
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/MockAsWarMojo.java
import static org.sonatype.aether.util.filter.DependencyFilterUtils.classpathFilter;
import com.eviware.soapui.tools.SoapUIMockAsWarGenerator;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.apache.maven.model.Build;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.ktc.soapui.maven.extension.impl.ProjectInfo;
import org.ktc.soapui.maven.extension.impl.RunnerType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter;
import org.sonatype.aether.RepositorySystem;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.collection.CollectRequest;
import org.sonatype.aether.graph.Dependency;
import org.sonatype.aether.repository.RemoteRepository;
import org.sonatype.aether.resolution.ArtifactResult;
import org.sonatype.aether.resolution.DependencyRequest;
import org.sonatype.aether.resolution.DependencyResolutionException;
import org.sonatype.aether.util.artifact.DefaultArtifact;
import org.sonatype.aether.util.artifact.JavaScopes;
warFile.getParentFile().mkdirs();
runner.setWarFile(warFile.getAbsolutePath());
}
// specific configuration
runner.setEnableWebUI(enableWebUI);
// runner.setLocalEndpoint(null);
// TODO related java system properties must be correctly set (add documentation)
// WARN the mock generator does not respect properties (it used directories in the soapui.home directory)
// runner.setIncludeActions(false);
// runner.setIncludeLibraries(false);
// runner.setIncludeListeners(false);
// TODO pro feature: include scripts
runner.run();
} catch (Exception e) {
getLog().debug(e);
throw new MojoFailureException("SoapUI has errors: " + e.getMessage(), e);
}
}
// TODO extend this: add a boolean parameter to specify if jars must be downloaded
// can create the /ext and /script (pro only?) directory
// if system properties are not set to configure the 2 directories, set them to use directories in soapui fake. This
// will avoid warning on soapui startup
// if the soapui.home property if already set, we should restore the initial value after the call of this mojo
private void buildSoapuiGuiEnvironment() throws DependencyResolutionException, IOException {
getLog().info("Building a SoapUI Gui environment");
| String version = ProjectInfo.getVersion(); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/MockServiceMojo.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/SoapUIProExtensionMockServiceRunner.java
// public class SoapUIProExtensionMockServiceRunner extends SoapUIProMockServiceRunner {
//
// private static final String COVERAGE_BUILDER_FIELD_NAME = "c";
//
// public SoapUIProExtensionMockServiceRunner() {
// super();
// }
//
// public SoapUIProExtensionMockServiceRunner(String title) {
// super(title);
// }
//
// public void activateCoverageReport(boolean activate) {
// if (activate) {
// setCoverageBuilder(new CoverageBuilder());
// }
// }
//
// // duplicated from SmartBear implementation has their pro mock runner defines its own outputFolder field that is
// // then not used by this method
// @Override
// public String getAbsoluteOutputFolder(ModelItem modelItem) {
// // use getter instead of calling the ouputFolder field directly
// String folder = PropertyExpander.expandProperties(modelItem, getOutputFolder());
//
// if (StringUtils.isNullOrEmpty(folder)) {
// folder = PathUtils.getExpandedResourceRoot(modelItem);
// } else if (PathUtils.isRelativePath(folder)) {
// folder = PathUtils.resolveResourcePath(folder, modelItem);
// }
//
// return folder;
// }
//
// private void setCoverageBuilder(CoverageBuilder coverageBuilder) {
// try {
// FieldUtils.writeField(this, COVERAGE_BUILDER_FIELD_NAME, coverageBuilder, true);
// } catch (IllegalAccessException e) {
// throw new RuntimeException("Unable to write field " + COVERAGE_BUILDER_FIELD_NAME, e);
// }
// }
//
// public boolean isActivateCoverageBuilder() {
// return getCoverageBuilder() != null;
// }
//
// private CoverageBuilder getCoverageBuilder() {
// try {
// return (CoverageBuilder) FieldUtils.readField(this, COVERAGE_BUILDER_FIELD_NAME, true);
// } catch (IllegalAccessException e) {
// throw new RuntimeException("Unable to read field " + COVERAGE_BUILDER_FIELD_NAME, e);
// }
// }
//
// @Override
// protected void initGroovyLog() {
// // stubbed to prevent multiple appenders, groovy.log is configured in soapui-log4j.xml
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUIMockRunnerWrapper.java
// public class SoapUIMockRunnerWrapper extends AbstractRunnerWrapper<SoapUIMockServiceRunner> {
//
// public static SoapUIMockRunnerWrapper newSoapUIMockServiceRunner(String runnerType) {
// RunnerType runnerTypeEnum = EnumConverter.toRunnerType(runnerType);
// SoapUIMockServiceRunner runner = runnerTypeEnum.newMockRunner();
// return new SoapUIMockRunnerWrapper(runner, runnerTypeEnum);
// }
//
// private SoapUIMockRunnerWrapper(SoapUIMockServiceRunner runner, RunnerType runnerType) {
// super(runner, runnerType);
// }
//
// }
| import com.eviware.soapui.tools.SoapUIMockServiceRunner;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.ktc.soapui.maven.extension.impl.runner.SoapUIProExtensionMockServiceRunner;
import org.ktc.soapui.maven.extension.impl.runner.wrapper.SoapUIMockRunnerWrapper; | /*
* Copyright 2012-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class MockServiceMojo extends AbstractSoapuiRunnerMojo {
// already in smartbear implementation
private String mockService;
private String path;
private String port;
private boolean noBlock;
// custom maven-soapui-extension-plugin
private boolean coverageReport;
@Override
protected void performRunnerExecute() throws MojoExecutionException, MojoFailureException { | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/SoapUIProExtensionMockServiceRunner.java
// public class SoapUIProExtensionMockServiceRunner extends SoapUIProMockServiceRunner {
//
// private static final String COVERAGE_BUILDER_FIELD_NAME = "c";
//
// public SoapUIProExtensionMockServiceRunner() {
// super();
// }
//
// public SoapUIProExtensionMockServiceRunner(String title) {
// super(title);
// }
//
// public void activateCoverageReport(boolean activate) {
// if (activate) {
// setCoverageBuilder(new CoverageBuilder());
// }
// }
//
// // duplicated from SmartBear implementation has their pro mock runner defines its own outputFolder field that is
// // then not used by this method
// @Override
// public String getAbsoluteOutputFolder(ModelItem modelItem) {
// // use getter instead of calling the ouputFolder field directly
// String folder = PropertyExpander.expandProperties(modelItem, getOutputFolder());
//
// if (StringUtils.isNullOrEmpty(folder)) {
// folder = PathUtils.getExpandedResourceRoot(modelItem);
// } else if (PathUtils.isRelativePath(folder)) {
// folder = PathUtils.resolveResourcePath(folder, modelItem);
// }
//
// return folder;
// }
//
// private void setCoverageBuilder(CoverageBuilder coverageBuilder) {
// try {
// FieldUtils.writeField(this, COVERAGE_BUILDER_FIELD_NAME, coverageBuilder, true);
// } catch (IllegalAccessException e) {
// throw new RuntimeException("Unable to write field " + COVERAGE_BUILDER_FIELD_NAME, e);
// }
// }
//
// public boolean isActivateCoverageBuilder() {
// return getCoverageBuilder() != null;
// }
//
// private CoverageBuilder getCoverageBuilder() {
// try {
// return (CoverageBuilder) FieldUtils.readField(this, COVERAGE_BUILDER_FIELD_NAME, true);
// } catch (IllegalAccessException e) {
// throw new RuntimeException("Unable to read field " + COVERAGE_BUILDER_FIELD_NAME, e);
// }
// }
//
// @Override
// protected void initGroovyLog() {
// // stubbed to prevent multiple appenders, groovy.log is configured in soapui-log4j.xml
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUIMockRunnerWrapper.java
// public class SoapUIMockRunnerWrapper extends AbstractRunnerWrapper<SoapUIMockServiceRunner> {
//
// public static SoapUIMockRunnerWrapper newSoapUIMockServiceRunner(String runnerType) {
// RunnerType runnerTypeEnum = EnumConverter.toRunnerType(runnerType);
// SoapUIMockServiceRunner runner = runnerTypeEnum.newMockRunner();
// return new SoapUIMockRunnerWrapper(runner, runnerTypeEnum);
// }
//
// private SoapUIMockRunnerWrapper(SoapUIMockServiceRunner runner, RunnerType runnerType) {
// super(runner, runnerType);
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/MockServiceMojo.java
import com.eviware.soapui.tools.SoapUIMockServiceRunner;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.ktc.soapui.maven.extension.impl.runner.SoapUIProExtensionMockServiceRunner;
import org.ktc.soapui.maven.extension.impl.runner.wrapper.SoapUIMockRunnerWrapper;
/*
* Copyright 2012-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class MockServiceMojo extends AbstractSoapuiRunnerMojo {
// already in smartbear implementation
private String mockService;
private String path;
private String port;
private boolean noBlock;
// custom maven-soapui-extension-plugin
private boolean coverageReport;
@Override
protected void performRunnerExecute() throws MojoExecutionException, MojoFailureException { | SoapUIMockRunnerWrapper runnerWrapper = SoapUIMockRunnerWrapper.newSoapUIMockServiceRunner(runnerType); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/MockServiceMojo.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/SoapUIProExtensionMockServiceRunner.java
// public class SoapUIProExtensionMockServiceRunner extends SoapUIProMockServiceRunner {
//
// private static final String COVERAGE_BUILDER_FIELD_NAME = "c";
//
// public SoapUIProExtensionMockServiceRunner() {
// super();
// }
//
// public SoapUIProExtensionMockServiceRunner(String title) {
// super(title);
// }
//
// public void activateCoverageReport(boolean activate) {
// if (activate) {
// setCoverageBuilder(new CoverageBuilder());
// }
// }
//
// // duplicated from SmartBear implementation has their pro mock runner defines its own outputFolder field that is
// // then not used by this method
// @Override
// public String getAbsoluteOutputFolder(ModelItem modelItem) {
// // use getter instead of calling the ouputFolder field directly
// String folder = PropertyExpander.expandProperties(modelItem, getOutputFolder());
//
// if (StringUtils.isNullOrEmpty(folder)) {
// folder = PathUtils.getExpandedResourceRoot(modelItem);
// } else if (PathUtils.isRelativePath(folder)) {
// folder = PathUtils.resolveResourcePath(folder, modelItem);
// }
//
// return folder;
// }
//
// private void setCoverageBuilder(CoverageBuilder coverageBuilder) {
// try {
// FieldUtils.writeField(this, COVERAGE_BUILDER_FIELD_NAME, coverageBuilder, true);
// } catch (IllegalAccessException e) {
// throw new RuntimeException("Unable to write field " + COVERAGE_BUILDER_FIELD_NAME, e);
// }
// }
//
// public boolean isActivateCoverageBuilder() {
// return getCoverageBuilder() != null;
// }
//
// private CoverageBuilder getCoverageBuilder() {
// try {
// return (CoverageBuilder) FieldUtils.readField(this, COVERAGE_BUILDER_FIELD_NAME, true);
// } catch (IllegalAccessException e) {
// throw new RuntimeException("Unable to read field " + COVERAGE_BUILDER_FIELD_NAME, e);
// }
// }
//
// @Override
// protected void initGroovyLog() {
// // stubbed to prevent multiple appenders, groovy.log is configured in soapui-log4j.xml
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUIMockRunnerWrapper.java
// public class SoapUIMockRunnerWrapper extends AbstractRunnerWrapper<SoapUIMockServiceRunner> {
//
// public static SoapUIMockRunnerWrapper newSoapUIMockServiceRunner(String runnerType) {
// RunnerType runnerTypeEnum = EnumConverter.toRunnerType(runnerType);
// SoapUIMockServiceRunner runner = runnerTypeEnum.newMockRunner();
// return new SoapUIMockRunnerWrapper(runner, runnerTypeEnum);
// }
//
// private SoapUIMockRunnerWrapper(SoapUIMockServiceRunner runner, RunnerType runnerType) {
// super(runner, runnerType);
// }
//
// }
| import com.eviware.soapui.tools.SoapUIMockServiceRunner;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.ktc.soapui.maven.extension.impl.runner.SoapUIProExtensionMockServiceRunner;
import org.ktc.soapui.maven.extension.impl.runner.wrapper.SoapUIMockRunnerWrapper; | /*
* Copyright 2012-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class MockServiceMojo extends AbstractSoapuiRunnerMojo {
// already in smartbear implementation
private String mockService;
private String path;
private String port;
private boolean noBlock;
// custom maven-soapui-extension-plugin
private boolean coverageReport;
@Override
protected void performRunnerExecute() throws MojoExecutionException, MojoFailureException {
SoapUIMockRunnerWrapper runnerWrapper = SoapUIMockRunnerWrapper.newSoapUIMockServiceRunner(runnerType);
SoapUIMockServiceRunner runner = runnerWrapper.getRunner();
configureWithSharedParameters(runner);
runner.setBlock(!noBlock);
runner.setMockService(mockService);
runner.setPath(path);
runner.setPort(port);
runner.setSaveAfterRun(saveAfterRun);
if (runnerWrapper.isProRunner()) { | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/SoapUIProExtensionMockServiceRunner.java
// public class SoapUIProExtensionMockServiceRunner extends SoapUIProMockServiceRunner {
//
// private static final String COVERAGE_BUILDER_FIELD_NAME = "c";
//
// public SoapUIProExtensionMockServiceRunner() {
// super();
// }
//
// public SoapUIProExtensionMockServiceRunner(String title) {
// super(title);
// }
//
// public void activateCoverageReport(boolean activate) {
// if (activate) {
// setCoverageBuilder(new CoverageBuilder());
// }
// }
//
// // duplicated from SmartBear implementation has their pro mock runner defines its own outputFolder field that is
// // then not used by this method
// @Override
// public String getAbsoluteOutputFolder(ModelItem modelItem) {
// // use getter instead of calling the ouputFolder field directly
// String folder = PropertyExpander.expandProperties(modelItem, getOutputFolder());
//
// if (StringUtils.isNullOrEmpty(folder)) {
// folder = PathUtils.getExpandedResourceRoot(modelItem);
// } else if (PathUtils.isRelativePath(folder)) {
// folder = PathUtils.resolveResourcePath(folder, modelItem);
// }
//
// return folder;
// }
//
// private void setCoverageBuilder(CoverageBuilder coverageBuilder) {
// try {
// FieldUtils.writeField(this, COVERAGE_BUILDER_FIELD_NAME, coverageBuilder, true);
// } catch (IllegalAccessException e) {
// throw new RuntimeException("Unable to write field " + COVERAGE_BUILDER_FIELD_NAME, e);
// }
// }
//
// public boolean isActivateCoverageBuilder() {
// return getCoverageBuilder() != null;
// }
//
// private CoverageBuilder getCoverageBuilder() {
// try {
// return (CoverageBuilder) FieldUtils.readField(this, COVERAGE_BUILDER_FIELD_NAME, true);
// } catch (IllegalAccessException e) {
// throw new RuntimeException("Unable to read field " + COVERAGE_BUILDER_FIELD_NAME, e);
// }
// }
//
// @Override
// protected void initGroovyLog() {
// // stubbed to prevent multiple appenders, groovy.log is configured in soapui-log4j.xml
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUIMockRunnerWrapper.java
// public class SoapUIMockRunnerWrapper extends AbstractRunnerWrapper<SoapUIMockServiceRunner> {
//
// public static SoapUIMockRunnerWrapper newSoapUIMockServiceRunner(String runnerType) {
// RunnerType runnerTypeEnum = EnumConverter.toRunnerType(runnerType);
// SoapUIMockServiceRunner runner = runnerTypeEnum.newMockRunner();
// return new SoapUIMockRunnerWrapper(runner, runnerTypeEnum);
// }
//
// private SoapUIMockRunnerWrapper(SoapUIMockServiceRunner runner, RunnerType runnerType) {
// super(runner, runnerType);
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/MockServiceMojo.java
import com.eviware.soapui.tools.SoapUIMockServiceRunner;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.ktc.soapui.maven.extension.impl.runner.SoapUIProExtensionMockServiceRunner;
import org.ktc.soapui.maven.extension.impl.runner.wrapper.SoapUIMockRunnerWrapper;
/*
* Copyright 2012-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class MockServiceMojo extends AbstractSoapuiRunnerMojo {
// already in smartbear implementation
private String mockService;
private String path;
private String port;
private boolean noBlock;
// custom maven-soapui-extension-plugin
private boolean coverageReport;
@Override
protected void performRunnerExecute() throws MojoExecutionException, MojoFailureException {
SoapUIMockRunnerWrapper runnerWrapper = SoapUIMockRunnerWrapper.newSoapUIMockServiceRunner(runnerType);
SoapUIMockServiceRunner runner = runnerWrapper.getRunner();
configureWithSharedParameters(runner);
runner.setBlock(!noBlock);
runner.setMockService(mockService);
runner.setPath(path);
runner.setPort(port);
runner.setSaveAfterRun(saveAfterRun);
if (runnerWrapper.isProRunner()) { | SoapUIProExtensionMockServiceRunner proRunner = (SoapUIProExtensionMockServiceRunner) runner; |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/impl/runner/SoapUIProExtensionTestCaseRunner.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/report/ReportCollectorFactory.java
// public class ReportCollectorFactory {
// private static final Logger log = Logger.getLogger(ReportCollectorFactory.class);
//
// // TODO manage maxErrors
// // currently do not use it as SmartBear JUnitSecurityReportCollector have no constuctor with int argument
// public static JUnitSecurityReportCollector newReportCollector() {
// String className = System.getProperty("soapui.junit.reportCollector", null);
// if (StringUtils.isNotBlank(className)) {
// try {
// return (JUnitSecurityReportCollector) Class.forName(className).getConstructor().newInstance();
// } catch (Exception e) {
// log.warn("Failed to create JUnitReportCollector class [" + className + "] so use the default one;"
// + " error cause: " + e.toString());
// }
// }
// return new JUnitSecurityReportCollector();
// }
//
// }
| import com.eviware.soapui.SoapUIProTestCaseRunner;
import com.eviware.soapui.impl.wsdl.WsdlProject;
import com.eviware.soapui.report.JUnitReportCollector;
import com.eviware.soapui.report.JUnitSecurityReportCollector;
import org.ktc.soapui.maven.extension.impl.report.ReportCollectorFactory; | public void setTestSuiteProperties(String[] testSuiteProperties) {
this.testSuiteProperties = testSuiteProperties;
}
@Override
protected void initProject(WsdlProject project) {
super.initProject(project);
initTestSuiteProperties(project);
}
private void initTestSuiteProperties(WsdlProject project) {
TestSuitePropertiesModifier.overrideTestSuiteProperties(project, testSuiteProperties);
}
@Override
public void exportJUnitReports(JUnitReportCollector collector, String folder, WsdlProject project) {
if (junitHtmlReport) {
super.exportJUnitReports(collector, folder, project);
} else {
// copy from SoapUITestCaseRunner
try {
collector.saveReports(folder == null ? "" : folder);
} catch (Exception e) {
log.error("Failed to create JUnit reports", e);
}
}
}
@Override
protected JUnitSecurityReportCollector createJUnitSecurityReportCollector() { | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/report/ReportCollectorFactory.java
// public class ReportCollectorFactory {
// private static final Logger log = Logger.getLogger(ReportCollectorFactory.class);
//
// // TODO manage maxErrors
// // currently do not use it as SmartBear JUnitSecurityReportCollector have no constuctor with int argument
// public static JUnitSecurityReportCollector newReportCollector() {
// String className = System.getProperty("soapui.junit.reportCollector", null);
// if (StringUtils.isNotBlank(className)) {
// try {
// return (JUnitSecurityReportCollector) Class.forName(className).getConstructor().newInstance();
// } catch (Exception e) {
// log.warn("Failed to create JUnitReportCollector class [" + className + "] so use the default one;"
// + " error cause: " + e.toString());
// }
// }
// return new JUnitSecurityReportCollector();
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/SoapUIProExtensionTestCaseRunner.java
import com.eviware.soapui.SoapUIProTestCaseRunner;
import com.eviware.soapui.impl.wsdl.WsdlProject;
import com.eviware.soapui.report.JUnitReportCollector;
import com.eviware.soapui.report.JUnitSecurityReportCollector;
import org.ktc.soapui.maven.extension.impl.report.ReportCollectorFactory;
public void setTestSuiteProperties(String[] testSuiteProperties) {
this.testSuiteProperties = testSuiteProperties;
}
@Override
protected void initProject(WsdlProject project) {
super.initProject(project);
initTestSuiteProperties(project);
}
private void initTestSuiteProperties(WsdlProject project) {
TestSuitePropertiesModifier.overrideTestSuiteProperties(project, testSuiteProperties);
}
@Override
public void exportJUnitReports(JUnitReportCollector collector, String folder, WsdlProject project) {
if (junitHtmlReport) {
super.exportJUnitReports(collector, folder, project);
} else {
// copy from SoapUITestCaseRunner
try {
collector.saveReports(folder == null ? "" : folder);
} catch (Exception e) {
log.error("Failed to create JUnit reports", e);
}
}
}
@Override
protected JUnitSecurityReportCollector createJUnitSecurityReportCollector() { | return ReportCollectorFactory.newReportCollector(); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/TestVerifyMojo.java | // Path: src/main/java/org/ktc/soapui/maven/extension/TestMojo.java
// public static final String TEST_FAILURES_AND_ERRORS_KEY = "soapui_extension_Mlx#ppp";
| import static org.ktc.soapui.maven.extension.TestMojo.TEST_FAILURES_AND_ERRORS_KEY;
import org.apache.commons.lang.BooleanUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
| /*
* Copyright 2012 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class TestVerifyMojo extends AbstractSoapuiMojo {
@Override
public void performExecute() throws MojoExecutionException, MojoFailureException {
getLog().info("Checking if SoapUI Test(s) failed");
| // Path: src/main/java/org/ktc/soapui/maven/extension/TestMojo.java
// public static final String TEST_FAILURES_AND_ERRORS_KEY = "soapui_extension_Mlx#ppp";
// Path: src/main/java/org/ktc/soapui/maven/extension/TestVerifyMojo.java
import static org.ktc.soapui.maven.extension.TestMojo.TEST_FAILURES_AND_ERRORS_KEY;
import org.apache.commons.lang.BooleanUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
/*
* Copyright 2012 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class TestVerifyMojo extends AbstractSoapuiMojo {
@Override
public void performExecute() throws MojoExecutionException, MojoFailureException {
getLog().info("Checking if SoapUI Test(s) failed");
| String soapuiTestsHaveFailuresOrErrors = project.getProperties().getProperty(TEST_FAILURES_AND_ERRORS_KEY);
|
redfish4ktc/maven-soapui-extension-plugin | src/test/java/org/ktc/soapui/maven/extension/impl/report/ReportCollectorFactoryTest.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/report/ReportCollectorFactory.java
// public static JUnitSecurityReportCollector newReportCollector() {
// String className = System.getProperty("soapui.junit.reportCollector", null);
// if (StringUtils.isNotBlank(className)) {
// try {
// return (JUnitSecurityReportCollector) Class.forName(className).getConstructor().newInstance();
// } catch (Exception e) {
// log.warn("Failed to create JUnitReportCollector class [" + className + "] so use the default one;"
// + " error cause: " + e.toString());
// }
// }
// return new JUnitSecurityReportCollector();
// }
| import static org.assertj.core.api.Assertions.assertThat;
import static org.ktc.soapui.maven.extension.impl.report.ReportCollectorFactory.newReportCollector;
import com.eviware.soapui.report.JUnitSecurityReportCollector;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.RestoreSystemProperties; | /*
* Copyright 2013-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.report;
public class ReportCollectorFactoryTest {
private static final Class<JUnitSecurityReportCollector> DEFAULT_COLLECTOR_CLASS = JUnitSecurityReportCollector.class;
private static final String REPORT_COLLECTOR_SYS_PROP = "soapui.junit.reportCollector";
@Rule
public final RestoreSystemProperties restoreSysProperties = new RestoreSystemProperties(REPORT_COLLECTOR_SYS_PROP);
@Test
public void newReportCollectorWithEmptySystemProperty() {
System.setProperty(REPORT_COLLECTOR_SYS_PROP, ""); | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/report/ReportCollectorFactory.java
// public static JUnitSecurityReportCollector newReportCollector() {
// String className = System.getProperty("soapui.junit.reportCollector", null);
// if (StringUtils.isNotBlank(className)) {
// try {
// return (JUnitSecurityReportCollector) Class.forName(className).getConstructor().newInstance();
// } catch (Exception e) {
// log.warn("Failed to create JUnitReportCollector class [" + className + "] so use the default one;"
// + " error cause: " + e.toString());
// }
// }
// return new JUnitSecurityReportCollector();
// }
// Path: src/test/java/org/ktc/soapui/maven/extension/impl/report/ReportCollectorFactoryTest.java
import static org.assertj.core.api.Assertions.assertThat;
import static org.ktc.soapui.maven.extension.impl.report.ReportCollectorFactory.newReportCollector;
import com.eviware.soapui.report.JUnitSecurityReportCollector;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.RestoreSystemProperties;
/*
* Copyright 2013-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.report;
public class ReportCollectorFactoryTest {
private static final Class<JUnitSecurityReportCollector> DEFAULT_COLLECTOR_CLASS = JUnitSecurityReportCollector.class;
private static final String REPORT_COLLECTOR_SYS_PROP = "soapui.junit.reportCollector";
@Rule
public final RestoreSystemProperties restoreSysProperties = new RestoreSystemProperties(REPORT_COLLECTOR_SYS_PROP);
@Test
public void newReportCollectorWithEmptySystemProperty() {
System.setProperty(REPORT_COLLECTOR_SYS_PROP, ""); | assertThat(newReportCollector()).isInstanceOf(DEFAULT_COLLECTOR_CLASS); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUITestCaseRunnerWrapper.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
| import com.eviware.soapui.tools.SoapUITestCaseRunner;
import org.ktc.soapui.maven.extension.impl.RunnerType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter; | /*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner.wrapper;
public class SoapUITestCaseRunnerWrapper extends AbstractRunnerWrapper<SoapUITestCaseRunner> {
public static SoapUITestCaseRunnerWrapper newSoapUITestCaseRunnerWrapper(String runnerType) { | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUITestCaseRunnerWrapper.java
import com.eviware.soapui.tools.SoapUITestCaseRunner;
import org.ktc.soapui.maven.extension.impl.RunnerType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter;
/*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner.wrapper;
public class SoapUITestCaseRunnerWrapper extends AbstractRunnerWrapper<SoapUITestCaseRunner> {
public static SoapUITestCaseRunnerWrapper newSoapUITestCaseRunnerWrapper(String runnerType) { | RunnerType runnerTypeEnum = EnumConverter.toRunnerType(runnerType); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUITestCaseRunnerWrapper.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
| import com.eviware.soapui.tools.SoapUITestCaseRunner;
import org.ktc.soapui.maven.extension.impl.RunnerType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter; | /*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner.wrapper;
public class SoapUITestCaseRunnerWrapper extends AbstractRunnerWrapper<SoapUITestCaseRunner> {
public static SoapUITestCaseRunnerWrapper newSoapUITestCaseRunnerWrapper(String runnerType) { | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUITestCaseRunnerWrapper.java
import com.eviware.soapui.tools.SoapUITestCaseRunner;
import org.ktc.soapui.maven.extension.impl.RunnerType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter;
/*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner.wrapper;
public class SoapUITestCaseRunnerWrapper extends AbstractRunnerWrapper<SoapUITestCaseRunner> {
public static SoapUITestCaseRunnerWrapper newSoapUITestCaseRunnerWrapper(String runnerType) { | RunnerType runnerTypeEnum = EnumConverter.toRunnerType(runnerType); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/AbstractRunnerWrapper.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
| import com.eviware.soapui.tools.AbstractSoapUIRunner;
import org.ktc.soapui.maven.extension.impl.RunnerType; | /*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner.wrapper;
public abstract class AbstractRunnerWrapper<R extends AbstractSoapUIRunner> {
private R runner; | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/AbstractRunnerWrapper.java
import com.eviware.soapui.tools.AbstractSoapUIRunner;
import org.ktc.soapui.maven.extension.impl.RunnerType;
/*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner.wrapper;
public abstract class AbstractRunnerWrapper<R extends AbstractSoapUIRunner> {
private R runner; | private RunnerType runnerType; |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUIMockRunnerWrapper.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
| import com.eviware.soapui.tools.SoapUIMockServiceRunner;
import org.ktc.soapui.maven.extension.impl.RunnerType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter; | /*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner.wrapper;
public class SoapUIMockRunnerWrapper extends AbstractRunnerWrapper<SoapUIMockServiceRunner> {
public static SoapUIMockRunnerWrapper newSoapUIMockServiceRunner(String runnerType) { | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUIMockRunnerWrapper.java
import com.eviware.soapui.tools.SoapUIMockServiceRunner;
import org.ktc.soapui.maven.extension.impl.RunnerType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter;
/*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner.wrapper;
public class SoapUIMockRunnerWrapper extends AbstractRunnerWrapper<SoapUIMockServiceRunner> {
public static SoapUIMockRunnerWrapper newSoapUIMockServiceRunner(String runnerType) { | RunnerType runnerTypeEnum = EnumConverter.toRunnerType(runnerType); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUIMockRunnerWrapper.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
| import com.eviware.soapui.tools.SoapUIMockServiceRunner;
import org.ktc.soapui.maven.extension.impl.RunnerType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter; | /*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner.wrapper;
public class SoapUIMockRunnerWrapper extends AbstractRunnerWrapper<SoapUIMockServiceRunner> {
public static SoapUIMockRunnerWrapper newSoapUIMockServiceRunner(String runnerType) { | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverter.java
// public class EnumConverter {
//
// public static ProjectConversionType toProjectConversionType(String value) {
// try {
// return ProjectConversionType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported project conversion type " + value + ". Valid values are "
// + buildEnumValuesToString(ProjectConversionType.values()) + "", e);
// }
// }
//
// public static RunnerType toRunnerType(String value) {
// try {
// return RunnerType.valueOf(value);
// } catch (RuntimeException e) {
// throw new UnknownEnumException("Unsupported runner type " + value + ". Valid values are "
// + buildEnumValuesToString(RunnerType.values()) + "", e);
// }
// }
//
// private static String buildEnumValuesToString(Object[] values) {
// return "[" + StringUtils.join(values, ',') + "]";
// }
//
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUIMockRunnerWrapper.java
import com.eviware.soapui.tools.SoapUIMockServiceRunner;
import org.ktc.soapui.maven.extension.impl.RunnerType;
import org.ktc.soapui.maven.extension.impl.enums.EnumConverter;
/*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.runner.wrapper;
public class SoapUIMockRunnerWrapper extends AbstractRunnerWrapper<SoapUIMockServiceRunner> {
public static SoapUIMockRunnerWrapper newSoapUIMockServiceRunner(String runnerType) { | RunnerType runnerTypeEnum = EnumConverter.toRunnerType(runnerType); |
redfish4ktc/maven-soapui-extension-plugin | src/main/java/org/ktc/soapui/maven/extension/TestMultiMojo.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUITestCaseRunnerWrapper.java
// public static SoapUITestCaseRunnerWrapper newSoapUITestCaseRunnerWrapper(String runnerType) {
// RunnerType runnerTypeEnum = EnumConverter.toRunnerType(runnerType);
// SoapUITestCaseRunner runner = runnerTypeEnum.newTestRunner();
// return new SoapUITestCaseRunnerWrapper(runner, runnerTypeEnum);
// }
| import static org.ktc.soapui.maven.extension.impl.runner.wrapper.SoapUITestCaseRunnerWrapper.newSoapUITestCaseRunnerWrapper;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.apache.commons.io.FilenameUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.codehaus.plexus.util.DirectoryScanner;
import com.eviware.soapui.tools.SoapUITestCaseRunner; | /*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class TestMultiMojo extends TestMojo {
// use array to support maven 2.2.1
private ProjectFilesScan[] projectFiles;
private boolean useOutputFolderPerProject;
@Override
protected void performRunnerExecute() throws MojoExecutionException, MojoFailureException {
List<File> resolvedProjectFiles = resolveProjectFiles();
for (File currentProjectFile : resolvedProjectFiles) { | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/runner/wrapper/SoapUITestCaseRunnerWrapper.java
// public static SoapUITestCaseRunnerWrapper newSoapUITestCaseRunnerWrapper(String runnerType) {
// RunnerType runnerTypeEnum = EnumConverter.toRunnerType(runnerType);
// SoapUITestCaseRunner runner = runnerTypeEnum.newTestRunner();
// return new SoapUITestCaseRunnerWrapper(runner, runnerTypeEnum);
// }
// Path: src/main/java/org/ktc/soapui/maven/extension/TestMultiMojo.java
import static org.ktc.soapui.maven.extension.impl.runner.wrapper.SoapUITestCaseRunnerWrapper.newSoapUITestCaseRunnerWrapper;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.apache.commons.io.FilenameUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.codehaus.plexus.util.DirectoryScanner;
import com.eviware.soapui.tools.SoapUITestCaseRunner;
/*
* Copyright 2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension;
public class TestMultiMojo extends TestMojo {
// use array to support maven 2.2.1
private ProjectFilesScan[] projectFiles;
private boolean useOutputFolderPerProject;
@Override
protected void performRunnerExecute() throws MojoExecutionException, MojoFailureException {
List<File> resolvedProjectFiles = resolveProjectFiles();
for (File currentProjectFile : resolvedProjectFiles) { | configureAndRun(newSoapUITestCaseRunnerWrapper(runnerType), currentProjectFile.getAbsolutePath()); |
redfish4ktc/maven-soapui-extension-plugin | src/test/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverterTest.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/ProjectConversionType.java
// public enum ProjectConversionType {
// TO_STANDARD(false), TO_COMPOSITE(true);
//
// private final boolean isTargetedProjectComposite;
//
// private ProjectConversionType (boolean isTargetedProjectComposite) {
// this.isTargetedProjectComposite= isTargetedProjectComposite;
// }
//
// public boolean isTargetedProjectComposite() {
// return isTargetedProjectComposite;
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
| import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.failBecauseExceptionWasNotThrown;
import org.junit.Test;
import org.ktc.soapui.maven.extension.impl.ProjectConversionType;
import org.ktc.soapui.maven.extension.impl.RunnerType; | /*
* Copyright 2012-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.enums;
public class EnumConverterTest {
@Test
public void toProjectConversionType_valid_value() { | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/ProjectConversionType.java
// public enum ProjectConversionType {
// TO_STANDARD(false), TO_COMPOSITE(true);
//
// private final boolean isTargetedProjectComposite;
//
// private ProjectConversionType (boolean isTargetedProjectComposite) {
// this.isTargetedProjectComposite= isTargetedProjectComposite;
// }
//
// public boolean isTargetedProjectComposite() {
// return isTargetedProjectComposite;
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
// Path: src/test/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverterTest.java
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.failBecauseExceptionWasNotThrown;
import org.junit.Test;
import org.ktc.soapui.maven.extension.impl.ProjectConversionType;
import org.ktc.soapui.maven.extension.impl.RunnerType;
/*
* Copyright 2012-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.enums;
public class EnumConverterTest {
@Test
public void toProjectConversionType_valid_value() { | assertThat(EnumConverter.toProjectConversionType("TO_COMPOSITE")).isEqualTo(ProjectConversionType.TO_COMPOSITE); |
redfish4ktc/maven-soapui-extension-plugin | src/test/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverterTest.java | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/ProjectConversionType.java
// public enum ProjectConversionType {
// TO_STANDARD(false), TO_COMPOSITE(true);
//
// private final boolean isTargetedProjectComposite;
//
// private ProjectConversionType (boolean isTargetedProjectComposite) {
// this.isTargetedProjectComposite= isTargetedProjectComposite;
// }
//
// public boolean isTargetedProjectComposite() {
// return isTargetedProjectComposite;
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
| import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.failBecauseExceptionWasNotThrown;
import org.junit.Test;
import org.ktc.soapui.maven.extension.impl.ProjectConversionType;
import org.ktc.soapui.maven.extension.impl.RunnerType; | /*
* Copyright 2012-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.enums;
public class EnumConverterTest {
@Test
public void toProjectConversionType_valid_value() {
assertThat(EnumConverter.toProjectConversionType("TO_COMPOSITE")).isEqualTo(ProjectConversionType.TO_COMPOSITE);
}
@Test
public void toProjectConversionType_from_unknown_value() {
try {
EnumConverter.toProjectConversionType("un4658$$$");
failBecauseExceptionWasNotThrown(UnknownEnumException.class);
} catch (UnknownEnumException e) {
assertThat(e.getMessage()).isEqualTo(
"Unsupported project conversion type un4658$$$. Valid values are [TO_STANDARD,TO_COMPOSITE]");
}
}
@Test
public void toRunnerType_valid_value() { | // Path: src/main/java/org/ktc/soapui/maven/extension/impl/ProjectConversionType.java
// public enum ProjectConversionType {
// TO_STANDARD(false), TO_COMPOSITE(true);
//
// private final boolean isTargetedProjectComposite;
//
// private ProjectConversionType (boolean isTargetedProjectComposite) {
// this.isTargetedProjectComposite= isTargetedProjectComposite;
// }
//
// public boolean isTargetedProjectComposite() {
// return isTargetedProjectComposite;
// }
//
// }
//
// Path: src/main/java/org/ktc/soapui/maven/extension/impl/RunnerType.java
// public enum RunnerType {
// PRO {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIProExtensionTestCaseRunner("SoapUI Pro Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIProExtensionMockServiceRunner("SoapUI Pro Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// // currently no constructor with String arguments
// return new SoapUIProMockAsWarGenerator();
// }
//
// @Override
// public boolean isProRunner() {
// return true;
// }
//
// },
// OSS {
// @Override
// public SoapUITestCaseRunner newTestRunner() {
// return new SoapUIExtensionTestCaseRunner("SoapUI Maven2 TestCase Runner");
// }
//
// @Override
// public SoapUIMockServiceRunner newMockRunner() {
// return new SoapUIExtensionMockServiceRunner("SoapUI Maven2 MockService Runner");
// }
//
// @Override
// public SoapUIMockAsWarGenerator newMockAsWarGenerator() {
// return new SoapUIExtensionMockAsWarGenerator("SoapUI Maven2 MockAsWar Generator");
// }
//
// @Override
// public boolean isProRunner() {
// return false;
// }
//
// };
//
// public abstract SoapUITestCaseRunner newTestRunner();
//
// public abstract SoapUIMockServiceRunner newMockRunner();
//
// public abstract SoapUIMockAsWarGenerator newMockAsWarGenerator();
//
// public abstract boolean isProRunner();
// }
// Path: src/test/java/org/ktc/soapui/maven/extension/impl/enums/EnumConverterTest.java
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.failBecauseExceptionWasNotThrown;
import org.junit.Test;
import org.ktc.soapui.maven.extension.impl.ProjectConversionType;
import org.ktc.soapui.maven.extension.impl.RunnerType;
/*
* Copyright 2012-2014 Thomas Bouffard (redfish4ktc)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ktc.soapui.maven.extension.impl.enums;
public class EnumConverterTest {
@Test
public void toProjectConversionType_valid_value() {
assertThat(EnumConverter.toProjectConversionType("TO_COMPOSITE")).isEqualTo(ProjectConversionType.TO_COMPOSITE);
}
@Test
public void toProjectConversionType_from_unknown_value() {
try {
EnumConverter.toProjectConversionType("un4658$$$");
failBecauseExceptionWasNotThrown(UnknownEnumException.class);
} catch (UnknownEnumException e) {
assertThat(e.getMessage()).isEqualTo(
"Unsupported project conversion type un4658$$$. Valid values are [TO_STANDARD,TO_COMPOSITE]");
}
}
@Test
public void toRunnerType_valid_value() { | assertThat(EnumConverter.toRunnerType("OSS")).isEqualTo(RunnerType.OSS); |
metamolecular/mx | src/com/metamolecular/mx/walk/PathWriter.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import java.util.List;
import java.util.Set;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class PathWriter implements Reporter
{
private Collection output; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/walk/PathWriter.java
import java.util.List;
import java.util.Set;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class PathWriter implements Reporter
{
private Collection output; | private Set<Atom> aromatics; |
metamolecular/mx | src/com/metamolecular/mx/walk/PathWriter.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import java.util.List;
import java.util.Set;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class PathWriter implements Reporter
{
private Collection output;
private Set<Atom> aromatics;
private List<Atom> atomPath; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/walk/PathWriter.java
import java.util.List;
import java.util.Set;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class PathWriter implements Reporter
{
private Collection output;
private Set<Atom> aromatics;
private List<Atom> atomPath; | private List<Bond> bondPath; |
metamolecular/mx | src/com/metamolecular/mx/io/daylight/SMILESBuilder.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import java.util.List;
import java.util.Map;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList;
import java.util.HashMap; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.io.daylight;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class SMILESBuilder
{
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/io/daylight/SMILESBuilder.java
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList;
import java.util.HashMap;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.io.daylight;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class SMILESBuilder
{
| private Atom head; |
metamolecular/mx | src/com/metamolecular/mx/io/daylight/SMILESBuilder.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import java.util.List;
import java.util.Map;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList;
import java.util.HashMap; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.io.daylight;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class SMILESBuilder
{
private Atom head;
private int bondType; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/io/daylight/SMILESBuilder.java
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList;
import java.util.HashMap;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.io.daylight;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class SMILESBuilder
{
private Atom head;
private int bondType; | private Molecule molecule; |
metamolecular/mx | src/com/metamolecular/mx/walk/Reporter.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Reporter
{ | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/walk/Reporter.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Reporter
{ | public void walkStart(Atom atom); |
metamolecular/mx | src/com/metamolecular/mx/walk/Reporter.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Reporter
{
public void walkStart(Atom atom);
public void atomFound(Atom atom);
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/walk/Reporter.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Reporter
{
public void walkStart(Atom atom);
public void atomFound(Atom atom);
| public void bondFound(Bond bond); |
metamolecular/mx | src/com/metamolecular/mx/query/AtomMatcher.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
| import com.metamolecular.mx.model.Atom; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.query;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface AtomMatcher
{ | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
// Path: src/com/metamolecular/mx/query/AtomMatcher.java
import com.metamolecular.mx.model.Atom;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.query;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface AtomMatcher
{ | boolean matches(Atom atom); |
metamolecular/mx | src/com/metamolecular/mx/test/AromaticAtomFilterTest.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/query/AromaticAtomFilter.java
// public class AromaticAtomFilter implements AtomMatcher
// {
// public AromaticAtomFilter()
// {
//
// }
//
// public boolean matches(Atom atom)
// {
// int unsaturation = atom.getValence() - atom.countNeighbors();
//
// if (unsaturation > 1)
// {
// return true;
// }
//
// int totalNeighbors = atom.countNeighbors() + atom.countVirtualHydrogens();
//
// return totalNeighbors < 4;
// }
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.query.AromaticAtomFilter;
import junit.framework.TestCase;
import static org.mockito.Mockito.*; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class AromaticAtomFilterTest extends TestCase
{ | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/query/AromaticAtomFilter.java
// public class AromaticAtomFilter implements AtomMatcher
// {
// public AromaticAtomFilter()
// {
//
// }
//
// public boolean matches(Atom atom)
// {
// int unsaturation = atom.getValence() - atom.countNeighbors();
//
// if (unsaturation > 1)
// {
// return true;
// }
//
// int totalNeighbors = atom.countNeighbors() + atom.countVirtualHydrogens();
//
// return totalNeighbors < 4;
// }
// }
// Path: src/com/metamolecular/mx/test/AromaticAtomFilterTest.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.query.AromaticAtomFilter;
import junit.framework.TestCase;
import static org.mockito.Mockito.*;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class AromaticAtomFilterTest extends TestCase
{ | private AromaticAtomFilter filter; |
metamolecular/mx | src/com/metamolecular/mx/test/AromaticAtomFilterTest.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/query/AromaticAtomFilter.java
// public class AromaticAtomFilter implements AtomMatcher
// {
// public AromaticAtomFilter()
// {
//
// }
//
// public boolean matches(Atom atom)
// {
// int unsaturation = atom.getValence() - atom.countNeighbors();
//
// if (unsaturation > 1)
// {
// return true;
// }
//
// int totalNeighbors = atom.countNeighbors() + atom.countVirtualHydrogens();
//
// return totalNeighbors < 4;
// }
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.query.AromaticAtomFilter;
import junit.framework.TestCase;
import static org.mockito.Mockito.*; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class AromaticAtomFilterTest extends TestCase
{
private AromaticAtomFilter filter;
public AromaticAtomFilterTest()
{
filter = new AromaticAtomFilter();
}
@Override
protected void setUp() throws Exception
{
}
public void testItMatchesSP2()
{
assertTrue(filter.matches(mockUnsaturatedAtom()));
}
public void testItDoesntMatchSP3Carbon()
{
assertFalse(filter.matches(mockSP3Carbon()));
}
public void testItMatchesSP3Oxygen()
{
assertTrue(filter.matches(mockSP3Oxygen()));
}
public void testItMatchesSP3Nitrogen()
{
assertTrue(filter.matches(mockSP3Nitrogen()));
}
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/query/AromaticAtomFilter.java
// public class AromaticAtomFilter implements AtomMatcher
// {
// public AromaticAtomFilter()
// {
//
// }
//
// public boolean matches(Atom atom)
// {
// int unsaturation = atom.getValence() - atom.countNeighbors();
//
// if (unsaturation > 1)
// {
// return true;
// }
//
// int totalNeighbors = atom.countNeighbors() + atom.countVirtualHydrogens();
//
// return totalNeighbors < 4;
// }
// }
// Path: src/com/metamolecular/mx/test/AromaticAtomFilterTest.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.query.AromaticAtomFilter;
import junit.framework.TestCase;
import static org.mockito.Mockito.*;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class AromaticAtomFilterTest extends TestCase
{
private AromaticAtomFilter filter;
public AromaticAtomFilterTest()
{
filter = new AromaticAtomFilter();
}
@Override
protected void setUp() throws Exception
{
}
public void testItMatchesSP2()
{
assertTrue(filter.matches(mockUnsaturatedAtom()));
}
public void testItDoesntMatchSP3Carbon()
{
assertFalse(filter.matches(mockSP3Carbon()));
}
public void testItMatchesSP3Oxygen()
{
assertTrue(filter.matches(mockSP3Oxygen()));
}
public void testItMatchesSP3Nitrogen()
{
assertTrue(filter.matches(mockSP3Nitrogen()));
}
| private Atom mockUnsaturatedAtom() |
metamolecular/mx | src/com/metamolecular/mx/query/DefaultBondMatcher.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.query;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultBondMatcher implements BondMatcher
{
private int bondOrder;
private int unsaturation;
public DefaultBondMatcher()
{
this.bondOrder = -1;
this.unsaturation = -1;
}
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/query/DefaultBondMatcher.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.query;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultBondMatcher implements BondMatcher
{
private int bondOrder;
private int unsaturation;
public DefaultBondMatcher()
{
this.bondOrder = -1;
this.unsaturation = -1;
}
| public DefaultBondMatcher(Bond bond) |
metamolecular/mx | src/com/metamolecular/mx/query/DefaultBondMatcher.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond; | this.bondOrder = -1;
this.unsaturation = -1;
}
public DefaultBondMatcher(Bond bond)
{
this.bondOrder = bond.getType();
this.unsaturation = getUnsaturation(bond);
}
public boolean matches(Bond bond)
{
if (bondOrder == bond.getType())
{
return true;
}
if (this.unsaturation == getUnsaturation(bond))
{
return true;
}
return false;
}
private int getUnsaturation(Bond bond)
{
return getUnsaturation(bond.getSource()) + getUnsaturation(bond.getTarget());
}
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/query/DefaultBondMatcher.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
this.bondOrder = -1;
this.unsaturation = -1;
}
public DefaultBondMatcher(Bond bond)
{
this.bondOrder = bond.getType();
this.unsaturation = getUnsaturation(bond);
}
public boolean matches(Bond bond)
{
if (bondOrder == bond.getType())
{
return true;
}
if (this.unsaturation == getUnsaturation(bond))
{
return true;
}
return false;
}
private int getUnsaturation(Bond bond)
{
return getUnsaturation(bond.getSource()) + getUnsaturation(bond.getTarget());
}
| private int getUnsaturation(Atom atom) |
metamolecular/mx | src/com/metamolecular/mx/map/Match.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
| import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.map;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class Match
{
private Node query; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
// Path: src/com/metamolecular/mx/map/Match.java
import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.map;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class Match
{
private Node query; | private Atom target; |
metamolecular/mx | src/com/metamolecular/mx/ring/RingFinder.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.Collection;
import java.util.List; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.ring;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface RingFinder
{
public void setMaximumRingSize(int max);
public int getMaximumRingSize();
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/ring/RingFinder.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.Collection;
import java.util.List;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.ring;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface RingFinder
{
public void setMaximumRingSize(int max);
public int getMaximumRingSize();
| public Collection<List<Atom>> findRings(Molecule molecule); |
metamolecular/mx | src/com/metamolecular/mx/ring/RingFinder.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.Collection;
import java.util.List; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.ring;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface RingFinder
{
public void setMaximumRingSize(int max);
public int getMaximumRingSize();
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/ring/RingFinder.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.Collection;
import java.util.List;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.ring;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface RingFinder
{
public void setMaximumRingSize(int max);
public int getMaximumRingSize();
| public Collection<List<Atom>> findRings(Molecule molecule); |
metamolecular/mx | src/com/metamolecular/mx/walk/Step.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.List; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Step
{ | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/walk/Step.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.List;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Step
{ | public Atom getAtom(); |
metamolecular/mx | src/com/metamolecular/mx/walk/Step.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.List; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Step
{
public Atom getAtom();
public List<Atom> getPath();
public boolean hasNextBond();
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/walk/Step.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.List;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Step
{
public Atom getAtom();
public List<Atom> getPath();
public boolean hasNextBond();
| public Step nextStep(Bond bond); |
metamolecular/mx | src/com/metamolecular/mx/walk/DefaultStep.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.ArrayList;
import java.util.List; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultStep implements Step
{ | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/walk/DefaultStep.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.ArrayList;
import java.util.List;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultStep implements Step
{ | private Atom focus; |
metamolecular/mx | src/com/metamolecular/mx/walk/DefaultStep.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.ArrayList;
import java.util.List; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultStep implements Step
{
private Atom focus;
private List<Atom> path; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/walk/DefaultStep.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import java.util.ArrayList;
import java.util.List;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultStep implements Step
{
private Atom focus;
private List<Atom> path; | private List<Bond> bonds; |
metamolecular/mx | src/com/metamolecular/mx/query/DefaultAtomMatcher.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
| import com.metamolecular.mx.model.Atom; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.query;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultAtomMatcher implements AtomMatcher
{
private String symbol;
private int maximumNeighbors;
public DefaultAtomMatcher()
{
symbol = null;
maximumNeighbors = -1;
}
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
// Path: src/com/metamolecular/mx/query/DefaultAtomMatcher.java
import com.metamolecular.mx.model.Atom;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.query;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultAtomMatcher implements AtomMatcher
{
private String symbol;
private int maximumNeighbors;
public DefaultAtomMatcher()
{
symbol = null;
maximumNeighbors = -1;
}
| public DefaultAtomMatcher(Atom atom) |
metamolecular/mx | src/com/metamolecular/mx/query/BondMatcher.java | // Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import com.metamolecular.mx.model.Bond; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.query;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface BondMatcher
{ | // Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/query/BondMatcher.java
import com.metamolecular.mx.model.Bond;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.query;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface BondMatcher
{ | public boolean matches(Bond bond); |
metamolecular/mx | src/com/metamolecular/mx/model/AtomicSystem.java | // Path: src/com/metamolecular/mx/calc/DefaultMeasurement.java
// public class DefaultMeasurement implements Measurement
// {
// private double value;
// private double error;
// private String units;
//
// public DefaultMeasurement(double value, double error, String units)
// {
// this.value = value;
// this.error = error;
// this.units = units;
// }
//
// public double getError()
// {
// return error;
// }
//
// public String getUnits()
// {
// return units;
// }
//
// public double getValue()
// {
// return value;
// }
// }
//
// Path: src/com/metamolecular/mx/calc/Measurement.java
// public interface Measurement
// {
// public double getValue();
//
// public double getError();
//
// public String getUnits();
// }
| import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.metamolecular.mx.calc.DefaultMeasurement;
import com.metamolecular.mx.calc.Measurement;
import java.io.InputStream;
import java.util.ArrayList; |
loadFile();
}
public boolean hasElement(String atomicSymbol)
{
return entries.containsKey(atomicSymbol);
}
public int getAtomicNumber(String atomicSymbol)
{
Entry entry = getEntry(atomicSymbol);
return entry.atomicNumber;
}
public List<Isotope> getIsotopes(String atomicSymbol)
{
Entry entry = getEntry(atomicSymbol);
return entry.getIsotopes();
}
public Isotope getIsotope(String atomicSymbol, int massNumber)
{
Entry entry = getEntry(atomicSymbol);
return entry.getIsotope(massNumber);
}
| // Path: src/com/metamolecular/mx/calc/DefaultMeasurement.java
// public class DefaultMeasurement implements Measurement
// {
// private double value;
// private double error;
// private String units;
//
// public DefaultMeasurement(double value, double error, String units)
// {
// this.value = value;
// this.error = error;
// this.units = units;
// }
//
// public double getError()
// {
// return error;
// }
//
// public String getUnits()
// {
// return units;
// }
//
// public double getValue()
// {
// return value;
// }
// }
//
// Path: src/com/metamolecular/mx/calc/Measurement.java
// public interface Measurement
// {
// public double getValue();
//
// public double getError();
//
// public String getUnits();
// }
// Path: src/com/metamolecular/mx/model/AtomicSystem.java
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.metamolecular.mx.calc.DefaultMeasurement;
import com.metamolecular.mx.calc.Measurement;
import java.io.InputStream;
import java.util.ArrayList;
loadFile();
}
public boolean hasElement(String atomicSymbol)
{
return entries.containsKey(atomicSymbol);
}
public int getAtomicNumber(String atomicSymbol)
{
Entry entry = getEntry(atomicSymbol);
return entry.atomicNumber;
}
public List<Isotope> getIsotopes(String atomicSymbol)
{
Entry entry = getEntry(atomicSymbol);
return entry.getIsotopes();
}
public Isotope getIsotope(String atomicSymbol, int massNumber)
{
Entry entry = getEntry(atomicSymbol);
return entry.getIsotope(massNumber);
}
| public Measurement getAverageMass(String atomicSymbol) |
metamolecular/mx | src/com/metamolecular/mx/model/AtomicSystem.java | // Path: src/com/metamolecular/mx/calc/DefaultMeasurement.java
// public class DefaultMeasurement implements Measurement
// {
// private double value;
// private double error;
// private String units;
//
// public DefaultMeasurement(double value, double error, String units)
// {
// this.value = value;
// this.error = error;
// this.units = units;
// }
//
// public double getError()
// {
// return error;
// }
//
// public String getUnits()
// {
// return units;
// }
//
// public double getValue()
// {
// return value;
// }
// }
//
// Path: src/com/metamolecular/mx/calc/Measurement.java
// public interface Measurement
// {
// public double getValue();
//
// public double getError();
//
// public String getUnits();
// }
| import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.metamolecular.mx.calc.DefaultMeasurement;
import com.metamolecular.mx.calc.Measurement;
import java.io.InputStream;
import java.util.ArrayList; |
NodeList nodes = document.getElementsByTagName("entry");
for (int i = 0; i < nodes.getLength(); i++)
{
Node node = nodes.item(i);
String symbol = node.getAttributes().getNamedItem("symbol").getNodeValue();
entries.put(symbol, new Entry(node));
}
}
private Entry getEntry(String symbol)
{
Entry entry = entries.get(symbol);
if (entry == null)
{
throw new IllegalArgumentException("No such element: " + symbol);
}
return entry;
}
private Measurement createMeasurement(Node node, String units)
{
double value = Double.parseDouble(node.getAttributes().getNamedItem("value").getNodeValue());
double error = Double.parseDouble(node.getAttributes().getNamedItem("error").getNodeValue());
| // Path: src/com/metamolecular/mx/calc/DefaultMeasurement.java
// public class DefaultMeasurement implements Measurement
// {
// private double value;
// private double error;
// private String units;
//
// public DefaultMeasurement(double value, double error, String units)
// {
// this.value = value;
// this.error = error;
// this.units = units;
// }
//
// public double getError()
// {
// return error;
// }
//
// public String getUnits()
// {
// return units;
// }
//
// public double getValue()
// {
// return value;
// }
// }
//
// Path: src/com/metamolecular/mx/calc/Measurement.java
// public interface Measurement
// {
// public double getValue();
//
// public double getError();
//
// public String getUnits();
// }
// Path: src/com/metamolecular/mx/model/AtomicSystem.java
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.metamolecular.mx.calc.DefaultMeasurement;
import com.metamolecular.mx.calc.Measurement;
import java.io.InputStream;
import java.util.ArrayList;
NodeList nodes = document.getElementsByTagName("entry");
for (int i = 0; i < nodes.getLength(); i++)
{
Node node = nodes.item(i);
String symbol = node.getAttributes().getNamedItem("symbol").getNodeValue();
entries.put(symbol, new Entry(node));
}
}
private Entry getEntry(String symbol)
{
Entry entry = entries.get(symbol);
if (entry == null)
{
throw new IllegalArgumentException("No such element: " + symbol);
}
return entry;
}
private Measurement createMeasurement(Node node, String units)
{
double value = Double.parseDouble(node.getAttributes().getNamedItem("value").getNodeValue());
double error = Double.parseDouble(node.getAttributes().getNamedItem("error").getNodeValue());
| return new DefaultMeasurement(value, error, units); |
metamolecular/mx | src/com/metamolecular/mx/map/DefaultMapper.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.map;
/**
*
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultMapper implements Mapper
{
private Query query; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/map/DefaultMapper.java
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.map;
/**
*
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultMapper implements Mapper
{
private Query query; | private List<Map<Node, Atom>> maps; |
metamolecular/mx | src/com/metamolecular/mx/map/DefaultMapper.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.map;
/**
*
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultMapper implements Mapper
{
private Query query;
private List<Map<Node, Atom>> maps;
public DefaultMapper(Query query)
{
this.query = query;
this.maps = new ArrayList<Map<Node, Atom>>();
}
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/map/DefaultMapper.java
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.map;
/**
*
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultMapper implements Mapper
{
private Query query;
private List<Map<Node, Atom>> maps;
public DefaultMapper(Query query)
{
this.query = query;
this.maps = new ArrayList<Map<Node, Atom>>();
}
| public DefaultMapper(Molecule molecule) |
metamolecular/mx | src/com/metamolecular/mx/test/SMILESTokenizerTest.java | // Path: src/com/metamolecular/mx/io/daylight/SMILESTokenizer.java
// public class SMILESTokenizer
// {
// private static String or = "|";
// private static String element = "[A-Z][a-z]?" + or + "[a-z]";
// private static String bond = "[-=#:\\.]";
// private static String ring = "[1-9]" + or + "\\%[1-9][0-9]";
// private static String bracket = "\\[[^\\]]*\\]";
// private static String parens = "[\\(\\)]";
// private static String regex = element + or + bracket + or + bond + or + ring + or + parens;
// private static Pattern pattern = Pattern.compile(regex);
// private static Pattern blacklist = Pattern.compile(".*[^A-Za-z0-9\\(\\)\\[\\]\\-=#:\\.\\%].*");
//
// private Iterator<String> iterator;
//
// public SMILESTokenizer(String smiles)
// {
// assertNoBlacklistedCharacters(smiles);
//
// List<String> tokens = fragment(smiles);
//
// this.iterator = tokens.iterator();
// }
//
// public boolean hasNextToken()
// {
// return iterator.hasNext();
// }
//
// public String nextToken()
// {
// return iterator.next();
// }
//
// public List<String> fragment(String string)
// {
// Matcher matcher = pattern.matcher(string);
// String[] foundStrings = new String[string.length()];
// int foundStringCount = 0;
// int index = 0;
//
// while (matcher.find(index))
// {
// int start = matcher.start();
// int end = matcher.end();
//
// if (start == 0 && end == 0)
// {
// break;
// }
//
// foundStrings[foundStringCount] = string.substring(start, end);
// index = end;
// foundStringCount++;
// }
//
// List<String> result = new ArrayList<String>();
//
// for (int i = 0; i < foundStringCount; i++)
// {
// result.add(foundStrings[i]);
// }
//
// return result;
// }
//
// private void assertNoBlacklistedCharacters(String smiles)
// {
// if (blacklist.matcher(smiles).matches())
// {
// throw new IllegalArgumentException("Invalid SMILES character in \"" + smiles + "\"");
// }
// }
// }
| import com.metamolecular.mx.io.daylight.SMILESTokenizer;
import junit.framework.TestCase; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class SMILESTokenizerTest extends TestCase
{
@Override
protected void setUp() throws Exception
{
}
public void testItShouldFindAllTokensInALinearChain()
{ | // Path: src/com/metamolecular/mx/io/daylight/SMILESTokenizer.java
// public class SMILESTokenizer
// {
// private static String or = "|";
// private static String element = "[A-Z][a-z]?" + or + "[a-z]";
// private static String bond = "[-=#:\\.]";
// private static String ring = "[1-9]" + or + "\\%[1-9][0-9]";
// private static String bracket = "\\[[^\\]]*\\]";
// private static String parens = "[\\(\\)]";
// private static String regex = element + or + bracket + or + bond + or + ring + or + parens;
// private static Pattern pattern = Pattern.compile(regex);
// private static Pattern blacklist = Pattern.compile(".*[^A-Za-z0-9\\(\\)\\[\\]\\-=#:\\.\\%].*");
//
// private Iterator<String> iterator;
//
// public SMILESTokenizer(String smiles)
// {
// assertNoBlacklistedCharacters(smiles);
//
// List<String> tokens = fragment(smiles);
//
// this.iterator = tokens.iterator();
// }
//
// public boolean hasNextToken()
// {
// return iterator.hasNext();
// }
//
// public String nextToken()
// {
// return iterator.next();
// }
//
// public List<String> fragment(String string)
// {
// Matcher matcher = pattern.matcher(string);
// String[] foundStrings = new String[string.length()];
// int foundStringCount = 0;
// int index = 0;
//
// while (matcher.find(index))
// {
// int start = matcher.start();
// int end = matcher.end();
//
// if (start == 0 && end == 0)
// {
// break;
// }
//
// foundStrings[foundStringCount] = string.substring(start, end);
// index = end;
// foundStringCount++;
// }
//
// List<String> result = new ArrayList<String>();
//
// for (int i = 0; i < foundStringCount; i++)
// {
// result.add(foundStrings[i]);
// }
//
// return result;
// }
//
// private void assertNoBlacklistedCharacters(String smiles)
// {
// if (blacklist.matcher(smiles).matches())
// {
// throw new IllegalArgumentException("Invalid SMILES character in \"" + smiles + "\"");
// }
// }
// }
// Path: src/com/metamolecular/mx/test/SMILESTokenizerTest.java
import com.metamolecular.mx.io.daylight.SMILESTokenizer;
import junit.framework.TestCase;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class SMILESTokenizerTest extends TestCase
{
@Override
protected void setUp() throws Exception
{
}
public void testItShouldFindAllTokensInALinearChain()
{ | SMILESTokenizer tokenizer = new SMILESTokenizer("CCCCCC"); |
metamolecular/mx | src/com/metamolecular/mx/model/Isotope.java | // Path: src/com/metamolecular/mx/calc/Measurement.java
// public interface Measurement
// {
// public double getValue();
//
// public double getError();
//
// public String getUnits();
// }
| import com.metamolecular.mx.calc.Measurement; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.model;
/**
*
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Isotope
{
public int getMassNumber();
| // Path: src/com/metamolecular/mx/calc/Measurement.java
// public interface Measurement
// {
// public double getValue();
//
// public double getError();
//
// public String getUnits();
// }
// Path: src/com/metamolecular/mx/model/Isotope.java
import com.metamolecular.mx.calc.Measurement;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.model;
/**
*
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Isotope
{
public int getMassNumber();
| public Measurement getMass(); |
metamolecular/mx | src/com/metamolecular/mx/fingerprint/Fingerprinter.java | // Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import com.metamolecular.mx.model.Molecule;
import java.util.BitSet; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.fingerprint;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Fingerprinter
{ | // Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/fingerprint/Fingerprinter.java
import com.metamolecular.mx.model.Molecule;
import java.util.BitSet;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.fingerprint;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public interface Fingerprinter
{ | public BitSet getFingerprint(Molecule molecule); |
metamolecular/mx | src/com/metamolecular/mx/test/DefaultWalkerTest.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/walk/Step.java
// public interface Step
// {
// public Atom getAtom();
//
// public List<Atom> getPath();
//
// public boolean hasNextBond();
//
// public Step nextStep(Bond bond);
//
// public Bond nextBond();
//
// public boolean closesRingWith(Bond bond);
// }
//
// Path: src/com/metamolecular/mx/walk/DefaultWalker.java
// public class DefaultWalker implements Walker
// {
// private int maximumDepth;
//
// public int getMaximumDepth()
// {
// return maximumDepth;
// }
//
// public void setMaximumDepth(int depth)
// {
// this.maximumDepth = depth;
// }
//
// public void walk(Atom atom, Reporter reporter)
// {
// Step step = new DefaultStep(atom);
//
// reporter.walkStart(atom);
// step(step, reporter);
// reporter.walkEnd(atom);
// }
//
// public void step(Step step, Reporter reporter)
// {
// reporter.atomFound(step.getAtom());
//
// if (abort(step))
// {
// return;
// }
//
// boolean inBranch = false;
//
// while (true)
// {
// if (step.hasNextBond())
// {
// Bond bond = step.nextBond();
//
// if (inBranch)
// {
// reporter.branchStart(step.getAtom());
// }
//
// reporter.bondFound(bond);
//
// if (step.closesRingWith(bond))
// {
// reporter.ringClosed(bond);
// }
// else
// {
// step(step.nextStep(bond), reporter);
// }
//
// if (inBranch)
// {
// reporter.branchEnd(step.getAtom());
// }
//
// inBranch = true;
// }
// else
// {
// break;
// }
// }
// }
//
// private boolean abort(Step step)
// {
// return (maximumDepth != 0 && step.getPath().size() >= maximumDepth);
// }
// }
//
// Path: src/com/metamolecular/mx/walk/Reporter.java
// public interface Reporter
// {
// public void walkStart(Atom atom);
//
// public void atomFound(Atom atom);
//
// public void bondFound(Bond bond);
//
// public void branchStart(Atom atom);
//
// public void branchEnd(Atom atom);
//
// public void ringClosed(Bond bond);
//
// public void walkEnd(Atom atom);
// }
| import com.metamolecular.mx.walk.Reporter;
import java.util.List;
import junit.framework.TestCase;
import org.mockito.InOrder;
import static org.mockito.Mockito.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.walk.Step;
import com.metamolecular.mx.walk.DefaultWalker; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalkerTest extends TestCase
{ | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/walk/Step.java
// public interface Step
// {
// public Atom getAtom();
//
// public List<Atom> getPath();
//
// public boolean hasNextBond();
//
// public Step nextStep(Bond bond);
//
// public Bond nextBond();
//
// public boolean closesRingWith(Bond bond);
// }
//
// Path: src/com/metamolecular/mx/walk/DefaultWalker.java
// public class DefaultWalker implements Walker
// {
// private int maximumDepth;
//
// public int getMaximumDepth()
// {
// return maximumDepth;
// }
//
// public void setMaximumDepth(int depth)
// {
// this.maximumDepth = depth;
// }
//
// public void walk(Atom atom, Reporter reporter)
// {
// Step step = new DefaultStep(atom);
//
// reporter.walkStart(atom);
// step(step, reporter);
// reporter.walkEnd(atom);
// }
//
// public void step(Step step, Reporter reporter)
// {
// reporter.atomFound(step.getAtom());
//
// if (abort(step))
// {
// return;
// }
//
// boolean inBranch = false;
//
// while (true)
// {
// if (step.hasNextBond())
// {
// Bond bond = step.nextBond();
//
// if (inBranch)
// {
// reporter.branchStart(step.getAtom());
// }
//
// reporter.bondFound(bond);
//
// if (step.closesRingWith(bond))
// {
// reporter.ringClosed(bond);
// }
// else
// {
// step(step.nextStep(bond), reporter);
// }
//
// if (inBranch)
// {
// reporter.branchEnd(step.getAtom());
// }
//
// inBranch = true;
// }
// else
// {
// break;
// }
// }
// }
//
// private boolean abort(Step step)
// {
// return (maximumDepth != 0 && step.getPath().size() >= maximumDepth);
// }
// }
//
// Path: src/com/metamolecular/mx/walk/Reporter.java
// public interface Reporter
// {
// public void walkStart(Atom atom);
//
// public void atomFound(Atom atom);
//
// public void bondFound(Bond bond);
//
// public void branchStart(Atom atom);
//
// public void branchEnd(Atom atom);
//
// public void ringClosed(Bond bond);
//
// public void walkEnd(Atom atom);
// }
// Path: src/com/metamolecular/mx/test/DefaultWalkerTest.java
import com.metamolecular.mx.walk.Reporter;
import java.util.List;
import junit.framework.TestCase;
import org.mockito.InOrder;
import static org.mockito.Mockito.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.walk.Step;
import com.metamolecular.mx.walk.DefaultWalker;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalkerTest extends TestCase
{ | private DefaultWalker walker; |
metamolecular/mx | src/com/metamolecular/mx/test/DefaultWalkerTest.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/walk/Step.java
// public interface Step
// {
// public Atom getAtom();
//
// public List<Atom> getPath();
//
// public boolean hasNextBond();
//
// public Step nextStep(Bond bond);
//
// public Bond nextBond();
//
// public boolean closesRingWith(Bond bond);
// }
//
// Path: src/com/metamolecular/mx/walk/DefaultWalker.java
// public class DefaultWalker implements Walker
// {
// private int maximumDepth;
//
// public int getMaximumDepth()
// {
// return maximumDepth;
// }
//
// public void setMaximumDepth(int depth)
// {
// this.maximumDepth = depth;
// }
//
// public void walk(Atom atom, Reporter reporter)
// {
// Step step = new DefaultStep(atom);
//
// reporter.walkStart(atom);
// step(step, reporter);
// reporter.walkEnd(atom);
// }
//
// public void step(Step step, Reporter reporter)
// {
// reporter.atomFound(step.getAtom());
//
// if (abort(step))
// {
// return;
// }
//
// boolean inBranch = false;
//
// while (true)
// {
// if (step.hasNextBond())
// {
// Bond bond = step.nextBond();
//
// if (inBranch)
// {
// reporter.branchStart(step.getAtom());
// }
//
// reporter.bondFound(bond);
//
// if (step.closesRingWith(bond))
// {
// reporter.ringClosed(bond);
// }
// else
// {
// step(step.nextStep(bond), reporter);
// }
//
// if (inBranch)
// {
// reporter.branchEnd(step.getAtom());
// }
//
// inBranch = true;
// }
// else
// {
// break;
// }
// }
// }
//
// private boolean abort(Step step)
// {
// return (maximumDepth != 0 && step.getPath().size() >= maximumDepth);
// }
// }
//
// Path: src/com/metamolecular/mx/walk/Reporter.java
// public interface Reporter
// {
// public void walkStart(Atom atom);
//
// public void atomFound(Atom atom);
//
// public void bondFound(Bond bond);
//
// public void branchStart(Atom atom);
//
// public void branchEnd(Atom atom);
//
// public void ringClosed(Bond bond);
//
// public void walkEnd(Atom atom);
// }
| import com.metamolecular.mx.walk.Reporter;
import java.util.List;
import junit.framework.TestCase;
import org.mockito.InOrder;
import static org.mockito.Mockito.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.walk.Step;
import com.metamolecular.mx.walk.DefaultWalker; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalkerTest extends TestCase
{
private DefaultWalker walker; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/walk/Step.java
// public interface Step
// {
// public Atom getAtom();
//
// public List<Atom> getPath();
//
// public boolean hasNextBond();
//
// public Step nextStep(Bond bond);
//
// public Bond nextBond();
//
// public boolean closesRingWith(Bond bond);
// }
//
// Path: src/com/metamolecular/mx/walk/DefaultWalker.java
// public class DefaultWalker implements Walker
// {
// private int maximumDepth;
//
// public int getMaximumDepth()
// {
// return maximumDepth;
// }
//
// public void setMaximumDepth(int depth)
// {
// this.maximumDepth = depth;
// }
//
// public void walk(Atom atom, Reporter reporter)
// {
// Step step = new DefaultStep(atom);
//
// reporter.walkStart(atom);
// step(step, reporter);
// reporter.walkEnd(atom);
// }
//
// public void step(Step step, Reporter reporter)
// {
// reporter.atomFound(step.getAtom());
//
// if (abort(step))
// {
// return;
// }
//
// boolean inBranch = false;
//
// while (true)
// {
// if (step.hasNextBond())
// {
// Bond bond = step.nextBond();
//
// if (inBranch)
// {
// reporter.branchStart(step.getAtom());
// }
//
// reporter.bondFound(bond);
//
// if (step.closesRingWith(bond))
// {
// reporter.ringClosed(bond);
// }
// else
// {
// step(step.nextStep(bond), reporter);
// }
//
// if (inBranch)
// {
// reporter.branchEnd(step.getAtom());
// }
//
// inBranch = true;
// }
// else
// {
// break;
// }
// }
// }
//
// private boolean abort(Step step)
// {
// return (maximumDepth != 0 && step.getPath().size() >= maximumDepth);
// }
// }
//
// Path: src/com/metamolecular/mx/walk/Reporter.java
// public interface Reporter
// {
// public void walkStart(Atom atom);
//
// public void atomFound(Atom atom);
//
// public void bondFound(Bond bond);
//
// public void branchStart(Atom atom);
//
// public void branchEnd(Atom atom);
//
// public void ringClosed(Bond bond);
//
// public void walkEnd(Atom atom);
// }
// Path: src/com/metamolecular/mx/test/DefaultWalkerTest.java
import com.metamolecular.mx.walk.Reporter;
import java.util.List;
import junit.framework.TestCase;
import org.mockito.InOrder;
import static org.mockito.Mockito.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.walk.Step;
import com.metamolecular.mx.walk.DefaultWalker;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalkerTest extends TestCase
{
private DefaultWalker walker; | private Reporter reporter; |
metamolecular/mx | src/com/metamolecular/mx/test/DefaultWalkerTest.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/walk/Step.java
// public interface Step
// {
// public Atom getAtom();
//
// public List<Atom> getPath();
//
// public boolean hasNextBond();
//
// public Step nextStep(Bond bond);
//
// public Bond nextBond();
//
// public boolean closesRingWith(Bond bond);
// }
//
// Path: src/com/metamolecular/mx/walk/DefaultWalker.java
// public class DefaultWalker implements Walker
// {
// private int maximumDepth;
//
// public int getMaximumDepth()
// {
// return maximumDepth;
// }
//
// public void setMaximumDepth(int depth)
// {
// this.maximumDepth = depth;
// }
//
// public void walk(Atom atom, Reporter reporter)
// {
// Step step = new DefaultStep(atom);
//
// reporter.walkStart(atom);
// step(step, reporter);
// reporter.walkEnd(atom);
// }
//
// public void step(Step step, Reporter reporter)
// {
// reporter.atomFound(step.getAtom());
//
// if (abort(step))
// {
// return;
// }
//
// boolean inBranch = false;
//
// while (true)
// {
// if (step.hasNextBond())
// {
// Bond bond = step.nextBond();
//
// if (inBranch)
// {
// reporter.branchStart(step.getAtom());
// }
//
// reporter.bondFound(bond);
//
// if (step.closesRingWith(bond))
// {
// reporter.ringClosed(bond);
// }
// else
// {
// step(step.nextStep(bond), reporter);
// }
//
// if (inBranch)
// {
// reporter.branchEnd(step.getAtom());
// }
//
// inBranch = true;
// }
// else
// {
// break;
// }
// }
// }
//
// private boolean abort(Step step)
// {
// return (maximumDepth != 0 && step.getPath().size() >= maximumDepth);
// }
// }
//
// Path: src/com/metamolecular/mx/walk/Reporter.java
// public interface Reporter
// {
// public void walkStart(Atom atom);
//
// public void atomFound(Atom atom);
//
// public void bondFound(Bond bond);
//
// public void branchStart(Atom atom);
//
// public void branchEnd(Atom atom);
//
// public void ringClosed(Bond bond);
//
// public void walkEnd(Atom atom);
// }
| import com.metamolecular.mx.walk.Reporter;
import java.util.List;
import junit.framework.TestCase;
import org.mockito.InOrder;
import static org.mockito.Mockito.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.walk.Step;
import com.metamolecular.mx.walk.DefaultWalker; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalkerTest extends TestCase
{
private DefaultWalker walker;
private Reporter reporter; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/walk/Step.java
// public interface Step
// {
// public Atom getAtom();
//
// public List<Atom> getPath();
//
// public boolean hasNextBond();
//
// public Step nextStep(Bond bond);
//
// public Bond nextBond();
//
// public boolean closesRingWith(Bond bond);
// }
//
// Path: src/com/metamolecular/mx/walk/DefaultWalker.java
// public class DefaultWalker implements Walker
// {
// private int maximumDepth;
//
// public int getMaximumDepth()
// {
// return maximumDepth;
// }
//
// public void setMaximumDepth(int depth)
// {
// this.maximumDepth = depth;
// }
//
// public void walk(Atom atom, Reporter reporter)
// {
// Step step = new DefaultStep(atom);
//
// reporter.walkStart(atom);
// step(step, reporter);
// reporter.walkEnd(atom);
// }
//
// public void step(Step step, Reporter reporter)
// {
// reporter.atomFound(step.getAtom());
//
// if (abort(step))
// {
// return;
// }
//
// boolean inBranch = false;
//
// while (true)
// {
// if (step.hasNextBond())
// {
// Bond bond = step.nextBond();
//
// if (inBranch)
// {
// reporter.branchStart(step.getAtom());
// }
//
// reporter.bondFound(bond);
//
// if (step.closesRingWith(bond))
// {
// reporter.ringClosed(bond);
// }
// else
// {
// step(step.nextStep(bond), reporter);
// }
//
// if (inBranch)
// {
// reporter.branchEnd(step.getAtom());
// }
//
// inBranch = true;
// }
// else
// {
// break;
// }
// }
// }
//
// private boolean abort(Step step)
// {
// return (maximumDepth != 0 && step.getPath().size() >= maximumDepth);
// }
// }
//
// Path: src/com/metamolecular/mx/walk/Reporter.java
// public interface Reporter
// {
// public void walkStart(Atom atom);
//
// public void atomFound(Atom atom);
//
// public void bondFound(Bond bond);
//
// public void branchStart(Atom atom);
//
// public void branchEnd(Atom atom);
//
// public void ringClosed(Bond bond);
//
// public void walkEnd(Atom atom);
// }
// Path: src/com/metamolecular/mx/test/DefaultWalkerTest.java
import com.metamolecular.mx.walk.Reporter;
import java.util.List;
import junit.framework.TestCase;
import org.mockito.InOrder;
import static org.mockito.Mockito.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.walk.Step;
import com.metamolecular.mx.walk.DefaultWalker;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalkerTest extends TestCase
{
private DefaultWalker walker;
private Reporter reporter; | private Step step; |
metamolecular/mx | src/com/metamolecular/mx/test/DefaultWalkerTest.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/walk/Step.java
// public interface Step
// {
// public Atom getAtom();
//
// public List<Atom> getPath();
//
// public boolean hasNextBond();
//
// public Step nextStep(Bond bond);
//
// public Bond nextBond();
//
// public boolean closesRingWith(Bond bond);
// }
//
// Path: src/com/metamolecular/mx/walk/DefaultWalker.java
// public class DefaultWalker implements Walker
// {
// private int maximumDepth;
//
// public int getMaximumDepth()
// {
// return maximumDepth;
// }
//
// public void setMaximumDepth(int depth)
// {
// this.maximumDepth = depth;
// }
//
// public void walk(Atom atom, Reporter reporter)
// {
// Step step = new DefaultStep(atom);
//
// reporter.walkStart(atom);
// step(step, reporter);
// reporter.walkEnd(atom);
// }
//
// public void step(Step step, Reporter reporter)
// {
// reporter.atomFound(step.getAtom());
//
// if (abort(step))
// {
// return;
// }
//
// boolean inBranch = false;
//
// while (true)
// {
// if (step.hasNextBond())
// {
// Bond bond = step.nextBond();
//
// if (inBranch)
// {
// reporter.branchStart(step.getAtom());
// }
//
// reporter.bondFound(bond);
//
// if (step.closesRingWith(bond))
// {
// reporter.ringClosed(bond);
// }
// else
// {
// step(step.nextStep(bond), reporter);
// }
//
// if (inBranch)
// {
// reporter.branchEnd(step.getAtom());
// }
//
// inBranch = true;
// }
// else
// {
// break;
// }
// }
// }
//
// private boolean abort(Step step)
// {
// return (maximumDepth != 0 && step.getPath().size() >= maximumDepth);
// }
// }
//
// Path: src/com/metamolecular/mx/walk/Reporter.java
// public interface Reporter
// {
// public void walkStart(Atom atom);
//
// public void atomFound(Atom atom);
//
// public void bondFound(Bond bond);
//
// public void branchStart(Atom atom);
//
// public void branchEnd(Atom atom);
//
// public void ringClosed(Bond bond);
//
// public void walkEnd(Atom atom);
// }
| import com.metamolecular.mx.walk.Reporter;
import java.util.List;
import junit.framework.TestCase;
import org.mockito.InOrder;
import static org.mockito.Mockito.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.walk.Step;
import com.metamolecular.mx.walk.DefaultWalker; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalkerTest extends TestCase
{
private DefaultWalker walker;
private Reporter reporter;
private Step step;
private List path; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/walk/Step.java
// public interface Step
// {
// public Atom getAtom();
//
// public List<Atom> getPath();
//
// public boolean hasNextBond();
//
// public Step nextStep(Bond bond);
//
// public Bond nextBond();
//
// public boolean closesRingWith(Bond bond);
// }
//
// Path: src/com/metamolecular/mx/walk/DefaultWalker.java
// public class DefaultWalker implements Walker
// {
// private int maximumDepth;
//
// public int getMaximumDepth()
// {
// return maximumDepth;
// }
//
// public void setMaximumDepth(int depth)
// {
// this.maximumDepth = depth;
// }
//
// public void walk(Atom atom, Reporter reporter)
// {
// Step step = new DefaultStep(atom);
//
// reporter.walkStart(atom);
// step(step, reporter);
// reporter.walkEnd(atom);
// }
//
// public void step(Step step, Reporter reporter)
// {
// reporter.atomFound(step.getAtom());
//
// if (abort(step))
// {
// return;
// }
//
// boolean inBranch = false;
//
// while (true)
// {
// if (step.hasNextBond())
// {
// Bond bond = step.nextBond();
//
// if (inBranch)
// {
// reporter.branchStart(step.getAtom());
// }
//
// reporter.bondFound(bond);
//
// if (step.closesRingWith(bond))
// {
// reporter.ringClosed(bond);
// }
// else
// {
// step(step.nextStep(bond), reporter);
// }
//
// if (inBranch)
// {
// reporter.branchEnd(step.getAtom());
// }
//
// inBranch = true;
// }
// else
// {
// break;
// }
// }
// }
//
// private boolean abort(Step step)
// {
// return (maximumDepth != 0 && step.getPath().size() >= maximumDepth);
// }
// }
//
// Path: src/com/metamolecular/mx/walk/Reporter.java
// public interface Reporter
// {
// public void walkStart(Atom atom);
//
// public void atomFound(Atom atom);
//
// public void bondFound(Bond bond);
//
// public void branchStart(Atom atom);
//
// public void branchEnd(Atom atom);
//
// public void ringClosed(Bond bond);
//
// public void walkEnd(Atom atom);
// }
// Path: src/com/metamolecular/mx/test/DefaultWalkerTest.java
import com.metamolecular.mx.walk.Reporter;
import java.util.List;
import junit.framework.TestCase;
import org.mockito.InOrder;
import static org.mockito.Mockito.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.walk.Step;
import com.metamolecular.mx.walk.DefaultWalker;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalkerTest extends TestCase
{
private DefaultWalker walker;
private Reporter reporter;
private Step step;
private List path; | private Atom atom; |
metamolecular/mx | src/com/metamolecular/mx/test/DefaultWalkerTest.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/walk/Step.java
// public interface Step
// {
// public Atom getAtom();
//
// public List<Atom> getPath();
//
// public boolean hasNextBond();
//
// public Step nextStep(Bond bond);
//
// public Bond nextBond();
//
// public boolean closesRingWith(Bond bond);
// }
//
// Path: src/com/metamolecular/mx/walk/DefaultWalker.java
// public class DefaultWalker implements Walker
// {
// private int maximumDepth;
//
// public int getMaximumDepth()
// {
// return maximumDepth;
// }
//
// public void setMaximumDepth(int depth)
// {
// this.maximumDepth = depth;
// }
//
// public void walk(Atom atom, Reporter reporter)
// {
// Step step = new DefaultStep(atom);
//
// reporter.walkStart(atom);
// step(step, reporter);
// reporter.walkEnd(atom);
// }
//
// public void step(Step step, Reporter reporter)
// {
// reporter.atomFound(step.getAtom());
//
// if (abort(step))
// {
// return;
// }
//
// boolean inBranch = false;
//
// while (true)
// {
// if (step.hasNextBond())
// {
// Bond bond = step.nextBond();
//
// if (inBranch)
// {
// reporter.branchStart(step.getAtom());
// }
//
// reporter.bondFound(bond);
//
// if (step.closesRingWith(bond))
// {
// reporter.ringClosed(bond);
// }
// else
// {
// step(step.nextStep(bond), reporter);
// }
//
// if (inBranch)
// {
// reporter.branchEnd(step.getAtom());
// }
//
// inBranch = true;
// }
// else
// {
// break;
// }
// }
// }
//
// private boolean abort(Step step)
// {
// return (maximumDepth != 0 && step.getPath().size() >= maximumDepth);
// }
// }
//
// Path: src/com/metamolecular/mx/walk/Reporter.java
// public interface Reporter
// {
// public void walkStart(Atom atom);
//
// public void atomFound(Atom atom);
//
// public void bondFound(Bond bond);
//
// public void branchStart(Atom atom);
//
// public void branchEnd(Atom atom);
//
// public void ringClosed(Bond bond);
//
// public void walkEnd(Atom atom);
// }
| import com.metamolecular.mx.walk.Reporter;
import java.util.List;
import junit.framework.TestCase;
import org.mockito.InOrder;
import static org.mockito.Mockito.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.walk.Step;
import com.metamolecular.mx.walk.DefaultWalker; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalkerTest extends TestCase
{
private DefaultWalker walker;
private Reporter reporter;
private Step step;
private List path;
private Atom atom; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/walk/Step.java
// public interface Step
// {
// public Atom getAtom();
//
// public List<Atom> getPath();
//
// public boolean hasNextBond();
//
// public Step nextStep(Bond bond);
//
// public Bond nextBond();
//
// public boolean closesRingWith(Bond bond);
// }
//
// Path: src/com/metamolecular/mx/walk/DefaultWalker.java
// public class DefaultWalker implements Walker
// {
// private int maximumDepth;
//
// public int getMaximumDepth()
// {
// return maximumDepth;
// }
//
// public void setMaximumDepth(int depth)
// {
// this.maximumDepth = depth;
// }
//
// public void walk(Atom atom, Reporter reporter)
// {
// Step step = new DefaultStep(atom);
//
// reporter.walkStart(atom);
// step(step, reporter);
// reporter.walkEnd(atom);
// }
//
// public void step(Step step, Reporter reporter)
// {
// reporter.atomFound(step.getAtom());
//
// if (abort(step))
// {
// return;
// }
//
// boolean inBranch = false;
//
// while (true)
// {
// if (step.hasNextBond())
// {
// Bond bond = step.nextBond();
//
// if (inBranch)
// {
// reporter.branchStart(step.getAtom());
// }
//
// reporter.bondFound(bond);
//
// if (step.closesRingWith(bond))
// {
// reporter.ringClosed(bond);
// }
// else
// {
// step(step.nextStep(bond), reporter);
// }
//
// if (inBranch)
// {
// reporter.branchEnd(step.getAtom());
// }
//
// inBranch = true;
// }
// else
// {
// break;
// }
// }
// }
//
// private boolean abort(Step step)
// {
// return (maximumDepth != 0 && step.getPath().size() >= maximumDepth);
// }
// }
//
// Path: src/com/metamolecular/mx/walk/Reporter.java
// public interface Reporter
// {
// public void walkStart(Atom atom);
//
// public void atomFound(Atom atom);
//
// public void bondFound(Bond bond);
//
// public void branchStart(Atom atom);
//
// public void branchEnd(Atom atom);
//
// public void ringClosed(Bond bond);
//
// public void walkEnd(Atom atom);
// }
// Path: src/com/metamolecular/mx/test/DefaultWalkerTest.java
import com.metamolecular.mx.walk.Reporter;
import java.util.List;
import junit.framework.TestCase;
import org.mockito.InOrder;
import static org.mockito.Mockito.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.walk.Step;
import com.metamolecular.mx.walk.DefaultWalker;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.test;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalkerTest extends TestCase
{
private DefaultWalker walker;
private Reporter reporter;
private Step step;
private List path;
private Atom atom; | private Bond bond; |
metamolecular/mx | src/com/metamolecular/mx/map/DefaultState.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.map;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultState implements State
{
private List<Match> candidates;
private Query query; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/map/DefaultState.java
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.map;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultState implements State
{
private List<Match> candidates;
private Query query; | private Molecule target; |
metamolecular/mx | src/com/metamolecular/mx/map/DefaultState.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.map;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultState implements State
{
private List<Match> candidates;
private Query query;
private Molecule target;
private List<Node> queryPath; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/map/DefaultState.java
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.map;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultState implements State
{
private List<Match> candidates;
private Query query;
private Molecule target;
private List<Node> queryPath; | private List<Atom> targetPath; |
metamolecular/mx | src/com/metamolecular/mx/map/DefaultState.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule; | }
return true;
}
private boolean matchAtoms(Match match)
{
if (match.getQueryNode().countNeighbors() > match.getTargetAtom().countNeighbors())
{
return false;
}
return match.getQueryNode().getAtomMatcher().matches(match.getTargetAtom());
}
private boolean matchBonds(Match match)
{
if (queryPath.isEmpty())
{
return true;
}
if (!matchBondsToHead(match))
{
return false;
}
for (int i = 0; i < queryPath.size() - 1; i++)
{
Edge queryBond = query.getEdge(queryPath.get(i), match.getQueryNode()); | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/map/DefaultState.java
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.metamolecular.mx.query.*;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule;
}
return true;
}
private boolean matchAtoms(Match match)
{
if (match.getQueryNode().countNeighbors() > match.getTargetAtom().countNeighbors())
{
return false;
}
return match.getQueryNode().getAtomMatcher().matches(match.getTargetAtom());
}
private boolean matchBonds(Match match)
{
if (queryPath.isEmpty())
{
return true;
}
if (!matchBondsToHead(match))
{
return false;
}
for (int i = 0; i < queryPath.size() - 1; i++)
{
Edge queryBond = query.getEdge(queryPath.get(i), match.getQueryNode()); | Bond targetBond = target.getBond(targetPath.get(i), match.getTargetAtom()); |
metamolecular/mx | src/com/metamolecular/mx/ring/PathGraph.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import java.util.Arrays;
import java.util.List;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.ring;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class PathGraph
{
private List<PathEdge> edges; | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/ring/PathGraph.java
import java.util.Arrays;
import java.util.List;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.ring;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class PathGraph
{
private List<PathEdge> edges; | private List<Atom> atoms; |
metamolecular/mx | src/com/metamolecular/mx/ring/PathGraph.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import java.util.Arrays;
import java.util.List;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.ring;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class PathGraph
{
private List<PathEdge> edges;
private List<Atom> atoms;
private int maxRingSize;
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/ring/PathGraph.java
import java.util.Arrays;
import java.util.List;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.ring;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class PathGraph
{
private List<PathEdge> edges;
private List<Atom> atoms;
private int maxRingSize;
| public PathGraph(Molecule molecule) |
metamolecular/mx | src/com/metamolecular/mx/ring/PathGraph.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
| import java.util.Arrays;
import java.util.List;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList; |
private List<PathEdge> getEdges(Atom atom)
{
List<PathEdge> result = new ArrayList();
for (PathEdge edge : edges)
{
if (edge.isCycle())
{
if (edge.getAtoms().contains(atom))
{
result.add(edge);
}
}
else
{
if ((edge.getSource() == atom) || (edge.getTarget() == atom))
{
result.add(edge);
}
}
}
return result;
}
private void loadEdges(Molecule molecule)
{
for (int i = 0; i < molecule.countBonds(); i++)
{ | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
//
// Path: src/com/metamolecular/mx/model/Molecule.java
// public interface Molecule
// {
// public int countAtoms();
//
// public int countBonds();
//
// public int countSuperatoms();
//
// public Atom getAtom(int index);
//
// public Bond getBond(int index);
//
// public Bond getBond(Atom source, Atom target);
//
// public Superatom getSuperatom(int index);
//
// public Superatom addSuperatom();
//
// public Atom addAtom(String symbol, double x, double y, double z);
//
// public Atom addAtom(String symbol);
//
// public void removeAtom(Atom atom);
//
// public Bond connect(Atom source, Atom target, int type, int stereo);
//
// public Bond connect(Atom source, Atom target, int type);
//
// public void removeBond(Bond bond);
//
// public void disconnect(Atom source, Atom target);
//
// public void removeSuperatom(Superatom substructure);
//
// public void clear();
//
// public void beginModify();
//
// public void endModify();
//
// public void addChangeListener(ChangeListener listener);
//
// public void removeChangeListener(ChangeListener listener);
//
// public Molecule copy();
//
// public void copy(Molecule molecule);
// }
// Path: src/com/metamolecular/mx/ring/PathGraph.java
import java.util.Arrays;
import java.util.List;
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
import com.metamolecular.mx.model.Molecule;
import java.util.ArrayList;
private List<PathEdge> getEdges(Atom atom)
{
List<PathEdge> result = new ArrayList();
for (PathEdge edge : edges)
{
if (edge.isCycle())
{
if (edge.getAtoms().contains(atom))
{
result.add(edge);
}
}
else
{
if ((edge.getSource() == atom) || (edge.getTarget() == atom))
{
result.add(edge);
}
}
}
return result;
}
private void loadEdges(Molecule molecule)
{
for (int i = 0; i < molecule.countBonds(); i++)
{ | Bond bond = molecule.getBond(i); |
metamolecular/mx | src/com/metamolecular/mx/walk/DefaultWalker.java | // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
| import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond; | /*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalker implements Walker
{
private int maximumDepth;
public int getMaximumDepth()
{
return maximumDepth;
}
public void setMaximumDepth(int depth)
{
this.maximumDepth = depth;
}
| // Path: src/com/metamolecular/mx/model/Atom.java
// public interface Atom
// {
// public String getSymbol();
//
// public void setSymbol(String newSymbol);
//
// public int getIndex();
//
// public void setIsotope(int isotope);
//
// public int getIsotope();
//
// public boolean hasSingleIsotope();
//
// public void setCharge(int charge);
//
// public int getCharge();
//
// public void setRadical(int radical);
//
// public int getRadical();
//
// public Atom[] getNeighbors();
//
// public Bond[] getBonds();
//
// public Bond getBond(Atom neighbor);
//
// public int countNeighbors();
//
// public boolean isConnectedTo(Atom atom);
//
// public int countVirtualHydrogens();
//
// public double getX();
//
// public double getY();
//
// public double getZ();
//
// public void move(double x, double y, double z);
//
// public int getValence();
//
// public Molecule getMolecule();
// }
//
// Path: src/com/metamolecular/mx/model/Bond.java
// public interface Bond
// {
// public int getIndex();
//
// public Atom getSource();
//
// public Atom getTarget();
//
// public Atom getMate(Atom atom);
//
// public boolean contains(Atom atom);
//
// public void setType(int type);
//
// public int getType();
//
// public void setStereo(int stereo);
//
// public int getStereo();
//
// public void reverse();
//
// public Molecule getMolecule();
//
// public Atom[] getNeighborAtoms();
// }
// Path: src/com/metamolecular/mx/walk/DefaultWalker.java
import com.metamolecular.mx.model.Atom;
import com.metamolecular.mx.model.Bond;
/*
* MX - Essential Cheminformatics
*
* Copyright (c) 2007-2009 Metamolecular, LLC
*
* http://metamolecular.com/mx
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.metamolecular.mx.walk;
/**
* @author Richard L. Apodaca <rapodaca at metamolecular.com>
*/
public class DefaultWalker implements Walker
{
private int maximumDepth;
public int getMaximumDepth()
{
return maximumDepth;
}
public void setMaximumDepth(int depth)
{
this.maximumDepth = depth;
}
| public void walk(Atom atom, Reporter reporter) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.