Class Attribute<T>
- java.lang.Object
-
- com.jfrog.bintray.client.api.details.Attribute<T>
-
public class Attribute<T> extends Object
This class represents an attribute (version or package) NOTE: when serializing this class use getObjectMapper to obtain a suitable mapper for this class
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAttribute.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static List<Attribute>getAttributeListFromJson(InputStream inputStream)static StringgetJsonFromAttributeList(List<Attribute> attributeDetails)Produces a json from a list of attributesStringgetName()static com.fasterxml.jackson.databind.ObjectMappergetObjectMapper()Attribute.TypegetType()List<T>getValues()inthashCode()StringtoString()
-
-
-
Constructor Detail
-
Attribute
@SafeVarargs public Attribute(String name, T... values)
-
Attribute
@SafeVarargs public Attribute(String name, Attribute.Type type, T... values)
-
Attribute
public Attribute(String name, Attribute.Type type, List<T> values)
-
-
Method Detail
-
getObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-
getJsonFromAttributeList
public static String getJsonFromAttributeList(List<Attribute> attributeDetails) throws IOException
Produces a json from a list of attributes- Parameters:
attributeDetails- List of attributes to serialize- Returns:
- A string representing the json
- Throws:
IOException
-
getAttributeListFromJson
public static List<Attribute> getAttributeListFromJson(InputStream inputStream) throws IOException
- Throws:
IOException
-
getName
public String getName()
-
getType
public Attribute.Type getType()
-
-