Package com.osohq.oso_cloud
Class Value
- java.lang.Object
-
- com.osohq.oso_cloud.Value
-
- All Implemented Interfaces:
QueryArg,ValuePattern
public class Value extends java.lang.Object implements ValuePattern, QueryArg
Represents a value in Oso Cloud, consisting of a type and an ID.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.osohq.oso_cloud.ValuePattern
ValuePattern.AnyValuePattern
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.Stringidjava.lang.Stringtype-
Fields inherited from interface com.osohq.oso_cloud.ValuePattern
ANY
-
-
Constructor Summary
Constructors Constructor Description Value(boolean id)Creates a new Value with type "Boolean".Value(long id)Creates a new Value with type "Integer".Value(java.lang.String id)Creates a new Value with type "String".Value(java.lang.String type, java.lang.String id)Creates a new concrete Value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetType()Gets the type of this query argument.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Value
public Value(java.lang.String type, java.lang.String id)Creates a new concrete Value. Both type and ID must be non-null.- Parameters:
type- The type of the value. Must not be null.id- The ID of the value. Must not be null.- Throws:
java.lang.IllegalArgumentException- if type or id is null.
-
Value
public Value(java.lang.String id)
Creates a new Value with type "String". ID must be non-null.- Parameters:
id- The string ID. Must not be null.- Throws:
java.lang.IllegalArgumentException- if id is null.
-
Value
public Value(long id)
Creates a new Value with type "Integer".- Parameters:
id- The long integer ID.
-
Value
public Value(boolean id)
Creates a new Value with type "Boolean".- Parameters:
id- The boolean ID.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getType
public java.lang.String getType()
Description copied from interface:QueryArgGets the type of this query argument.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-