-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#2 ExportAs ok Improving TreeNode. Addition vectors 1/1 (revert to my Android Calculator App) Game works again. TextDialog in feature processing Include spaces in AlgebraicTree formulas. Signed-off-by: Manuel Daniel Dahmen <[email protected]>
- Loading branch information
1 parent
292eb51
commit 1a33127
Showing
6 changed files
with
271 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* | ||
* * Copyright (c) 2024. Manuel Daniel Dahmen | ||
* * | ||
* * | ||
* * Copyright 2024 Manuel Daniel Dahmen | ||
* * | ||
* * 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 one.empty3.library1.tree; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
public class Class { | ||
private String name; | ||
private List<Variable> variableList = new ArrayList<>(); | ||
private List<Method> methodList = new ArrayList<>(); | ||
|
||
public Class() { | ||
|
||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public List<Variable> getVariableList() { | ||
return variableList; | ||
} | ||
|
||
public void setVariableList(List<Variable> variableList) { | ||
this.variableList = variableList; | ||
} | ||
|
||
public List<Method> getMethodList() { | ||
return methodList; | ||
} | ||
|
||
public void setMethodList(List<Method> methodList) { | ||
this.methodList = methodList; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
|
||
Class aClass = (Class) o; | ||
|
||
if (!Objects.equals(variableList, aClass.variableList)) | ||
return false; | ||
return Objects.equals(methodList, aClass.methodList); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = variableList != null ? variableList.hashCode() : 0; | ||
result = 31 * result + (methodList != null ? methodList.hashCode() : 0); | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/* | ||
* | ||
* * Copyright (c) 2024. Manuel Daniel Dahmen | ||
* * | ||
* * | ||
* * Copyright 2024 Manuel Daniel Dahmen | ||
* * | ||
* * 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 one.empty3.library1.tree; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
public class Method { | ||
private String name; | ||
private Variable ofClass; | ||
private List<Variable> variableList = new ArrayList<>(); | ||
private List<ListInstructions.Instruction> instructions = new ArrayList<>(); | ||
|
||
public Method() { | ||
|
||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public Variable getOfClass() { | ||
return ofClass; | ||
} | ||
|
||
public void setOfClass(Variable ofClass) { | ||
this.ofClass = ofClass; | ||
} | ||
|
||
public List<Variable> getVariableList() { | ||
return variableList; | ||
} | ||
|
||
public void setVariableList(List<Variable> variableList) { | ||
this.variableList = variableList; | ||
} | ||
|
||
public List<ListInstructions.Instruction> getInstructions() { | ||
return instructions; | ||
} | ||
|
||
public void setInstructions(List<ListInstructions.Instruction> instructions) { | ||
this.instructions = instructions; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
|
||
Method method = (Method) o; | ||
|
||
if (!Objects.equals(name, method.name)) return false; | ||
if (!Objects.equals(ofClass, method.ofClass)) return false; | ||
if (!Objects.equals(variableList, method.variableList)) | ||
return false; | ||
return Objects.equals(instructions, method.instructions); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = name != null ? name.hashCode() : 0; | ||
result = 31 * result + (ofClass != null ? ofClass.hashCode() : 0); | ||
result = 31 * result + (variableList != null ? variableList.hashCode() : 0); | ||
result = 31 * result + (instructions != null ? instructions.hashCode() : 0); | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* | ||
* * Copyright (c) 2024. Manuel Daniel Dahmen | ||
* * | ||
* * | ||
* * Copyright 2024 Manuel Daniel Dahmen | ||
* * | ||
* * 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 one.empty3.library1.tree; | ||
|
||
public class Variable { | ||
private String name; | ||
private Class value; | ||
|
||
public Variable() { | ||
|
||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public Class getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(Class value) { | ||
this.value = value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters