Class Types

  • All Implemented Interfaces:
    java.lang.Iterable<UserType>

    public final class Types
    extends java.lang.Object
    implements java.lang.Iterable<UserType>
    An immutable container for a keyspace's UDTs.
    • Method Detail

      • 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 interface java.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 of UserType 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
      • with

        public Types with​(UserType type)
        Create a Types instance with the provided type added
      • without

        public Types without​(java.nio.ByteBuffer name)
        Creates a Types instance with the type with the provided name removed
      • withUpdatedUserType

        public Types withUpdatedUserType​(UserType udt)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object