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 classTypes.Builderstatic classTypes.RawBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Types.Builderbuilder()booleanequals(java.lang.Object o)java.util.Optional<UserType>get(java.nio.ByteBuffer name)Get the type with the specified nameUserTypegetNullable(java.nio.ByteBuffer name)Get the type with the specified nameinthashCode()booleanisEmpty()java.util.Iterator<UserType>iterator()static Typesnone()static Typesof(UserType... types)static Types.RawBuilderrawBuilder(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.StringtoString()Typeswith(UserType type)Create a Types instance with the provided type addedTypeswithout(java.nio.ByteBuffer name)Creates a Types instance with the type with the provided name removedTypeswithout(UserType type)TypeswithUpdatedUserType(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:
iteratorin 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)
-
isEmpty
public boolean isEmpty()
-
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
Optionalif the type name is not found; a non-empty optional ofUserTypeotherwise
-
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
UserTypeotherwise
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-