Package org.maproulette.client.model
Class Task
- java.lang.Object
-
- org.maproulette.client.model.Task
-
- All Implemented Interfaces:
java.io.Serializable,IMapRouletteObject
public class Task extends java.lang.Object implements IMapRouletteObject, java.io.Serializable
A task is a single unit of work in the MapRoulette Challenge- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTask.TaskBuilderThe task builder customizes the builder object to hide some of the details away from the user.
-
Constructor Summary
Constructors Constructor Description Task()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Task.TaskBuilderbuilder(long parentIdentifier, java.lang.String name)booleanequals(java.lang.Object obj)What defines a task as unique is its task identifier and its challenge name.static TaskfromJson(java.lang.String json)inthashCode()Task.TaskBuildertoBuilder(boolean resetGeometry)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.maproulette.client.model.IMapRouletteObject
getId, getName, getParent
-
-
-
-
Method Detail
-
builder
public static Task.TaskBuilder builder(long parentIdentifier, java.lang.String name)
-
fromJson
public static Task fromJson(java.lang.String json) throws MapRouletteException
- Throws:
MapRouletteException
-
toBuilder
public Task.TaskBuilder toBuilder(boolean resetGeometry)
-
equals
public boolean equals(java.lang.Object obj)
What defines a task as unique is its task identifier and its challenge name. So even if the geometry or description or other member variables are different, it will be defined as equal if those two values are equal- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- The object to compare it against- Returns:
- whether it matches the supplied object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-