Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
org.dartlang.analysis.server.protocol.LinkedEditSuggestion Class Reference

Public Member Functions

 LinkedEditSuggestion (String value, String kind)
 
boolean equals (Object obj)
 
String getKind ()
 
String getValue ()
 
int hashCode ()
 
JsonObject toJson ()
 
String toString ()
 

Static Public Member Functions

static LinkedEditSuggestion fromJson (JsonObject jsonObject)
 
static List< LinkedEditSuggestionfromJsonArray (JsonArray jsonArray)
 

Static Public Attributes

static final LinkedEditSuggestion[] EMPTY_ARRAY = new LinkedEditSuggestion[0]
 
static final List< LinkedEditSuggestionEMPTY_LIST = Lists.newArrayList()
 

Detailed Description

A suggestion of a value that could be used to replace all of the linked edit regions in a LinkedEditGroup.

@coverage dart.server.generated.types

Definition at line 33 of file LinkedEditSuggestion.java.

Constructor & Destructor Documentation

◆ LinkedEditSuggestion()

org.dartlang.analysis.server.protocol.LinkedEditSuggestion.LinkedEditSuggestion ( String  value,
String  kind 
)
inline

Constructor for LinkedEditSuggestion.

Definition at line 52 of file LinkedEditSuggestion.java.

52 {
53 this.value = value;
54 this.kind = kind;
55 }

Member Function Documentation

◆ equals()

boolean org.dartlang.analysis.server.protocol.LinkedEditSuggestion.equals ( Object  obj)
inline

Definition at line 58 of file LinkedEditSuggestion.java.

58 {
59 if (obj instanceof LinkedEditSuggestion) {
61 return
62 ObjectUtilities.equals(other.value, value) &&
63 ObjectUtilities.equals(other.kind, kind);
64 }
65 return false;
66 }

◆ fromJson()

static LinkedEditSuggestion org.dartlang.analysis.server.protocol.LinkedEditSuggestion.fromJson ( JsonObject  jsonObject)
inlinestatic

Definition at line 68 of file LinkedEditSuggestion.java.

68 {
69 String value = jsonObject.get("value").getAsString();
70 String kind = jsonObject.get("kind").getAsString();
71 return new LinkedEditSuggestion(value, kind);
72 }

◆ fromJsonArray()

static List< LinkedEditSuggestion > org.dartlang.analysis.server.protocol.LinkedEditSuggestion.fromJsonArray ( JsonArray  jsonArray)
inlinestatic

Definition at line 74 of file LinkedEditSuggestion.java.

74 {
75 if (jsonArray == null) {
76 return EMPTY_LIST;
77 }
78 ArrayList<LinkedEditSuggestion> list = new ArrayList<LinkedEditSuggestion>(jsonArray.size());
79 Iterator<JsonElement> iterator = jsonArray.iterator();
80 while (iterator.hasNext()) {
81 list.add(fromJson(iterator.next().getAsJsonObject()));
82 }
83 return list;
84 }
static LinkedEditSuggestion fromJson(JsonObject jsonObject)

◆ getKind()

String org.dartlang.analysis.server.protocol.LinkedEditSuggestion.getKind ( )
inline

The kind of value being proposed.

Definition at line 89 of file LinkedEditSuggestion.java.

89 {
90 return kind;
91 }

◆ getValue()

String org.dartlang.analysis.server.protocol.LinkedEditSuggestion.getValue ( )
inline

The value that could be used to replace all of the linked edit regions.

Definition at line 96 of file LinkedEditSuggestion.java.

96 {
97 return value;
98 }

◆ hashCode()

int org.dartlang.analysis.server.protocol.LinkedEditSuggestion.hashCode ( )
inline

Definition at line 101 of file LinkedEditSuggestion.java.

101 {
102 HashCodeBuilder builder = new HashCodeBuilder();
103 builder.append(value);
104 builder.append(kind);
105 return builder.toHashCode();
106 }

◆ toJson()

JsonObject org.dartlang.analysis.server.protocol.LinkedEditSuggestion.toJson ( )
inline

Definition at line 108 of file LinkedEditSuggestion.java.

108 {
109 JsonObject jsonObject = new JsonObject();
110 jsonObject.addProperty("value", value);
111 jsonObject.addProperty("kind", kind);
112 return jsonObject;
113 }

◆ toString()

String org.dartlang.analysis.server.protocol.LinkedEditSuggestion.toString ( )
inline

Definition at line 116 of file LinkedEditSuggestion.java.

116 {
117 StringBuilder builder = new StringBuilder();
118 builder.append("[");
119 builder.append("value=");
120 builder.append(value + ", ");
121 builder.append("kind=");
122 builder.append(kind);
123 builder.append("]");
124 return builder.toString();
125 }

Member Data Documentation

◆ EMPTY_ARRAY

final LinkedEditSuggestion [] org.dartlang.analysis.server.protocol.LinkedEditSuggestion.EMPTY_ARRAY = new LinkedEditSuggestion[0]
static

Definition at line 35 of file LinkedEditSuggestion.java.

◆ EMPTY_LIST

final List<LinkedEditSuggestion> org.dartlang.analysis.server.protocol.LinkedEditSuggestion.EMPTY_LIST = Lists.newArrayList()
static

Definition at line 37 of file LinkedEditSuggestion.java.


The documentation for this class was generated from the following file: