Package org.apache.cassandra.schema
Class Types
- java.lang.Object
-
- org.apache.cassandra.schema.Types
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Types.Builder
static class
Types.RawBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Types.Builder
builder()
boolean
equals(java.lang.Object o)
java.util.Optional<UserType>
get(java.nio.ByteBuffer name)
Get the type with the specified nameUserType
getNullable(java.nio.ByteBuffer name)
Get the type with the specified nameint
hashCode()
java.util.Iterator<UserType>
iterator()
static Types
none()
static Types
of(UserType... types)
static Types.RawBuilder
rawBuilder(java.lang.String keyspace)
java.lang.Iterable<UserType>
referencingUserType(java.nio.ByteBuffer name)
java.util.stream.Stream<UserType>
sortedStream()
Returns a stream of user types sorted by dependenciesjava.util.stream.Stream<UserType>
stream()
java.lang.String
toString()
Types
with(UserType type)
Create a Types instance with the provided type addedTypes
without(java.nio.ByteBuffer name)
Creates a Types instance with the type with the provided name removedTypes
without(UserType type)
Types
withUpdatedUserType(UserType udt)
-
-
-
Method Detail
-
builder
public static Types.Builder builder()
-
rawBuilder
public static Types.RawBuilder rawBuilder(java.lang.String keyspace)
-
none
public static Types none()
-
iterator
public java.util.Iterator<UserType> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<UserType>
-
stream
public java.util.stream.Stream<UserType> stream()
-
sortedStream
public java.util.stream.Stream<UserType> sortedStream()
Returns a stream of user types sorted by dependencies- Returns:
- a stream of user types sorted by dependencies
-
referencingUserType
public java.lang.Iterable<UserType> referencingUserType(java.nio.ByteBuffer name)
-
get
public java.util.Optional<UserType> get(java.nio.ByteBuffer name)
Get the type with the specified name- Parameters:
name
- a non-qualified type name- Returns:
- an empty
Optional
if the type name is not found; a non-empty optional ofUserType
otherwise
-
getNullable
@Nullable public UserType getNullable(java.nio.ByteBuffer name)
Get the type with the specified name- Parameters:
name
- a non-qualified type name- Returns:
- null if the type name is not found; the found
UserType
otherwise
-
without
public Types without(java.nio.ByteBuffer name)
Creates a Types instance with the type with the provided name removed
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-